ubuntu 12.04 lts 安装 Mysql 报错,求助?报错-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

ubuntu 12.04 lts 安装 Mysql 报错,求助?报错

2020-06-22 18:25:31 565 1

我之前应该是装过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)
求助啊,应该怎么办啊?我还不想重装系统啊

取消 提交回答
全部回答(1)
  • 爱吃鱼的程序员
    2020-06-22 18:25:49

    不知道啊~下个压缩包然后自己编译安装试试~??实在不行我再试试这个。谢谢试试这个,有个人跟你的错误一模一样 <arel="nofollow">http://askubuntu.com/questions/253023/unable-to-set-password-for-the-mysql-root-user谢谢,我稍后去试试,最近没法操作我昨天刚给新同事弄环境。开始也是mysql装不上,后来发现原来尝试装过mariadb,不过都没有撞上,然后我就各种卸载,各种重装。最后得出一个道理,就是直接安装mariadb依赖搞不定,要先安装mysql然后再装。mysql装不上就先删掉点关于mysql的残余东西试试吧。呵呵问题是现在mysql都装不上了,头疼

    0 0
相关问答

1

回答

【RDS】RDS MySQL如何终止会话?

2022-01-12 16:17:02 460浏览量 回答数 1

1

回答

RDS MySQL如何终止会话?

2022-01-07 14:15:23 881浏览量 回答数 1

0

回答

rds恢复到本地mysql报系统变量未知

2019-03-11 15:21:19 447浏览量 回答数 0

1

回答

RDS mysql是否允许续费降配

2019-02-21 15:11:20 308浏览量 回答数 1

3

回答

请问可以用RDS构建mysql集群么,如果不能,怎么用阿里云服务器构建集群

2019-02-21 12:18:56 870浏览量 回答数 3

3

回答

RDS数据库mysql,远程连接报错ERROR 2013 (HY000): Lost connection to MySQL server during query

2019-02-19 15:05:13 6730浏览量 回答数 3

2

回答

已购买的RDS,数据库类型是MySQL,可以换成Postgresql吗

2019-02-19 13:20:05 1189浏览量 回答数 2

1

回答

RDS for MYSQL权限问题

2019-02-18 11:40:07 385浏览量 回答数 1

0

回答

外网云主机无法连接rds mysql root账号

2019-01-31 22:21:00 506浏览量 回答数 0

1

回答

PG上查询 mysql fdw 的表,表在阿里云rds MYSQL上 , 逻辑是将mysql 的表select 过来,insert 到本地表中.

2019-01-27 17:38:05 2789浏览量 回答数 1
+关注
爱吃鱼的程序员
https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
2
文章
21564
问答
问答排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载