虚拟机默认启动Mysql,发现没有启动得了,于是,看了下Mysql的启动日志,如下:
1.120617 22:54:57 mysqld_safe Starting mysqld daemon with databases from /data0/data
2.120617 22:54:57 [Warning] option 'innodb-buffer-pool-size': signed value 2097152 adjusted to 5242880
3.120617 22:54:57 [Note] Plugin 'InnoDB' is disabled.
4.^G/usr/local/webserver/mysql/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
5.120617 22:54:57 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
6.^G/usr/local/webserver/mysql/bin/mysqld: File '/data0/data/slow_query_log/mysql-slow.log' not found (Errcode: 13)
解决办法:
这主要是没有权限读取,给个权限就OK了
1: 初始化数据库做了没有?
/usr/local/mysql/bin/mysqld_install_db --user=mysql
2:权限问题
chown -R root.mysql /usr/local/mysql/
chown -R mysql /usr/local.mysql/var/
调整lib库路径:
echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
重新加载配置
ldconfig
启动mysql
/usr/local/mysql/bin/mysql_safe --user=mysql &
查看是否启动了
netstat -ntpl | grep 3306
posted on 2013-08-25 17:40
回忆之城 阅读(7616)
评论(0) 编辑 收藏 引用 所属分类:
数据库