我之前应该是装过mysql,忘记为什么删掉了(或者就没装过
然后现在是需要装数据库,之前装 mariadb 不行[见http://www.oschina.net/question/86241_118016],于是试试 mysql 能安装不,结果也是碰到好多错误,记录下来如下。
安装之前先清理:
#清理安装 sudo apt-get purge mysql* mariadb* && apt-get clean && apt-get autoremove #删除 mysql 用户 userdel -r mysql #查找遗留的文件 find / -name mysql* #删除遗留文件 rm -Rf /etc/mysql* /var/lib/mysql* /var/log/mysql* /run/mysql*然后执行安装,报错信息如下:
Unable to set password for the MySQL "root" user .│ .│ An error occurred while setting the password for the MySQL administrative user. .│ This may have happened because the account already has a password, or because .│ of a communication problem with the MySQL server. .│ .│ You should check the account's password after the package installation. .│ .│ Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more .│ information. ┌─────────────────────────┤ Configuring mysql-server-5.5 .│ .│ Unable to set password for the MySQL "root" user .│ .│ An error occurred while setting the password for the MySQL administrative user. .│ This may have happened because the account already has a password, or because .│ of a communication problem with the MySQL server. .│ .│ You should check the account's password after the package installation. .│ .│ Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more .│ information. .│ .│ <Ok> .│ .└───────────────────────────────────────── ─
日志如下:
# sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libdbd-mysql-perl libmariadbclient18 libmysqlclient18 mariadb-common
mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5
mysql-server-core-5.5
Suggested packages:
tinyca mailx
The following NEW packages will be installed:
libdbd-mysql-perl libmariadbclient18 libmysqlclient18 mariadb-common
mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5
mysql-server-core-5.5
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 25.5 MB of archives.
After this operation, 89.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main libdbd-mysql-perl i386 4.020-1build2 [104 kB]
Get:2 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main mysql-common all 5.5.31+maria-1~precise [8,790 B]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-client-core-5.5 i386 5.5.31-0ubuntu0.12.04.2 [1,863 kB]
Get:4 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main mariadb-common all 5.5.31+maria-1~precise [3,272 B]
Get:5 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main libmariadbclient18 i386 5.5.31+maria-1~precise [840 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-client-5.5 i386 5.5.31-0ubuntu0.12.04.2 [8,096 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-server-core-5.5 i386 5.5.31-0ubuntu0.12.04.2 [5,835 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-server-5.5 i386 5.5.31-0ubuntu0.12.04.2 [8,746 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-server all 5.5.31-0ubuntu0.12.04.2 [11.3 kB]
Get:10 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main libmysqlclient18 i386 5.5.31+maria-1~precise [2,932 B]
Fetched 25.5 MB in 13s (1,926 kB/s)
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 89679 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.5.31+maria-1~precise_all.deb) ...
Selecting previously unselected package mariadb-common.
Unpacking mariadb-common (from .../mariadb-common_5.5.31+maria-1~precise_all.deb) ...
Selecting previously unselected package libmariadbclient18.
Unpacking libmariadbclient18 (from .../libmariadbclient18_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package libmysqlclient18.
Unpacking libmysqlclient18 (from .../libmysqlclient18_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.020-1build2_i386.deb) ...
Selecting previously unselected package mysql-client-core-5.5.
Unpacking mysql-client-core-5.5 (from .../mysql-client-core-5.5_5.5.31-0ubuntu0.12.04.2_i386.deb) ...
Selecting previously unselected package mysql-client-5.5.
Unpacking mysql-client-5.5 (from .../mysql-client-5.5_5.5.31-0ubuntu0.12.04.2_i386.deb) ...
Selecting previously unselected package mysql-server-core-5.5.
Unpacking mysql-server-core-5.5 (from .../mysql-server-core-5.5_5.5.31-0ubuntu0.12.04.2_i386.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.5.31+maria-1~precise) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 89873 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.31-0ubuntu0.12.04.2_i386.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.5.31-0ubuntu0.12.04.2_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up mariadb-common (5.5.31+maria-1~precise) ...
Setting up mysql-client-core-5.5 (5.5.31-0ubuntu0.12.04.2) ...
Setting up mysql-server-core-5.5 (5.5.31-0ubuntu0.12.04.2) ...
Setting up libmysqlclient18 (5.5.31+maria-1~precise) ...
Setting up libdbd-mysql-perl (4.020-1build2) ...
Setting up mysql-client-5.5 (5.5.31-0ubuntu0.12.04.2) ...
Setting up mysql-server-5.5 (5.5.31-0ubuntu0.12.04.2) ...
130712 16:08:57 [Note] Plugin 'FEDERATED' is disabled.
130712 16:08:57 InnoDB: The InnoDB memory heap is disabled
130712 16:08:57 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130712 16:08:57 InnoDB: Compressed tables use zlib 1.2.3.4
130712 16:08:57 InnoDB: Initializing buffer pool, size = 256.0M
130712 16:08:58 InnoDB: Completed initialization of buffer pool
130712 16:08:58 InnoDB: highest supported file format is Barracuda.
130712 16:08:58 InnoDB: Waiting for the background threads to start
130712 16:08:59 InnoDB: 5.5.31 started; log sequence number 1595675
130712 16:08:59 [ERROR] /usr/sbin/mysqld: unknown variable 'log_slow_verbosity=query_plan'
130712 16:08:59 [ERROR] Aborting
130712 16:08:59 InnoDB: Starting shutdown...
130712 16:08:59 InnoDB: Shutdown completed; log sequence number 1595675
130712 16:08:59 [Note] /usr/sbin/mysqld: Shutdown complete
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
Setting up libmariadbclient18 (5.5.31+maria-1~precise) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1) 求助啊,应该怎么办啊?我还不想重装系统啊
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
不知道啊~下个压缩包然后自己编译安装试试~??实在不行我再试试这个。谢谢试试这个,有个人跟你的错误一模一样 <arel="nofollow">http://askubuntu.com/questions/253023/unable-to-set-password-for-the-mysql-root-user谢谢,我稍后去试试,最近没法操作我昨天刚给新同事弄环境。开始也是mysql装不上,后来发现原来尝试装过mariadb,不过都没有撞上,然后我就各种卸载,各种重装。最后得出一个道理,就是直接安装mariadb依赖搞不定,要先安装mysql然后再装。mysql装不上就先删掉点关于mysql的残余东西试试吧。呵呵问题是现在mysql都装不上了,头疼