我和这个人有同样的问题 服务器故障链接但这个解决方案对我来说完全不起作用。我第一次无法启动mysql5.5。第一次启动mysql时
cd /usr/local ; /usr/local/bin/mysqld_safe &
其他尝试切换 ->
--user=mysql --socket=/var/run/mysql/mysql.sock
我已使用以下命令重新安装了数据库:
mysql_install_db --user=mysql --basedir=/usr/local --datadir=/var/db/mysql
我已使用各种可能的组合重新安装,但始终出现同样的错误
150309 06:20:27 mysqld_safe Starting mysqld daemon with databases from /usr/local/bin/data/mysql
150309 6:20:27 [Note] Plugin 'InnoDB' is disabled.
/usr/local/libexec/mysqld: Table 'mysql.plugin' doesn't exist
150309 6:20:27 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
150309 6:20:27 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150309 6:20:27 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150309 6:20:27 [Note] Server socket created on IP: '0.0.0.0'.
150309 6:20:27 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
150309 06:20:27 mysqld_safe mysqld from pid file /usr/local/bin/data/mysql/yoda.com.pid ended
我的数据目录/上的权限是:
[\u@yoda:/usr/local] # ls -l /usr/local/bin/data
total 110700
-rw-rw---- 1 root wheel 50331648 Mar 8 19:50 ib_logfile0
-rw-rw---- 1 root wheel 50331648 Mar 8 19:50 ib_logfile1
-rw-rw---- 1 root wheel 12582912 Mar 8 19:50 ibdata1
drwxrwxr-x 2 mysql mysql 512 Mar 9 06:20 mysql
drwx------ 2 root wheel 2560 Mar 8 19:50 performance_schema
drwx------ 2 root wheel 512 Mar 8 19:50 test
[\u@yoda:/usr/local] # ls -l /usr/local/bin/data/mysql/
total 8
-rw-r----- 1 mysql mysql 4632 Mar 9 06:20 yoda.com.err
[\u@yoda:/usr/local] # ls -l /var/db/
total 1776
drwxr-xr-x 5 mysql mysql 512 Mar 9 04:44 mysql
[\u@yoda:/usr/local] # ls -l /var/db/mysql/
total 12436
-rw-rw---- 1 mysql mysql 12582912 Mar 8 11:37 ibdata1
drwx------ 2 mysql mysql 2048 Mar 9 04:02 mysql
drwx------ 2 mysql mysql 1024 Mar 9 04:44 performance_schema
drwx------ 2 mysql mysql 512 Mar 8 11:43 test
-rw-r----- 1 mysql mysql 104477 Mar 9 03:56 yoda.com.err
如何在 FreeBSD 上启动 mysql?