Skip to content

No output on Windows when using mysql lib #14464

@fatihkizmaz

Description

@fatihkizmaz

V version: V 0.2.4 c01a8a1.3291c59
OS: Windows 10 Pro v19044 64 bit

What did you do?
I am trying to test mysql connection on windows platform. I followed all the instructions (installed mysql, copied include and lib directories to directory thirdparty/mysql), but could not execute a basic test successfully. The fact is, it does not give any error, also it outputs nothing!

The sample code i used to test:

import mysql

fn main() {
	println('connecting..')
	mut conn := mysql.Connection{
		host: 'localhost'
		port: 3306
		username: 'root'
		password: ''
		dbname: 'mysql'
	}
	conn.connect() ?
	println('querying..')
	res := conn.query('show tables') ?
	for row in res.rows() {
		println(row.vals.join(', '))
	}
	println('disconnecting..')
	conn.close()
}

An image that shows terminal after running sample file. No output!
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Unit: DocumentationBugs/feature requests, that are related to the documentations.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions