List:General Discussion« Previous MessageNext Message »
From:JD Date:January 28 2009 12:47am
Subject:Re: Mysqld fails to start
View as plain text  
I did the chmod. Then
# ls -latrR /var/lib/mysql
/var/lib/mysql:
total 20548K
drwxrwxr-x  2 mysql mysql     4096 2007-12-15 15:36 test/
-rw-rw-r--  1 mysql mysql  5242880 2007-12-15 15:36 ib_logfile1
drwxrwxr-x  2 mysql mysql     4096 2007-12-15 16:10 ampache/
drwxrwxr-x  2 mysql mysql     4096 2009-01-21 14:12 mysql/
drwxr-xr-x 53 root  root      4096 2009-01-27 14:14 ../
srwxrwxrwx  1 mysql mysql        0 2009-01-27 16:35 mysql.sock=
-rw-rw-r--  1 mysql mysql  5242880 2009-01-27 16:35 ib_logfile0
-rw-rw-r--  1 mysql mysql 10485760 2009-01-27 16:35 ibdata1
drwxrwxr-x  5 mysql mysql     4096 2009-01-27 16:35 ./

/var/lib/mysql/test:
total 12K
drwxrwxr-x 2 mysql mysql 4096 2007-12-15 15:36 ./
drwxrwxr-x 5 mysql mysql 4096 2009-01-27 16:35 ../

/var/lib/mysql/ampache:
total 16K
-rw-rw-r-- 1 mysql mysql   65 2007-12-15 16:10 db.opt
drwxrwxr-x 2 mysql mysql 4096 2007-12-15 16:10 ./
drwxrwxr-x 5 mysql mysql 4096 2009-01-27 16:35 ../

/var/lib/mysql/mysql:
total 788K
-rw-rw-r-- 1 mysql mysql  10330 2007-12-15 15:36 user.frm
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 
time_zone_transition_type.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 
time_zone_transition_type.MYD
-rw-rw-r-- 1 mysql mysql   8748 2007-12-15 15:36 
time_zone_transition_type.frm
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 time_zone_transition.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 time_zone_transition.MYD
-rw-rw-r-- 1 mysql mysql   8686 2007-12-15 15:36 time_zone_transition.frm
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 time_zone_name.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 time_zone_name.MYD
-rw-rw-r-- 1 mysql mysql   8606 2007-12-15 15:36 time_zone_name.frm
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 time_zone.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 time_zone.MYD
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 time_zone_leap_second.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 time_zone_leap_second.MYD
-rw-rw-r-- 1 mysql mysql   8624 2007-12-15 15:36 time_zone_leap_second.frm
-rw-rw-r-- 1 mysql mysql   8636 2007-12-15 15:36 time_zone.frm
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 tables_priv.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 tables_priv.MYD
-rw-rw-r-- 1 mysql mysql   8947 2007-12-15 15:36 tables_priv.frm
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 procs_priv.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 procs_priv.MYD
-rw-rw-r-- 1 mysql mysql   8875 2007-12-15 15:36 procs_priv.frm
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 proc.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 proc.MYD
-rw-rw-r-- 1 mysql mysql   9691 2007-12-15 15:36 proc.frm
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 host.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 host.MYD
-rw-rw-r-- 1 mysql mysql   9416 2007-12-15 15:36 host.frm
-rw-rw-r-- 1 mysql mysql  17408 2007-12-15 15:36 help_topic.MYI
-rw-rw-r-- 1 mysql mysql 333276 2007-12-15 15:36 help_topic.MYD
-rw-rw-r-- 1 mysql mysql   8770 2007-12-15 15:36 help_topic.frm
-rw-rw-r-- 1 mysql mysql  15360 2007-12-15 15:36 help_relation.MYI
-rw-rw-r-- 1 mysql mysql   7281 2007-12-15 15:36 help_relation.MYD
-rw-rw-r-- 1 mysql mysql   8630 2007-12-15 15:36 help_relation.frm
-rw-rw-r-- 1 mysql mysql  14336 2007-12-15 15:36 help_keyword.MYI
-rw-rw-r-- 1 mysql mysql  77815 2007-12-15 15:36 help_keyword.MYD
-rw-rw-r-- 1 mysql mysql   8612 2007-12-15 15:36 help_keyword.frm
-rw-rw-r-- 1 mysql mysql   3072 2007-12-15 15:36 help_category.MYI
-rw-rw-r-- 1 mysql mysql  20916 2007-12-15 15:36 help_category.MYD
-rw-rw-r-- 1 mysql mysql   8700 2007-12-15 15:36 help_category.frm
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 func.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 func.MYD
-rw-rw-r-- 1 mysql mysql   8665 2007-12-15 15:36 func.frm
-rw-rw-r-- 1 mysql mysql   9494 2007-12-15 15:36 db.frm
-rw-rw-r-- 1 mysql mysql   1024 2007-12-15 15:36 columns_priv.MYI
-rw-rw-r-- 1 mysql mysql      0 2007-12-15 15:36 columns_priv.MYD
-rw-rw-r-- 1 mysql mysql   8820 2007-12-15 15:36 columns_priv.frm
-rw-rw-r-- 1 mysql mysql    256 2007-12-15 16:10 user.MYD
-rw-rw-r-- 1 mysql mysql   1314 2007-12-15 16:10 db.MYD
-rw-rw-r-- 1 mysql mysql   2048 2007-12-17 00:03 user.MYI
-rw-rw-r-- 1 mysql mysql   4096 2007-12-17 00:03 db.MYI
drwxrwxr-x 2 mysql mysql   4096 2009-01-21 14:12 ./
-rw-rw---- 1 mysql mysql  12288 2009-01-21 14:12 .swp
drwxrwxr-x 5 mysql mysql   4096 2009-01-27 16:35 ../


I restarted mysqld (service mysqld restart) and this is
what got written in the mysql.log


090127 16:40:09 mysqld_safe Starting mysqld daemon with databases from 
/var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
090127 16:40:09 [ERROR] Can't open the mysql.plugin table. Please run 
mysql_upgrade to create it.
090127 16:40:09  InnoDB: Started; log sequence number 0 43655
090127 16:40:09 [ERROR] Can't open and lock privilege tables: Table 
'mysql.servers' doesn't exist
090127 16:40:09 [ERROR] Column count of mysql.db is wrong. Expected 22, 
found 20. Created with MySQL 50045, now running 50130. Please use 
mysql_upgrade to fix this error.
090127 16:40:09 [ERROR] mysql.user has no `Event_priv` column at position 29
090127 16:40:09 [ERROR] Cannot open mysql.event
090127 16:40:09 [ERROR] Event Scheduler: An error occurred when 
initializing system tables. Disabling the Event Scheduler.
090127 16:40:09 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.30'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  
MySQL Community Server (GPL) by Remi

So, I ssh'ed into localhost as user mysql and ran the command 
mysql_upgrade, and it belched out:

-bash-3.2$ id
uid=27(mysql) gid=27(mysql) groups=27(mysql)
-bash-3.2$ mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck'...
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' 
(using password: NO) when trying to connect
FATAL ERROR: Upgrade failed

I dont get it. I ssh'ed into localhost as follows:
ssh mysql@localhost
Why does it think I am root??



Walter Heck wrote:
> Ah, try this:
>
> "chmod ug+rw ibdata1" and the same for your iblogfile0 and iblogfile1 files..
>
> Walter
>
> OlinData: Professional services for MySQL
> Support * Consulting * Administration
> http://www.olindata.com
>
>
>
> On Wed, Jan 28, 2009 at 12:48 AM, JD <jd1008@stripped> wrote:
>   
>> ls -altr /var/lib/mysql
>>     
>
>   

Thread
Mysqld fails to startJD27 Jan
  • Re: Mysqld fails to startBaron Schwartz27 Jan
    • Re: Mysqld fails to startJD27 Jan
  • Re: Mysqld fails to startAndy Shellam27 Jan
    • Re: Mysqld fails to startJD27 Jan
      • Re: Mysqld fails to startClaudio Nanni27 Jan
        • Re: Mysqld fails to startJD28 Jan
          • Re: Mysqld fails to startWalter Heck28 Jan
            • Re: Mysqld fails to startJD28 Jan
          • Re: Mysqld fails to startClaudio Nanni28 Jan
            • Re: Mysqld fails to startJD28 Jan
  • Re: Mysqld fails to startMark Goodge27 Jan
Re: Mysqld fails to startJD28 Jan
  • Re: Mysqld fails to startWalter Heck28 Jan
    • Re: Mysqld fails to startJD28 Jan
      • Re: Mysqld fails to startWalter Heck28 Jan
    • Re: Mysqld fails to startJD28 Jan