安装后mysql启动失败
lnmpa安装后mysql启动提示 MySQL is not running, but lock file (/var/lock/subsys/mysql不知道是什么原因。 求大神帮忙解答下。万分感谢!
[ 本帖最后由 wanchuan666 于 2015-7-4 19:22 编辑 ] rm -f /var/lock/subsys/mysql
后重启试试,还是不行就需要按反馈必须提供mysql日志信息
提示信息
rm -f /var/lock/subsys/mysql后重启 依然提示Starting MySQL.The server quit without updating PID file (/mnt/mysql/VM_45_67_centos.pid).
mysql 日志文件在哪目录? 没有找到啊 置顶帖有说明 我也是这样:lol 军哥啥意思?我的错误是啥错误啊? 没解决啊 150703 14:00:37 Starting crash recovery...
150703 14:00:37 Crash recovery finished.
150703 14:00:37 Server hostname (bind-address): '0.0.0.0'; port: 3306
150703 14:00:37 - '0.0.0.0' resolves to '0.0.0.0';
150703 14:00:37 Server socket created on IP: '0.0.0.0'.
150703 14:00:37 /usr/local/mysql/bin/mysqld: Incorrect information in file: './mysql/proxies_priv.frm'
150703 14:00:37 Fatal error: Can't open and lock privilege tables: Incorrect information in file: './mysql/proxies_priv.frm'
150703 14:00:37 mysqld_safe mysqld from pid file /usr/local/mysql/var/VM_45_67_centos.pid ended
150703 14:08:42 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
150703 14:08:42 InnoDB: The InnoDB memory heap is disabled
150703 14:08:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150703 14:08:42 InnoDB: Compressed tables use zlib 1.2.3
150703 14:08:42 InnoDB: Initializing buffer pool, size = 16.0M
150703 14:08:42 InnoDB: Completed initialization of buffer pool
150703 14:08:42 InnoDB: highest supported file format is Barracuda.
150703 14:08:42InnoDB: Waiting for the background threads to start
150703 14:08:43 InnoDB: 5.5.42 started; log sequence number 1626024
150703 14:08:43 Recovering after a crash using mysql-bin
150703 14:08:43 Starting crash recovery...
150703 14:08:43 Crash recovery finished.
150703 14:08:43 Server hostname (bind-address): '0.0.0.0'; port: 3306
150703 14:08:43 - '0.0.0.0' resolves to '0.0.0.0';
150703 14:08:43 Server socket created on IP: '0.0.0.0'.
150703 14:08:43 /usr/local/mysql/bin/mysqld: Incorrect information in file: './mysql/proxies_priv.frm'
150703 14:08:43 Fatal error: Can't open and lock privilege tables: Incorrect information in file: './mysql/proxies_priv.frm'
150703 14:08:43 mysqld_safe mysqld from pid file /usr/local/mysql/var/VM_45_67_centos.pid ended 这个是 VM_45_67_centos.pid 提示的内容。里面有error错误,但不明白啥意思。
回复 2# 的帖子
操作后重启lnmp,貌似mysql就启动正常了 chown mysql:mysql /usr/local/mysql/var/usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql 看一下这个报错不
后再重启mysql看看 提示错误
# /usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql
Installing MySQL system tables...
150705 21:18:38 /usr/local/mysql/bin/mysqld: Incorrect information in file: './mysql/tables_priv.frm'
ERROR: 1033Incorrect information in file: './mysql/tables_priv.frm'
150705 21:18:38 Aborting
150705 21:18:38 /usr/local/mysql/bin/mysqld: Shutdown complete
Installation of system tables failed!Examine the logs in
/usr/local/mysql/var for more information.
You can try to start the mysqld daemon with:
shell> /usr/local/mysql/bin/mysqld --skip-grant &
and use the command line tool /usr/local/mysql/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/local/mysql/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths.Using --log
gives you a log in /usr/local/mysql/var that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before submitting a bug report
at http://bugs.mysql.com/
# 重启服务器 启动mysql 提示
150703 14:08:43 mysqld_safe mysqld from pid file /usr/local/mysql/var/VM_45_67_centos.pid ended
150705 21:24:26 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
150705 21:24:26 InnoDB: The InnoDB memory heap is disabled
150705 21:24:26 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150705 21:24:26 InnoDB: Compressed tables use zlib 1.2.3
150705 21:24:26 InnoDB: Initializing buffer pool, size = 16.0M
150705 21:24:26 InnoDB: Completed initialization of buffer pool
150705 21:24:26 InnoDB: highest supported file format is Barracuda.
150705 21:24:27InnoDB: Waiting for the background threads to start
150705 21:24:28 InnoDB: 5.5.42 started; log sequence number 1626024
150705 21:24:28 Server hostname (bind-address): '0.0.0.0'; port: 3306
150705 21:24:28 - '0.0.0.0' resolves to '0.0.0.0';
150705 21:24:28 Server socket created on IP: '0.0.0.0'.
150705 21:24:28 /usr/local/mysql/bin/mysqld: Incorrect information in file: './mysql/proxies_priv.frm'
150705 21:24:28 Fatal error: Can't open and lock privilege tables: Incorrect information in file: './mysql/proxies_priv.frm'
150705 21:24:28 mysqld_safe mysqld from pid file /usr/local/mysql/var/VM_45_67_centos.pid ended 是否已经 chown mysql:mysql /usr/local/mysql/var ?
可以尝试使用/usr/local/mysql/bin/myisamchk -r /usr/local/mysql/var/mysql/tables_priv.frm 进行修复试试
或/usr/local/mysql/bin/mysql_upgrade -u root -p 我重装的 1.1版本 竟然行了,可能 1.2版本还不稳定的原因吧
页:
[1]