![]() |
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 restartCode:
[root@bebop-test /]# mysqlI 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 endedI'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.sockmysql --socket=/var/run/mysqld/mysqld.sock returns Code:
[root@bebop-test lib]# mysql --socket=/var/run/mysqld/mysqld.sockI'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 :) |
| All times are GMT -5. The time now is 11:53 AM. |