Added port paramater to mysqld

This commit is contained in:
Samuel 2018-02-20 04:35:31 -07:00
parent 62dbfa5bdc
commit ff7c4df75f
No known key found for this signature in database
GPG Key ID: 77D9FCAF75E3E6F7
1 changed files with 2 additions and 2 deletions

View File

@ -164,12 +164,12 @@ class MySqlResult : ResultSet {
class MySql : Database { class MySql : Database {
this(string host, string user, string pass, string db) { this(string host, string user, string pass, string db,uint port = 0) {
mysql = enforceEx!(DatabaseException)( mysql = enforceEx!(DatabaseException)(
mysql_init(null), mysql_init(null),
"Couldn't init mysql"); "Couldn't init mysql");
enforceEx!(DatabaseException)( enforceEx!(DatabaseException)(
mysql_real_connect(mysql, toCstring(host), toCstring(user), toCstring(pass), toCstring(db), 0, null, 0), mysql_real_connect(mysql, toCstring(host), toCstring(user), toCstring(pass), toCstring(db), port, null, 0),
error()); error());
dbname = db; dbname = db;