在 ubuntu 10.04 上安装 mysql 服务器

在 ubuntu 10.04 上安装 mysql 服务器

我每次尝试都会遇到同样的问题:

Selecting previously deselected package mysql-server-core-5.1.  
(Reading database ... 242369 files and directories currently installed.)  
Unpacking mysql-server-core-5.1 (from .../mysql-server-core-5.1_5.1.41-  3ubuntu12.10_i386.deb) ...  
Selecting previously deselected package mysql-server-5.1.  
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.41-3ubuntu12.10_i386.deb) ...  
Selecting previously deselected package libhtml-template-perl.  
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.9-1_all.deb) ...  
Selecting previously deselected package mysql-server.  
Unpacking mysql-server (from .../mysql-server_5.1.41-3ubuntu12.10_all.deb) ...  
Processing triggers for man-db ...  
Processing triggers for ureadahead ...  
ureadahead will be reprofiled on next reboot  
Setting up mysql-server-core-5.1 (5.1.41-3ubuntu12.10) ...  
Setting up mysql-server-5.1 (5.1.41-3ubuntu12.10) ...  

它就挂在那里。这次我把它放了一夜,12 小时后它还在那里。

我错过了什么?

答案1

看起来它可能在提示你输入 mysql root 密码时失败了。尝试

export DEBIAN_FRONTEND=noninteractive
apt-get -q -y install mysql-server-5.1

然后使用以下命令设置 mysql root 密码

mysqladmin -u root password NEWPASSWORD

答案2

我遇到的一篇涉及 mysql 安装的帖子是

http://onaxer.com/blog/blog/2011/03/08/install-mysql-5-5-on-ubuntu/

相关内容