Rick Hurst Web Developer in Bristol, UK


mysql ended

just did an install of redhat fedora core 2, including mysql.

when attempting to start mysql with safe_mysqld &, I was getting a message mysql ended. Attempting to open mysql was then resulting in the message: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ .

I’ve had this before and I know it is related to permsions – the mysql user (created during install) needs to be able to write to /var/lib/mysql/. So I did the following:-

# chmod -R 755 /var/lib/mysql
# chown -R mysql /var/lib/mysql
# chgrp -R mysql /var/lib/mysql

(apparently this might be overkill but this was only for a server on local network)

I also did this:-

# mysql_install_db

(not sure what order or whether I needed to!)

It still wasn’t working so checked error log /var/log/mysqld.log

There was a problem with InnoDB (not sure what that even is, sure i’ll find out soon enough…), followed intructions in error log to resolve, which involved adding a line to /etc/my.cnf under the mysqld section:-

innodb_data_file_path = ibdata1:10M:autoextend

(the alternative is skip-innodb if "you do not want to use transactional InnoDB tables"

still didn’t work, repeated some of earlier steps, then it started OK 🙂