LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-19-2014, 10:21 PM   #1
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
Can not startup mysql db


When I start mysql db , it pops the below error .

Code:
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
then I tried to mysql_upgrade it , but got the following errors.
Code:
mysql_upgrade -uroot -p --force
Enter password: 
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
When I run mysql_upgrade , I found that them mysql.plugin is exist and upgraded.
mysql_upgrade -uroot -p --force
Code:
"
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
"
It is strange that I sure the plugin db is exist , would advise what is the problem and how to fix it ? thanks

Last edited by byran cheung; 06-19-2014 at 10:37 PM.
 
Old 06-20-2014, 02:21 AM   #2
karim.ouda
Member
 
Registered: Jun 2013
Posts: 41

Rep: Reputation: 3
Check the owner of mysql data directory, it should be mysql
Code:
sudo chown mysql:mysql /mysql/data/dir/path
If it does not solve the problem, one reason your my.cnf may be corrupted. Try to restore working my.cnf
Take the backup of my.cnf
Code:
cp /path/of/my.cnf /path/of/my.cnf.bk
Now copy it using by default back up
Code:
cp /path/of/my.cnf.rpmnew /path/of/my.cnf
You can find it in directory /etc or /etc/mysql according to your linux distribution.
 
Old 06-20-2014, 04:05 AM   #3
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by karim.ouda View Post
Check the owner of mysql data directory, it should be mysql
Code:
sudo chown mysql:mysql /mysql/data/dir/path
If it does not solve the problem, one reason your my.cnf may be corrupted. Try to restore working my.cnf
Take the backup of my.cnf
Code:
cp /path/of/my.cnf /path/of/my.cnf.bk
Now copy it using by default back up
Code:
cp /path/of/my.cnf.rpmnew /path/of/my.cnf
You can find it in directory /etc or /etc/mysql according to your linux distribution.
thanks reply,

all the file/directory are mysql:mysql , it should be not related to my problem
 
Old 06-26-2014, 08:18 AM   #4
karim.ouda
Member
 
Registered: Jun 2013
Posts: 41

Rep: Reputation: 3
I hope the data directory is in /var/lib/mysql. Run
Code:
mysql_install_db --user=mysql --ldata=/var/lib/mysql/
and now try to start mysql again.
For more details, read
https://dev.mysql.com/doc/refman/5.0...nstall-db.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Startup thegluups Linux - Software 3 10-16-2011 01:38 PM
Mysql startup problems azeini Linux - Software 1 05-15-2006 10:46 AM
MySql Startup Under FC5 Linux31 Fedora 2 04-20-2006 05:14 PM
mysql startup eyewittness Linux - Software 1 07-23-2005 09:04 AM
I want MySQL to run at startup WorldBuilder Linux - General 12 06-14-2003 01:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration