mysql 安装的几个问题及解决
昨天装的mysql,因为没有时间,几个问题也没有解决。因为原先有安装旧版本的rpm包,只卸载了server包,再,原来的数据及配置仍在,日志如下:
1227 16:42:59 InnoDB: Starting shutdown...
041227 16:43:00 InnoDB: Shutdown completed; log sequence number 0 43634
041227 16:43:00 [Note] /usr/libexec/mysqld: Shutdown complete
041227 16:43:00 mysqld ended
041228 13:30:17 mysqld started
041228 13:30:18 InnoDB: Started; log sequence number 0 43634
041228 13:30:18 [Warning] mysql.user table is not updated to new password format ; Disabling new password usage until mysql_fix_privilege_tables is run
041228 13:30:18 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/time_zone _leap_second.frm' (errno: 13)
041228 13:30:18 [Warning] Can't open and lock time zone table: Can't find file: './mysql/time_zone_leap_second.frm' (errno: 13) trying to live without them
/usr/libexec/mysqld: ready for connections.
Version: '4.1.7' socket: '/tmp/mysql.sock' port: 3306 Source distribution
041228 13:31:30 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/help_cate gory.frm' (errno: 13)
041228 13:31:30 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/help_keyw ord.frm' (errno: 13)
041228 13:31:30 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/help_rela tion.frm' (errno: 13)
041228 13:31:30 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/help_topi c.frm' (errno: 13)
041228 13:31:30 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/time_zone .frm' (errno: 13)
041228 13:31:30 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/time_zone _leap_second.frm' (errno: 13)
041228 13:31:30 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/time_zone _name.frm' (errno: 13)
041228 13:31:30 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/time_zone _transition.frm' (errno: 13)
041228 13:31:30 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/time_zone _transition_type.frm' (errno: 13)
041228 13:31:59 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/time_zone .frm' (errno: 13)
多次运行mysql_install_db及mysql_create_system_database都没有解决。今天一气之下,make uninstall了。并且,删除原来的配置文件/etc/my.cnf,以及数据目录/var/lib/mysql/,重新make install。运行了mysql_install_db及mysql_create_system_database之后,出现041228 17:53:31 InnoDB: Started; log sequence number 0 43634
041228 17:53:31 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)041228 17:53:31 [ERROR] Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
041228 17:53:31 mysqld ended
的错误,查看数据目录存在表格host.frm,发现属主为root且其他人没有读权限,chown mysql.mysql host.frm后,该错误消除,但出现类似的错误,把该目录全部chown 之后,问题解决。