GRANT ALL PRIVILEGES ON *.* TO ‘username’@’localhost’ IDENTIFIED BY ‘password’; “` 刷新权限: “` FLUSH PRIVILEGES; “` 按照以上步骤进行排查,应该可以解决"Can’t connect to local MySQL server through socket…"的问题。
2.socket 连接 mysql -uroot -p 解决方式: 添加[client] 配置项,如下所示 配置前:(配置 [client] 前,会报错'/tmp/mysql.sock' (2)) [mysqld] datadir=/usr/local/mysql/data basedir=/usr/local/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prev...
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Cristea Cristina June 11, 2008 03:32AM Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) ...
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Cristea Cristina June 11, 2008 03:32AM Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) ...
This way the client and server use the same socket and it's in a public directory. This solves my MySql problems 98% of the time. Jakub TCP Linux localhost.localdomain 2.6.9-11.ELsmp Subject Written By Posted ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var...
mysqli.default_port = 3306 ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. mysqli.default_socket = /var/mysql/mysql.sock ; Default host for mysql_connect() (doesn't apply in safe mode). ...
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Ricardo Garcia Chavarry October 08, 2005 03:51PM Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) ...
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Cristea Cristina June 11, 2008 03:32AM Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) ...
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) #when giving command "which mysql" it replies /usr/local/bin/mysql # # at the start when i installed this mysql version i get this msg ...
/dev/sda5 15G 4.1G 11G 29% /var/lib/mysql tmpfs 393M 0 393M 0% /run/user/0 When trying to run mysql from cli: [root@appliance mysql]# mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) ...