我正在尝试运行 mysql 但出现此错误并且我不知道该怎么做。是否有更多错误日志可供我找到更多信息?
/usr/local/mysql/bin# ./mysqld
150321 15:35:20 [ERROR] Can't find messagefile '/usr/share/mysql/english/errmsg.sys'
150321 15:35:20 [Note] Plugin 'FEDERATED' is disabled.
./mysqld: Unknown error 1146
150321 15:35:20 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
150321 15:35:20 InnoDB: The InnoDB memory heap is disabled
150321 15:35:20 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150321 15:35:20 InnoDB: Compressed tables use zlib 1.2.3
150321 15:35:20 InnoDB: Using Linux native AIO
150321 15:35:20 InnoDB: Initializing buffer pool, size = 128.0M
150321 15:35:20 InnoDB: Completed initialization of buffer pool
150321 15:35:20 InnoDB: highest supported file format is Barracuda.
150321 15:35:20 InnoDB: Waiting for the background threads to start
150321 15:35:21 InnoDB: 1.1.5 started; log sequence number 1595675
150321 15:35:21 [ERROR] Aborting
150321 15:35:21 InnoDB: Starting shutdown...
150321 15:35:22 InnoDB: Shutdown completed; log sequence number 1595675
我不知道它是怎么发生的,但是:1) mysqld 没有使用 /etc/mysql/my.cnf 文件。
2) 我在机器上找不到任何其他 my.cnf 文件。
3) 所以我改变了 /etc/mysql/my.cnf 指向我的数据文件
4)我为套接字创建了一个符号链接:
ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
5)然后我运行守护进程:
/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/mysql/my.cnf