Showing posts with label mysql error. Show all posts
Showing posts with label mysql error. Show all posts

Wednesday, May 15, 2013

Mysql error : start: Job failed to start

start: Job failed to start Error while starting mysql 

If you are not able to start mysql because of this error, try following solutions.

Solutions :

1) There should not be incorrect bind-address in my.cnf. If you have not uncommented it intentionally to enable binding, the line should be commented. If you are not sure about the address, comment the line and restart mysql.

2) Run following command and try to start mysql.
$ sudo dpkg-reconfigure mysql-server-5.5

3) Remove logfiles and try to start mysql.
$ sudo rm -rf /var/lib/mysql/ib_logfile*

4) If mysqld_safe is running with mysql, kill mysqld_safe
$ sudo killall -9 mysqld_safe

5) If any of these solutions are not working for you, try final solution.
    Remove and re-install mysql again.
Debian based :
$ sudo apt-get --purge remove mysql-server mysql-common mysql-client $ sudo apt-get install mysql-server mysql-common mysql-client
Yum Based :
$ sudo yum --purge remove mysql-server mysql-common mysql-client $ sudo yum install mysql-server mysql-common mysql-client

Saturday, April 13, 2013

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

phpMyAdmin is giving error
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

Probably there are two mysql running. Open the terminal and run
$ service mysql stop
or
$ service mysqld stop
(according to your Linux distribution)
Now restart lampp and try to open phpMyAdmin.

Make sure you have following code in your /opt/lampp/phpmyadmin/config.inc.php
$cfg['Servers'][$i]['connect_type'] = 'tcp';
If not, add above line in config.inc.php and Restart mysql.

If you are still facing the problem. Add this line in your config.inc.php too.
$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
and Restart mysql.

If you are still facing the problem, Make following changes in your config.inc.php

change 
$cfg['Servers'][$i]['host'] = 'localhost';
to 
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Now restart mysql and open phpmyadmin.

If you are still facing the problem, check permission of the file /opt/lampp/phpmyadmin/config.inc.php, it should not be less than 755.
Set it to 755.
Run following command.
$ sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php
Now restart LAMPP and try to open phpmyadmin again.
http://localhost/phpmyadmin

XAMPP: Couldn't start MySQL

Remove Error : XAMPP: Couldn't start MySQL

Run following commands in terminal
$ sudo chown -hR root /opt/lampp $ sudo chmod -R 777 /opt/lampp $ sudo /opt/lampp/lampp restart
After running above commands when you try to start XAMPP and it gives following error :

"Warning: World-writable config file ‘/opt/lampp/etc/my.cnf’ is ignored"

To Remove above error, Run following command in terminal
$ sudo chmod 755 /opt/lampp/etc/my.cnf

After running above command when you try to start XAMPP again and it gives following error :

Wrong permissions on configuration file, should not be world writable!

To Remove above error, Run following command in terminal
$ sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php