$wgdBserver = "localhost";The value in $wgBDport is only used with PostgreSQL. To specify a MySQL connection port different than 3306, use the syntax server:port on $wgdbServer. For instance:
$wgDBname = "mw0";
$wgDBuser = "my_user";
$wgDBpassword = "my_pass";
$wgDBprefix = "mw_";
$wgDBtype = "mysql";
$wgDBport = "3308"; // <--- DOES NOT work for MySQL
$wgdBserver = "localhost:3308";BUT! there's another catch: when the server is defined to "localhost", MySQL will default to connecting via socket. If you are changing the port in hopes of getting WikiMedia to connect to another running instance of MySQL, chances are that it will still connect to the "default" one. To force a TCP connection use the loopback IP address instead of "localhost":
$wgdBserver = "127.0.0.1:3308";It took me nearly an hour to figure this bitch out so please say thank you if it works for you.
[Update 24/08/2007]: on Solaris my trick didn't work. To fix it, I had to add the following line to LocalSettings.php:
ini_set("mysql.default_socket", "/tmp/mysql5.sock");Adjust the path to the location where your MySQL writes the socket and off you go!
5 comments:
Thanks!
you rock -- I've been going around on this for a while.
+1 Thanks
awesome.
thx.
Didn't work for me unfortunately
Post a Comment