MySQL Daemon failed to start.
I'm really not sure what I'm doing wrong. I'm attempting to start mysql
Code:
[root@bebop-test /]# /etc/init.d/mysqld restart Code:
[root@bebop-test /]# mysql I search for the file and it does not appear to exist anywhere, not in /tmp or /var/lib/mysql/ or anywhere else find could look. Google says, possibly mysqld doesn't have permissions to create the mysql.dock file, but the folder appears to be set with proper permissions. My my.cnf Code:
[mysqld] And my error log Code:
101119 09:05:33 mysqld ended I'm not sure where to go from here, everything else I've found on google people generally have this problem fixed before it reaches the point that I'm at. Need a clue, can anyone help? |
Do this command to find your mysql.sock file:
cd / find . -exec grep -i mysql.sock {} \; Mine is located in /var/run/mysqld You might try there first. |
yeah I tried it doesn't exist anywhere on the system.
|
Since your system is trying to find it here:
Quote:
touch /var/lib/mysql/mysql.sock chown mysql:mysql /var/lib/mysql/mysql.sock chmod 4777 /var/lib/mysql/mysql.sock If the above does not work try this: mysqladmin [-h ... -u ... -p...] shutdown -> This might not need to be done as yours is already shutdown. (service mysql/mysqld status to verify) mysqld_safe --user=mysql & that should restore your socket file... |
Code:
[root@bebop-test /]# touch /var/lib/mysql/mysql.sock |
So did it create a sock file that looked like this:
srwxrwxrwx 1 mysql mysql 0 Nov 15 22:07 mysqld.sock If not remove the lock file I had you touch as I forgot that this is a socket file (s at beginning) and cannot to my knowledge be created by hand. Then run this again: mysqladmin [-h ... -u ... -p...] shutdown -> This might not need to be done as yours is already shutdown. (service mysql/mysqld status to verify) mysqld_safe --user=mysql & ll /var/lib/mysql/mysql.sock Post what the ll returns. |
It didn't create mysql.sock
Code:
[root@bebop-test /]# mysqladmin [-h ... -u ... -p...] shutdown |
Type which mysql should return something like this: /usr/bin/mysql
Whatever the first part of that is add this line to your my.cnf file where /usr is the first directory from which command. basedir = /usr then try and start mysql. You hopefully will get a different error message other than Quote:
|
Code:
101119 12:16:21 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql |
Have you tried to run mysql_upgrade yet?
Also what are the permissions for these: /var/lib/mysql /var/run/mysqld This is what is in my my.cnf file: Quote:
|
What version of Linux are you running?
|
You could also run this and post the output.
Quote:
|
mysql_upgrade won't run while mysqld isn't operating. Throws the same error
Code:
[root@bebop-test /]# mysql_upgrade /var/run/mysqld is rwxr-xr-x 0755 owner/group mysql Linux version 2.6.18-194.26.1.el5 (mockbuild@x86-004.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Oct 29 14:21:16 EDT 2010 Code:
[root@bebop-test lib]# /usr/bin/mysql --print-defaults |
Try this command:
Quote:
Also your system might be looking for the my.cnf file else where (i.e. /etc/my.cnf instead of /etc/mysql/my.cnf). If this is the case you can fix like so: Quote:
Quote:
|
I'm not sure how to interpret the results of whereis mysqld.sock
Code:
[root@bebop-test lib]# whereis mysqld.sock mysql --socket=/var/run/mysqld/mysqld.sock returns Code:
[root@bebop-test lib]# mysql --socket=/var/run/mysqld/mysqld.sock I've given up on trying to get the latest version from remi's repo working on this system. I've removed it and fell back to the default RHEL repo version. It seems to be working. Thank you for all your help d072330 it was very appreciated and I learned a lot which I'd say pretty much makes the whole thing good :) |
Hi,
Quote:
The next time, you should remove the mysql.i386 version before updating. |
That sounds reasonable. Since this is a test box I'm free to do just that. I'll give it a try when I get back to work Monday. Thanks for the tip I'll post to success or failure whichever comes first.
|
@quanta - good catch did not see that.
Hopefully that fixes the problem. Let us know. |
Well I did manage to get MySQL working correctly and creating it sock with a reinstall. However for whatever reason php-mysql would not install. I downgraded from 5.3.4(remi's latest release) to the 5.3.3 release which also didn't work. I removed that version and managed to get it working via this http://www.webtatic.com/blog/2009/06...0-on-centos-5/
|
Quote:
- Wipe everything from the previous MySQL installs (including any conflicting files) - Clean Yum - Temporarily disable my custom repo Worked just fine. Thank you for posting that and not just blowing the original poster off like almost every other forum thread found through google seems to be full of. |
vi /etc/my.cnf
# For low memory, Berkeley DB should not be used so keep skip-bdb uncommented unless required #skip-bdb comment out of the "skip-bdb" section. TRY it. |
I had the same problem...
So, I was having the same issue. Exactly the same across the board -- all your posts and outputs matched my exactly. After hours or trolling google and beating my head against the wall I did something extraordinary.
I RTFM.... http://dev.mysql.com/tech-resources/...sql_intro.html $ sudo mysql_install_db It did some stuff... then when I started mysqld ($ sudo /sbin/service mysqld start) I got that wonderful... beautiful... [ OK ] |
Another cause of mysqld not restarting
I was backing up a database when this happened to me: mysqld would not restart, even after a system restart. What had happened in the middle of the backup was that the disk became 100% full and mysql could not even create its .pid file. Just run
Code:
df -h |
Quote:
|
Thank you
Thank you for posting that. I also removed and re-installed, but it wasn't 'til after I ran the install line that it started.
# mysql_install_db |
All times are GMT -5. The time now is 11:33 PM. |