2

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).

5 Answers 5

2

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.

4
  • Yep. These other answers ignore the fact that you don't have the server installed. Commented Apr 15, 2011 at 2:56
  • To be fair, he edited the question to add the rpm -qa output. Commented Apr 15, 2011 at 13:41
  • Yeah that was pretty much the problem. For some freak reason, a repository conflict or something along those line, mysqld was uninstalled. Re-installed it and it's all good now. Commented Apr 18, 2011 at 4:39
  • Wow. I am a moron. Lucky I found your answer Commented Feb 5, 2013 at 23:46
1

My guess is that you somehow removed the server part of MySQL. /usr/bin/mysql is just the client part and doesn't have an entry in /etc/init.d. Can you post the output of rpm -qa | grep mysql?

1

On CentOS to start the mysql-server (mysqld) use the command

/sbin/service mysqld start 
0

Try /sbin/service mysql restart.

Looks like your shell, including exec paths and such, is pretty messed up, but you have been on the right track.

1
  • Yeah that is probably related to the installation and setup step I did a few months ago, quite rashly. Commented Apr 18, 2011 at 4:40
0

You don't have the server installed.

# yum -y install mysql-server # service mysqld start 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.