我无法在 ubuntu 11.04 中启动 mysql

我无法在 ubuntu 11.04 中启动 mysql

我从 Oracle.com 下载了以下文件:

 MySQL-server-5.5.28-1.linux2.6.i386.rpm<br/>
 MySQL-client-5.5.28-1.linux2.6.i386.rpm<br/>
 MySQL-shared-5.5.28-1.linux2.6.i386.rpm<br/>

然后使用“alien -i”命令安装 rpm 包,并在启动 mysql 时出现以下错误:

Starting MySQL<br/>
.... * The server quit without updating PID file (/var/lib/mysql/omid-desktop.pid).

错误日志:

121117 13:21:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
121117 13:21:30 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
121117 13:21:30 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
121117 13:21:30 InnoDB: The InnoDB memory heap is disabled
121117 13:21:30 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
121117 13:21:30 InnoDB: Compressed tables use zlib 1.2.3
121117 13:21:30 InnoDB: Using Linux native AIO
121117 13:21:30 InnoDB: Initializing buffer pool, size = 128.0M
121117 13:21:30 InnoDB: Completed initialization of buffer pool
121117 13:21:30 InnoDB: highest supported file format is Barracuda.
121117 13:21:30  InnoDB: Waiting for the background threads to start
121117 13:21:31 InnoDB: 1.1.8 started; log sequence number 1595675
121117 13:21:31 [Note] Recovering after a crash using mysql-bin
121117 13:21:31 [Note] Starting crash recovery...
121117 13:21:31 [Note] Crash recovery finished.
121117 13:21:31 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
121117 13:21:31 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
121117 13:21:31 [Note] Server socket created on IP: '0.0.0.0'.
121117 13:21:31 [ERROR] Fatal error: Can't open and lock privilege tables: Table  'mysql.host' doesn't exist
121117 13:21:31 mysqld_safe mysqld from pid file /var/lib/mysql/omid-desktop.pid ended
121117 13:25:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
121117 13:25:38 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
121117 13:25:38 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to   create it.
121117 13:25:38 InnoDB: The InnoDB memory heap is disabled
121117 13:25:38 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
121117 13:25:38 InnoDB: Compressed tables use zlib 1.2.3
121117 13:25:38 InnoDB: Using Linux native AIO
121117 13:25:38 InnoDB: Initializing buffer pool, size = 128.0M
121117 13:25:38 InnoDB: Completed initialization of buffer pool
121117 13:25:38 InnoDB: highest supported file format is Barracuda.
121117 13:25:38  InnoDB: Waiting for the background threads to start
121117 13:25:39 InnoDB: 1.1.8 started; log sequence number 1595675
/usr/sbin/mysqld: Too many arguments (first extra is 'start').
Use --verbose --help to get a list of available options
121117 13:25:39 [ERROR] Aborting

121117 13:25:39  InnoDB: Starting shutdown...
121117 13:25:40  InnoDB: Shutdown completed; log sequence number 1595675
121117 13:25:40 [Note] /usr/sbin/mysqld: Shutdown complete

答案1

在用于不同发行版的软件包格式之间进行转换并不是一个完美的过程(而且永远不会),你真的应该尝试使用 Ubuntu(或至少 Debian)软件包。有时,如果你需要比 Ubuntu 存储库中现有的更新版本,你可以在 Debian 中找到它测试不稳定甚至实验系列。

但我首先要尝试的是:

sudo chown -R mysql:mysql /var/lib/mysql

相关内容