Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

So with the most recent builds in the MySQL 4.1.x series and with MySQL 5.0 it would not work anyway. There is now code in the server binary itself that truncates any user name to 16 characters.

Expand
titleConnection problemsError Nº2002

I get Error

...

2002. Can't connect to local MySQL server through socket ...

This can occur when connecting using HTTP-tunneling to a MySQL server running on Unix/Linux platforms.

MySQL writes

Newtab2
aliasProblems with MySQL sock
urlhttps://dev.mysql.com/doc/refman/8.0/en/problems-with-mysql-sock.html
about this issue.

How to cope with this would depend on which webserver and which php version is used. But here is a workaround that has worked with Apache:

...

If the directory /var/lib/mysql doesn't exist than create it and chown to user mysql:
"mkdir /var/lib/mysql; chown mysql /var/lib/mysql"
Then edit the /etc/my.cnf file and specify:
[mysqld]
socket=/var/lib/mysql/mysql.socket
[client]
socket=/var/lib/mysql/mysql.socket

...

And, restart the mysql server ("etc/init.d/mysql restart")
That is enough for MysSQL. However the chances are that

...

PHP was compiled with a different default mysql socket location (e.g. /tmp/mysql.sock). In which case you have to edit the php.ini file and find the variable "mysql.default_socket". Set this to the above value
mysql.default_socket = /var/lib/mysql/mysql.socket

...

And restart Apache to re-read the php.ini file
If you

...

do not have access to the

...

configuration files and system command-line then you must ask your Sys Admin/support to help with this

...

.


Error no. 1251: "Client does not support authentication..."

...