Centos – Missing thesql_install_db on CentOS

centosMySQL

I've been given access to a server running CentOS 5.4 to install some software on and it looks like mysql needs setting up. The problem is that it I can't find mysql_install_db (which I think is what I need to run as there's no mysql folder in /var/lib/).

According to yum, both mysql and mysql-server packages are installed. Looking at another CentOS 5.4 machine I have setup, it looks like it's apart of the mysql-server package, but it ain't there on this machine. Running this…

rpm -ql mysql-server | grep mysql_install_db

Gives me nothing at all on the machine I need to setup (and locates it fine on my correctly working machine).

Best Answer

Make sure you have original distro mysql-server there. Because running "rpm -ql mysql-server" on a clean Centos box shows both mysql_install_db and /var/lib/mysql as parts of the package.