Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-01-23 19:16:32
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
MySQL "database unavailable" and socket errors
Help … I’m quite the newbie with administering MySQL (Ver 14.7 Distrib 4.1.16) on Mac OS 10.3.9 and I’ve run into a MySQL issue that I don’t know how to troubleshoot. I’ve checked the MySQL site but can’t quite make heads or tails of what to do.
It was working fine a few days ago and to my knowledge nothing has changed on my setup. Here’s what I’ve tried so far:
- When I go to the textpattern index page, I get a “Database Unavailable” message.
- When I go to my phpMyAdmin page that’s supposed to connect to the same database, I get this error: #2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)
- When I log into mysql via Terminal using <code>mysql -u username -p</code> everything seems to work fine. I am able to use the <code>SHOW DATABASES</code> and <code>SHOW TABLES</code> commands.
- In the shell, <code>ls /tmp/</code> shows that <code>mysql.sock</code> is present.
- I’ve rebooted my machine. MySQL starts up automatically and I verify this by logging into mysql via the Terminal, but I still get the same errors for Textpattern and phpMyAdmin.
All the info I have found so far suggest I need to reinstall MySQL, but I thought I’d check to see if there are any additional troubleshooting steps I can take first before I tackle this reinstallation? (Bad things tend to happen to me when I attempt MySQL installations).
Offline
#2 2006-01-23 22:56:07
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: MySQL "database unavailable" and socket errors
My first guess would be that you’ve changed either the MySQL server, or Textpattern/phpMyAdmin, to use a TCP/IP socket instead of Unix domain.
This is really a question for a MySQL forum.
Alex
Offline
#3 2006-01-23 23:47:29
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: MySQL "database unavailable" and socket errors
Forgot to mention that I tried changing phpMyAdmin’s config to use “socket” instead of “tcp” but it seemed to have no effect.
That gave me an idea, though – in config.php I changed <code>$txpcfg[‘host’] = ‘localhost’;</code> to <code>$txpcfg[‘host’] = ’127.0.0.1’;</code> and that seemed to fix it. I don’t know what the hell changed on my setup but at least it works. Thanks.
Offline