MySQL Daemon failed to start.
# /etc/rc.d/init.d/mysqld start
MySQL Daemon failed to start.
mysqld を起動中: [失敗]
仮想マシン上に予備サーバのMySQLの構築中に蹴躓いた。
どこで失敗したのか分からないけど、/etc/rc.d/init.d/mysqld startで起動しなかったので、代替え案のメモを書いておく。
# /usr/bin/mysql_install_db Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h lv73.net password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script! # chown -R mysql:mysql /var/lib/mysql/* # chmod 755 /var/lib/mysql/*
実機サーバでは/usr/bin/mysql_install_dbでデータベースの初期化なぞせずに一発だったんだけどなぁ。
以下、/var/log/mysqld.log。
120808 22:47:17 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql /usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist 120808 22:47:17 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 120808 22:47:17 InnoDB: Initializing buffer pool, size = 8.0M 120808 22:47:17 InnoDB: Completed initialization of buffer pool InnoDB: Log scan progressed past the checkpoint lsn 0 37356 120808 22:47:17 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... InnoDB: Doing recovery: scanned up to log sequence number 0 44233 120808 22:47:17 InnoDB: Starting an apply batch of log records to the database... InnoDB: Progress in percents: 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Apply batch completed 120808 22:47:18 InnoDB: Started; log sequence number 0 44233 120808 22:47:18 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 120808 22:47:18 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended