Difference between revisions of "Troubleshooting:MySQL will not start"

From MythTV Official Wiki
Jump to: navigation, search
(Identify Problem)
Line 12: Line 12:
 
==Identify Problem==
 
==Identify Problem==
 
What does the log say?
 
What does the log say?
* [[Troubleshooting:InnoDB Logfile Size Error|InnoDB: Error: log file ./ib_logfile0 is of different size 0 8388608 bytes than specified in the .cnf file 0 5242880 bytes!]]
+
* [[Troubleshooting:InnoDB Logfile Size Error|InnoDB: Error: log file ./ib_logfile0 is of different size 0 8388608 bytes than specified in the .cnf file 0 5242880 bytes]]
 +
* [[Troubleshooting:Unable to bind|Error messages like this ]]
 +
070521 19:35:14 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address<br />
 +
070521 19:35:14 [ERROR] Do you already have another mysqld server running on port: 3306 ?<br />
 +
070521 19:35:14 [ERROR] Aborting<br />
 +
Resolution:<br />
 +
make sure that you have 127.0.0.1 ip address and nothing is running on port 3306<br />
 +
To make sure you have 127.0.0.1 ip, type:<br />
 +
ifconfig lo<br />
 +
if it does not display 127.0.0.1 IP then execute this:<br />
 +
ifconfig lo 127.0.0.1<br />
 +
To make sure that nothing is running on 3306<br />
 +
netstat -lntp | grep 3306<br />
 +
You should not get any output.<br />
 
* [add other results here]
 
* [add other results here]
  

Revision as of 23:48, 21 May 2007

Check Assumptions

Verify that MySQL is not running

gentoo# /etc/init.d/mysql start

#ps -aef|grep mysql
root     13817 13519  0 08:30 pts/1    00:00:00 grep mysql

Review Evidence

Investigate the logs

gentoo# less /var/log/mysql/mysqld.err

Identify Problem

What does the log say?

070521 19:35:14 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
070521 19:35:14 [ERROR] Do you already have another mysqld server running on port: 3306 ?
070521 19:35:14 [ERROR] Aborting
Resolution:
make sure that you have 127.0.0.1 ip address and nothing is running on port 3306
To make sure you have 127.0.0.1 ip, type:
ifconfig lo
if it does not display 127.0.0.1 IP then execute this:
ifconfig lo 127.0.0.1
To make sure that nothing is running on 3306
netstat -lntp | grep 3306
You should not get any output.

  • [add other results here]

Verify Resolution

gentoo# /etc/init.d/mysql restart
:
# ps -aef|grep mysql
mysql    15475     1  0 08:46 ?        00:00:00 /usr/sbin/mysqld --defaults-  file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock
:

Success!