After a new installation of redhat 7.0 on a Dell Dimension4100 PC, as root try to start mysql server: [root@jhan-home-dell mysql]#cd /usr/bin [root@jhan-home-dell bin]#mysql_install_db ... [root@jhan-home-dell bin]#safe_mysqld & It starts but exits immedialtely. Check /var/lib/mysql/jhan-home-dell.err, it has error message: Can't open host.frm (error code 13). Then I upgraded following packages: glibc-2.2-9.i686.rpm, libstdc++-2.96-69.i386.rpm, mysql-3.23.29-1.i386.rpm, mysql-server-3.23.29-1.i386.rpm, mysql-devel-3.23.29-1.i386.rpm, and try to start mysqld again. This time it gives a different problem. It seems that the main process keeps create child processes but all child processes die immedialtely. I have to use kill -9 to kill the main process. Check /var/lib/mysql/jhan-home-dell.err, it has these error messages: Number of processes running now: 0 001227 22:35:20 mysqld restarted 001227 22:35:21 Can't start server : Bind on unix socket: Permission denied 001227 22:35:21 Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ? 001227 22:35:21 Aborting
See Service Request 165972 for more information
The way to start mysql is by running "service mysql start" (or /etc/rc.d/init.d/mysqld start directly). As the error message says, you could already have a mysqld process running (and the first one was resolved by an errata on the day of release)
I'm sure mysqld is not running. [root@jhan-home-dell /root]# mysql -version ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) [root@jhan-home-dell /root]# ps -ax | grep mysql 1190 pts/0 S 0:00 grep mysql
And if you try starting it with "service mysqld start"?
I tried "service mysqld start", the result is same as "safe_mysqld". The main process is started and running. But it seems to spawn child process and the child process dies immediately. And the main process keeps spawn child process. I can tell that by ps: [root@jhan-home-dell /root]# service mysqld start Starting MySQL: [OK] [root@jhan-home-dell /root]# ps -ax | grep mysqld 9321 pts/0 S 0:00 sh /usr/bin/safe_mysqld --user=mysql --log=/var/log 11466 pts/0 R 0:00 sh /usr/bin/safe_mysqld --user=mysql --log=/var/log [root@jhan-home-dell /root]# ps -ax | grep mysqld 9321 pts/0 S 0:00 sh /usr/bin/safe_mysqld --user=mysql --log=/var/lib 11738 pts/0 S 0:00 sh /usr/bin/safe_mysqld --user=mysql --log=/var/lib 11739 pts/0 R 0:00 sh /usr/bin/safe_mysqld --user=mysql --log=/var/lib 11740 pts/0 R 0:00 date +%y%m%d %H:%M:%S mysqld restarted And each child process logs an error message in /var/lib/mysql/jhan-home-dell.err before die. The log file getting big quickly.
This program was checked before releasing, without this occuring. What is the permissions on /var/lib/mysql? Have you specified something in a configuration file? Do you have all errata installed?
OK, I figure out what's wrong. I have to chmod /var/lib/mysql and /var/lib/mysql/mysql from 700 to 760. This solves the problem.
This directory should have received the proper permissions after updateing - and have always done so in our internal testing. However, to be absolutely sure I've now added an explicit chmod command to the post install script in 3.23.30-1.