Ask Your Question

mysql failed to start while installing keystone in vagrant VM

asked 2013-11-18 16:41:09 -0500

Arash gravatar image

updated 2013-11-20 13:15:18 -0500

smaffulli gravatar image

I am installing keystone in a VM configured by vagrant. I am following the instruction and when I do sudo service mysql restart mysql first goes to stop/waiting mode and then mysql it fails to start. Any idea what could be wrong??

I checked the log file, it complain about another mysqld listening on prot 3306, I checked for it, and no other mysqld exists. Even I changed the port from 3306 to 1036 and still the same message in the log file!!

The bind address is which is an interface configured in Vagrant file, and port number is 3306. The error.log contains:

131119 14:51:33 [Note] Server hostname (bind-address): ''; port: 3306 
131119 14:51:33 [Note] - '' resolves to ''; 
131119 14:51:33 [Note] Server socket created on IP: ''. 
131119 14:51:33 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address 
131119 14:51:33 [ERROR] Do you already have another mysqld server running on port: 3306 ? 
131119 14:51:33 [ERROR] Aborting

Checking running processes and listening ports:

vagrant@controller:~$ netstat -paln|grep :3306 (No info could be read for "-p": geteuid()=1000 but you should be root.) 
tcp 0 0* LISTEN -

vagrant@controller:~$ ps awux|grep mysql 
mysql 6686 0.0 2.1 623800 44292 ? Ssl 16:38 0:00 /usr/sbin/mysqld vagrant 6855 0.0 0.0 11676 936 pts/0 S+ 16:56 0:00 grep --color=auto mysql

and from MySQL log:

131120 16:38:31 InnoDB: 5.5.34 started; log sequence number 1595675 
131120 16:38:31 [Note] Server hostname (bind-address): ''; port: 3306 131120 16:38:31 [Note] - '' resolves to ''; 
131120 16:38:31 [Note] Server socket created on IP: ''. 
131120 16:38:31 [Note] Event Scheduler: Loaded 0 events 
131120 16:38:31 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.5.34-0ubuntu0.12.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
edit retag flag offensive close merge delete


you may have another service running on 3306, not a mysqld. Check with netstat -nta if that port is open/listening and maybe try to telnet to it to see who responds

smaffulli gravatar imagesmaffulli ( 2013-11-19 18:54:44 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2013-11-27 03:01:30 -0500

Vinoth gravatar image

updated 2013-11-27 05:53:08 -0500

Crosscheck whether hosts entry is correct with appropriate server settings.

edit flag offensive delete link more

answered 2013-11-18 23:36:30 -0500

dheeru gravatar image

updated 2013-11-20 13:17:09 -0500

smaffulli gravatar image

if it complains about the port, it must be the issue with binding port and IP address. what is the bind address you are configuring ? Hope it is resolvable local IP address and correct port number. I don't see any other reason than this.

Also can you paste exact error in error.log ?

if you want to change the bind address other than local address, see the /etc/mysql/my.cnf and look for bind_address. Change to your appropriate IP address. Restart the mysql service mysql restart. Do let me know if you need any help.

edit flag offensive delete link more


it's a lot better if you edit your original question adding more details than to add details in a comment.

smaffulli gravatar imagesmaffulli ( 2013-11-19 18:53:08 -0500 )edit

Can you paste the output of netstat -paln|grep :3306 and ps awux|grep mysql Also paste the output of your mysql log

Mridhul gravatar imageMridhul ( 2013-11-20 07:26:03 -0500 )edit

By looking at the logs here it is up and running. Do you see issue ?

dheeru gravatar imagedheeru ( 2013-11-20 11:03:02 -0500 )edit

131120 16:38:31 [Note] Server hostname (bind-address): ''; port: 3306 131120 16:38:31 [Note] - '' resolves to ''; Above log file clearly indicates that MySQL is already started with 3306 and IP as I think vagrant is trying to start this again with 3306 131119 14:51:33 [Note] Server hostname (bind-address): ''; port: 3306 You will surely hit this. Why you are trying to start the mysql twice ? Hope your issue is resolved.

dheeru gravatar imagedheeru ( 2013-11-20 22:36:36 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2013-11-18 16:41:09 -0500

Seen: 986 times

Last updated: Nov 27 '13