Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Socket error when connecting to MySQL
- Date: Sat, 15 Jul 2006 14:40:59 +0900
- From: Dave M G <martin@example.com>
- Subject: Re: [tlug] Socket error when connecting to MySQL
- References: <44B5D6E2.3020508@example.com> <d8fcc0800607122228v37fc1178sc95399e31d5d3e10@example.com> <44B60C64.7010404@example.com> <d8fcc0800607131638o5f031860s9ec9ae2c07471656@example.com>
- User-agent: Thunderbird 1.5.0.4 (X11/20060615)
Josh,I've resolved the Zend studio/MySQL socket issue by creating a symbolic link from /tmp/mysql.sock to /var/run/mysqld/mysqld.sock.( ln -s /var/run/mysqld/mysql.sock /tmp/mysql.sock )But, clearly in my earlier attempts to find a solution, I've munged up my php.ini file or something, because now not only does phpMyAdmin not connect, no PHP script that I run locally will work.To resolve this, I tried to retrace my steps and put everything back the way it was. I also reinstalled MySQL, PHP, and phpMyAdmin from the Ubuntu repositories using apt-get.Despite these efforts, whatever it is that I've done to mess up my system remains in place.When I start a PHP script that calls upon MySQL, I get the following error:Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /web_sites/web/db_fns.php on line 6.So far as I can remember, the only places I made edits were in /etc/php5/apache2/php.ini, and /etc/mysql/my.cnf.In /etc/php5/apache2/php.ini, here is what the relevant section looks like now:- - - - - - - - -; Default port number for mysql_connect(). If unset, mysql_connect() will use; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the; compile-time value defined MYSQL_PORT (in that order). Win32 will only look; at MYSQL_PORT. mysql.default_port = 3306 ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. mysql.default_socket = - - - - - - - - -My understanding of the above is that if the socket variable is left empty, it should go with the MySQL default. I have tried specifying "mysql.default_socket = /var/run/mysqld/mysql.sock" and "mysql.default_socket = /tmp/mysql.sock", but that hasn't helped.As for /etc/mysql/my.cnf, it says: - - - - - - - - - [mysqld] pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysql.sock - - - - - - - - - I am unsure where to look to diagnose this problem further. Any idea on where I might have messed up? -- Dave M G
- Follow-Ups:
- Re: [tlug] Socket error when connecting to MySQL
- From: Josh Glover
- References:
- [tlug] Socket error when connecting to MySQL
- From: Dave M G
- Re: [tlug] Socket error when connecting to MySQL
- From: Josh Glover
- Re: [tlug] Socket error when connecting to MySQL
- From: Dave M G
- Re: [tlug] Socket error when connecting to MySQL
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Call for TLUG presenters for 2006-07-29 meeting
- Next by Date: [tlug] NEC Laptop Issue
- Previous by thread: Re: [tlug] Socket error when connecting to MySQL
- Next by thread: Re: [tlug] Socket error when connecting to MySQL
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links