The init.d script installed with mysqld version 4 points to the wrong executable for starting the daemon. Reproducible: Always Steps to Reproduce: 1. emerge /usr/portage/dev-db/mysql/mysql-4.0.13.ebuild 2. attempt to start the daemon using /etc/init.d/mysql start Actual Results: Reported that the mysqld could not be connected to via /var/run/mysqld/mysqld.sock Expected Results: started the mysql daemon
This can be fixed by editting the line in /etc/init.d/mysql reading: start() { checkconfig || return 1 ebegin "Starting mysqld" /usr/bin/safe_mysqld >/dev/null 2>&1 & eend $?} to: start() { checkconfig || return 1 ebegin "Starting mysqld" /usr/bin/mysqld_safe >/dev/null 2>&1 & eend $?}
You failed to run etc-update and update the init.d file.
etc-update was run after the emerge, and I selected the option to auto change all needed files automatically.
I had the same problem after emerge. It turned out, that there was no /var/run/mysqld directory. I created it...but then "permission denied" while trying to open unix socket. "chown mysql.mysql /var/run/mysqld" fixed it :]