Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed MySQL using yum install mysql on Fedora 12. Now how do I start the server?

[root@localhost init.d]# which mysql
/usr/bin/mysql

[root@localhost init.d]# mysql --version
mysql  Ver 14.14 Distrib 5.1.46, for redhat-linux-gnu (x86_64) using readline 5.1

Here's the list of all the above commands I tried

[root@localhost init.d]# mysql -h localhost -u username -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql
/mysql.sock' (111)
[1]+  Exit 127                /usr/bin/mysqld_safe


[root@localhost init.d]# /etc/init.d/mysql start
bash: /etc/init.d/mysql: No such file or directory


[root@localhost init.d]# /usr/bin/mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql
/mysql.sock' (111)


[root@localhost init.d]# services mysqld start
bash: services: command not found


[root@localhost init.d]# chkconfig --level 345 mysql on
error reading information on service mysql: No such file or directory

[root@localhost init.d]# service mysql start
mysql: unrecognized service

[root@localhost init.d]# /etc/init.d/mysqld start
bash: /etc/init.d/mysqld: No such file or directory

Had to also do this.. yum install mysql-server (Yikes!)

Now I get this error

[root@localhost vineeth]# service mysqld start
MySQL Daemon failed to start.
Starting MySQL:                                            [FAILED]

[root@localhost vineeth]# /etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting MySQL:                                            [FAILED]
share|improve this question

migrated from stackoverflow.com May 28 '10 at 10:52

This question came from our site for professional and enthusiast programmers.

    
It should already be running, shouldn't it? Can you connect using mysql -h localhost -u username -p? –  Pekka 웃 May 28 '10 at 9:56
1  
You should ask this on superuser.com > /etc/init.d/mysql start (i think) –  tinny May 28 '10 at 9:57
    
google, you'll find the answer sooner. –  Sepehr Lajevardi May 28 '10 at 10:07

3 Answers 3

/etc/init.d/mysql start

or

/usr/bin/mysql start
share|improve this answer
    
The daemon is mysqld start or mysqld_safe –  nicorellius May 28 '10 at 16:56

Try this command:

services mysqld start
share|improve this answer
chkconfig --level 345 mysql on

But I'm not really sure whether it starts the daemon, or just sets it to autostart.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.