CentOS and MySQL

centosMySQL

So I have this VPS on CentOS. A few months ago, I installed apache2, mysql and some other stuff, to host a wordpress blog. Now, for some reason, the mysql service has shutdown, and I'm unable to restart it.

  • "which mysql" returns "/usr/bin/mysql" seems to confirm it is indeed installed
  • "/etc/init.d/mysql" returns "-bash: /etc/init.d/mysql: No such file or directory"
  • "service mysql start" returns "-bash: service: command not found"
  • Interchanging mysql for mysqld did not made any changes in those last two points
  • Only log file related to mysql, in the /var/log folder is named mysqld.log.rpmsave and is empty

Thruthfully, I'm a programmer and I am utterly confused by this situation. Any idea?

— EDIT —

Thanks for your answers guys. I tried Caleb and lain's suggestion and unfortunately /sbin/service mysql start or /sbin/service mysqld start returns me unrecognized service.

As for the result of rpm -qa | grep mysql :
php-mysql-5.3.3-1.el5.remi
mysql-libs-5.1.53-1.el5.remi
mysql-5.1.53-1.el5.remi

remi being the repo where I found newer version of PHP (from 5.1.X to 5.3).

Best Answer

From the remi repo, you need mysql-server. Try yum install mysql-server; you'll then be able to chkconfig and service mysqld to your heart's content.

If your remi repo isn't enabled by default, it'll be yum --enablerepo=remi install mysql-server; try that if you get a bunch of unresolved dependency messages.