Missing sock
|
|
When I install the LAMP stack, it works fine—until I reboot. When I reboot I get an error and try to start everything up, Apache starts but MySQL doesn’t. It says that my site can not reach the database. When I try to reach the db through phpmyadmin, the error seems to suggest there is a socket problem but there is no socket file in /tmp where the .cnf file thinks it is. Should the stack have a sock? Should it be in tmp? Is this a red herring error? |
|
|
Hi AutoSponge, The socket file is located at /path/to/installation/mysql/tmp/mysql.sock, not at /tmp. How are you starting the servers? Cheers |
|
|
I tried the LAMP stack a couple more times. Each time, the sock was missing. Then I tried installing the phpbb2 stack. That had the proper sock file. So I finished my configuration and rebooted. When I booted, I checked to make sure that the service wasn’t started-the site did not load. Then I went to my home/stack/ folder and ran the startup script. It bombed, but with a different error. So, I checked to see if the sock file was there-it was gone! I still don’t know why it’s happening, but I can repeat it and I don’t have a workaround yet. Any suggestions are appreciated. UPDATE: I’ve rebuilt the stack. This time I paid special attention to the sock file. It’s a 0-byte file, completely empty. I could not copy it or back it up in any way. I stopped and started the server. Everything worked. When I rebooted, same error: “phpBB: Critical Error Could not connect to the database”. Phpmyadmin error reads: #2002 the server is not responding. So I tried to put an empty socket file back in mysql/tmp where, once again, it is missing. That doesn’t work. So far, every time I reinstall, the same thing happens. The command I use to start services is ./ctlscript.sh start apache |
|
|
I set the tmp folder so everyone (including root) was read only. The sock file is still there (yay) but I get the same error after a reboot (waa). Any ideas? |
|
|
I went to the command line, trying to get more info: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ’/home/autosponge/lampstack/mysql/tmp/mysql.sock’ (111) I changed some values of usr/local in some config files, I don’t know if that changed anything but… then I ran ./mysqld instead of ./mysql and it worked. |
|
|
You’re only starting the Apache server. Either you use
after starting Apache, or you just go the easy way with
which will start everything. You can find more information on how to use the control script in the README file. We are working on a GUI tool to control the servers, but we don’t know when it will be released yet. Cheers |
|
|
ok that makes sense |
|
|
I still got this problem. After installing LAMPstack it runs fine. When I reboot and start the stack: I get the following output: Syntax OK I can’t find the pid file in installation/mysql/tmp nor in installation/mysql/data.. p.s. sorry cant get the code in bq =/ |
|
|
Hi, You can’t find the pid because MySQL has encountered an error and was shut down. There should be a log in mysql/data explaining the issue, can you post it here? Cheers |
|
|
Hi, It seems that you install BitNami LAMPStack as a non-root user. Try to start without sudo command. |
|
|
Thanks a lot beltran, it works like a charm now! :) |
