Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
08-12-2013, 01:16 AM
|
#1
|
LQ Newbie
Registered: Aug 2013
Posts: 26
Rep:
|
mysql problem
I'm having a problem with mysql. When I run "rc.mysqld start" it returns:
130811 23:10:10 mysqld_safe Logging to '/var/lib/mysql/server.err'.
130811 23:10:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130811 23:10:12 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
The logfile says:
130811 23:10:12 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
130811 23:10:12 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
The same error arises when I use MariaDB from http://slackbuilds.org.
Any ideas as to what's going on?
Thanks.
|
|
|
08-12-2013, 01:22 AM
|
#2
|
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,300
|
from the top of /etc/rc.d/rc.mysqld
Code:
# Before you can run MySQL, you must have a database. To install an initial
# database, do this as root:
#
# mysql_install_db --user=mysql
|
|
1 members found this post helpful.
|
08-12-2013, 01:29 AM
|
#3
|
LQ Newbie
Registered: Aug 2013
Posts: 26
Original Poster
Rep:
|
Thanks for the help. I can't believe I didn't read that.
|
|
|
08-12-2013, 01:38 AM
|
#4
|
Member
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665
Rep:
|
There should be more lines of error produced with this.
well you can setup this to overcome the error;
Code:
mysql_install_db –user=mysql –ldata=/newlocation/of/your/mysqldata/dir # mostly the location is /var/lib/mysql/ (but may vary)
service mysqld restart # for redhat
|
|
|
08-12-2013, 06:04 PM
|
#5
|
Slackware Contributor
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999
|
Quote:
Originally Posted by skush
Thanks for the help. I can't believe I didn't read that.
|
There is a reason we use the term "README Encrypted" here
|
|
|
03-24-2014, 07:53 PM
|
#6
|
LQ Newbie
Registered: Mar 2014
Distribution: Slackware, Arch
Posts: 28
Rep:
|
I know this is an old post, but I have the same problem and I have ran the command 'mysql_install_db --user=mysql' and I still can't get it to start, and actually it was already running without running that command and all of a sudden it quit. I have even uninstalled mariadb and reinstalled it and even went from Slackware 14.1 to Slackware-current with still no luck, any help would be appreciated
|
|
|
03-24-2014, 08:13 PM
|
#7
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,301
|
With all the reinstalling it is possible that you have overwritten or broken something - never a good idea.
So at this point, how are you trying to start it and what is the actual error you are seeing when you try to start it ("same as the last guy" is a good punchline, but not very helpful here...)?
Last edited by astrogeek; 03-24-2014 at 08:15 PM.
|
|
|
03-24-2014, 09:25 PM
|
#8
|
LQ Newbie
Registered: Mar 2014
Distribution: Slackware, Arch
Posts: 28
Rep:
|
this is the error that I get when I try to run mysql
root@microwave ~ # /etc/rc.d/rc.mysqld start
root@microwave ~ # 140324 22:18:29 mysqld_safe Logging to '/var/lib/mysql/microwave.err'.
140324 22:18:29 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140324 22:18:31 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
|
|
|
03-24-2014, 10:39 PM
|
#9
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,301
|
OK, now lets check the DB directories.
As root, what do these say:
Code:
ls -l /var/lib/ |grep mysql
ls -l /var/lib/mysql/
|
|
|
03-24-2014, 10:43 PM
|
#10
|
LQ Newbie
Registered: Mar 2014
Distribution: Slackware, Arch
Posts: 28
Rep:
|
Code:
root@microwave ~ # ls -l /var/lib/ | grep mysql
drwxr-x--- 5 mysql mysql 4096 Mar 24 22:24 mysql/
root@microwave ~ # ls -l /var/lib/mysql/
total 28776
-rw-rw---- 1 mysql mysql 16384 Mar 24 16:43 aria_log.00000001
-rw-rw---- 1 mysql mysql 52 Mar 24 16:43 aria_log_control
-rw-rw---- 1 mysql mysql 5242880 Mar 24 22:24 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Mar 23 23:38 ib_logfile1
-rw-rw---- 1 mysql mysql 18874368 Mar 24 13:06 ibdata1
-rw-r----- 1 mysql root 66917 Mar 24 22:24 microwave.err
drwx------ 2 mysql root 4096 Mar 24 13:39 mysql/
drwx------ 2 root root 4096 Mar 24 13:43 performance_schema/
drwx------ 2 mysql root 4096 Mar 24 13:39 test/
|
|
|
03-24-2014, 10:48 PM
|
#11
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,301
|
Hmmm... I kind of expected there to be an ownership error, but apparently not...
What does tail /var/lib/mysql/microwave.err say immediately after you try to start it?
|
|
|
03-24-2014, 10:51 PM
|
#12
|
LQ Newbie
Registered: Mar 2014
Distribution: Slackware, Arch
Posts: 28
Rep:
|
Code:
root@microwave ~ # tail /var/lib/mysql/microwave.err
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
140324 23:50:43 InnoDB: Waiting for the background threads to start
140324 23:50:44 Percona XtraDB (http://www.percona.com) 5.5.35-MariaDB-33.0 started; log sequence number 1597945
140324 23:50:44 [Note] Plugin 'FEEDBACK' is disabled.
140324 23:50:44 [ERROR] mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
140324 23:50:44 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
140324 23:50:44 [ERROR] mysqld: Can't find file: './mysql/host.frm' (errno: 13)
140324 23:50:44 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
140324 23:50:44 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
|
|
|
03-24-2014, 10:54 PM
|
#13
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,301
|
For fun, do this:
Code:
chown -R mysql:mysql /var/lib/mysql/performance_schema
|
|
|
03-24-2014, 10:56 PM
|
#14
|
LQ Newbie
Registered: Mar 2014
Distribution: Slackware, Arch
Posts: 28
Rep:
|
just tried and get the same errors, it's actually strange because it use to run and then stopped and this was before the uninstalling and reinstalling and upgrading to current
|
|
|
03-24-2014, 10:59 PM
|
#15
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,301
|
Sorry to do this kind of piece-meal, I am in the middle of something else too...
Try this...
Code:
ls -l /var/lib/mysql/mysql/
...and if everything not owned by mysql:mysql then...
Code:
chown -R mysql:mysql /var/lib/mysql/mysql/*
Also, do you have an /etc/my.cnf file? If so, what is in it?
|
|
|
All times are GMT -5. The time now is 03:32 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|