File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -103,12 +103,18 @@ private static function getMysqlArgs(): string
103103 $ username = $ dbConfig ['user ' ];
104104 $ database = $ dbConfig ['dbname ' ];
105105 $ password = $ dbConfig ['password ' ];
106- $ port = $ dbConfig ['port ' ] ?? 3306 ;
106+ $ port = $ dbConfig ['port ' ] ?? null ;
107+
108+ if ($ port ) {
109+ $ port = "--protocol tcp --port= $ port " ;
110+ } else {
111+ $ port = '--protocol socket ' ;
112+ }
107113
108114 // It's possible to have no password at all
109115 $ password = $ password ? '-p ' . $ password : '' ;
110116
111- return "--user= $ username $ password --host= $ host --protocol tcp --port= $ port $ database " ;
117+ return "--user= $ username $ password --host= $ host $ port $ database " ;
112118 }
113119
114120 final public static function loadRemoteData (string $ remote ): void
You can’t perform that action at this time.
0 commit comments