Page 1 of 1

MySQL "localhost" connection bug

PostPosted: 06. April 2010 03:54
by MC10
Just wondering: how does XAMPP fix this "bug": http://bugs.mysql.com/bug.php?id=31577?

It doesn't show up with XAMPP, but does with my (other) server built from the MySQL installation files. The servers are on different computers, so there's no conflict.

Re: MySQL "localhost" connection bug

PostPosted: 06. April 2010 05:43
by Narrowboyy
It looks like there are currently no XAMPP developers active in this forum, so I can only hazard a logical guess as to the answer to your question.

In XAMPP 1.6.8 with MySQL 5.0.67 the my.cnf (my) looked like this
Code: Select all
# The following options will be passed to all MySQL clients
[client]
# password       = your_password
port            = 3306
socket          = mysql


In XAMPP 1.7.0 with MySQL 5.1.30 the my.cnf (my) looked like this
Code: Select all
# The following options will be passed to all MySQL clients
[client]
# password       = your_password
port            = 3306
socket          = "C:/xampp/mysql/mysql.sock"


In XAMPP version 1.7.1 with MySQL 5.1.33 the my.ini looked like this
Note that now the name my.ini file is used instead of the name my.cnf (my).
Code: Select all
# The following options will be passed to all MySQL clients
[client]
# password       = your_password
port            = 3306
socket          = "C:/xampp/mysql/mysql.sock"


In XAMPP versions starting with 1.7.2 with MySQL 5.1.37 you see the differences, which may be the way XAMPP works aground that perceived 'bug'.
Code: Select all
# The following options will be passed to all MySQL clients
[client]
#user       = your_username
#password   = your_password
host        = .
port      = 3306
socket      = "MySQL"


In XAMPP version 1.7.3 with MySQL 5.1.41 the my.ini looks like this
Code: Select all
# The following options will be passed to all MySQL clients
[client]
#user       = your_username
#password   = your_password
host        = .
port      = 3306
socket      = "MySQL"

So in conclusion the addition of the host = . and the socket = "MySQL" may be the answer you seek.

Check the my.ini of the MySQL instance you installed separately and see if the above additions will help.

NOTE:
All MySQL ini files above, no matter how they were named, are included in the \mysql\bin folder, so check in your other installation that there is no other my.ini or my.cnf file in the Windows folder or anywhere else for that matter also the \mysql\data\mysql.err file often has clues and is seemingly overlooked by many when troubleshooting MySQL issues.