Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
Hi, I'm really tired of this problem... Here's the error message: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /usr/local/httpd/htdocs/dbopen.php3 on line 5 I have Suse 7.1 Standard installation with apache1.3.14 and php3.0.17 Apache is running Simple PHP Scripts without MYSQL CONNECTION, too. Mysql 3.23 is okay. Mysqld is running i started mysql and created a db. But the only thing i could not do is to make mysql_connect with a php script. i have the php3.ini and the /etc/httpd/ directory and there is an entry: mysql.default_socket= /tmp/mysql.sock the mysql.sock is there! I DON'T HAVE ANY IDEA WHY THIS PROBLEM OCCURS! If u need more Information please let me know Please help Regards Denis - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
Well, since PHP is trying to use a socket in the wrong directory, you might check the PHP list to see if they can help you. This is not, strictly speaking a MySQL problem, so waiting here for the correct answer may not be the quickest route to the answer. I have seen several answers indicating that you need to set the socket option in the PHP ini file. denis mettler wrote: Hi, I'm really tired of this problem... Here's the error message: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /usr/local/httpd/htdocs/dbopen.php3 on line 5 I have Suse 7.1 Standard installation with apache1.3.14 and php3.0.17 Apache is running Simple PHP Scripts without MYSQL CONNECTION, too. Mysql 3.23 is okay. Mysqld is running i started mysql and created a db. But the only thing i could not do is to make mysql_connect with a php script. i have the php3.ini and the /etc/httpd/ directory and there is an entry: mysql.default_socket= /tmp/mysql.sock the mysql.sock is there! I DON'T HAVE ANY IDEA WHY THIS PROBLEM OCCURS! If u need more Information please let me know Please help Regards Denis - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
Hi, Since SuSE 7.1 I experience the following problem using MySQL: andreaso@php4win:~ mysql -u root -p Enter password: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) Looks like I don't get a connection... andreaso@php4win:~ su Password: root@php4win:/home/andreaso mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 3.23.32-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer mysql Works as root... And I think I didn't have that problem while using SuSE 7.0 Permissions on mysql.sock are as follows: root@php4win:/home/andreaso ls -la /var/lib/mysql/mysql.sock srwxrwxrwx1 mysqldaemon 0 Feb 28 08:59 /var/lib/mysql/mysql.sock This is really bugging me since a week now and I couldn't find a solution yet. I would really appreciate if someone could help. Cheers, Andreas -- andreas otto london (uk) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
I had the same problem. Ensure that /var has these permissions: drwxr-xr-x Ensure /lib is drwxr-xr-x Ensure /mysql is drwxr-xr-x That fixed it for me rick -Original Message- From: andreas otto [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 6:11 AM To: [EMAIL PROTECTED] Subject: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) Hi, Since SuSE 7.1 I experience the following problem using MySQL: andreaso@php4win:~ mysql -u root -p Enter password: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) Looks like I don't get a connection... andreaso@php4win:~ su Password: root@php4win:/home/andreaso mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 3.23.32-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer mysql Works as root... And I think I didn't have that problem while using SuSE 7.0 Permissions on mysql.sock are as follows: root@php4win:/home/andreaso ls -la /var/lib/mysql/mysql.sock srwxrwxrwx1 mysqldaemon 0 Feb 28 08:59 /var/lib/mysql/mysql.sock This is really bugging me since a week now and I couldn't find a solution yet. I would really appreciate if someone could help. Cheers, Andreas -- andreas otto london (uk) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
Hi Gerald, In order for andreaso to open mysql.sock, he needs search permission on /var/lib/mysql. chmod 775 /var/lib/mysql That was it! Thanks for helping me out ;-) Cheers, Andreas -- andreas otto london (uk) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php