繁体   English   中英

mysql:无法为MySQL“ root”用户设置密码

[英]mysql : Unable to set password for the MySQL “root” user

我尝试通过网络上的许多指南在Ubuntu 14.4 Server上安装MySQL。 但是在MySQL安装过程中通过各种方式都遇到了这个问题:

Setting up libdbd-mysql-perl (4.025-1) ...
Setting up mysql-client-5.6 (5.6.31-0ubuntu0.14.04.2) ...
Setting up mysql-server-5.6 (5.6.31-0ubuntu0.14.04.2) ...
2016-08-28 10:45:19 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-08-28 10:45:19 0 [Note] /usr/sbin/mysqld (mysqld 5.6.31-0ubuntu0.14.04.2-log) starting as process 4394 ...
2016-08-28 10:45:19 4394 [Warning] Using unique option prefix myisam_recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
2016-08-28 10:45:19 4394 [Note] Plugin 'FEDERATED' is disabled.
2016-08-28 10:45:19 4394 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-08-28 10:45:19 4394 [Note] InnoDB: The InnoDB memory heap is disabled
2016-08-28 10:45:19 4394 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-08-28 10:45:19 4394 [Note] InnoDB: Memory barrier is not used
2016-08-28 10:45:19 4394 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-08-28 10:45:19 4394 [Note] InnoDB: Using Linux native AIO
2016-08-28 10:45:19 4394 [Note] InnoDB: Using CPU crc32 instructions
2016-08-28 10:45:19 4394 [Note] InnoDB: Initializing buffer pool, size = 256.0M
2016-08-28 10:45:19 4394 [Note] InnoDB: Completed initialization of buffer pool
2016-08-28 10:45:19 4394 [Note] InnoDB: Highest supported file format is Barracuda.
2016-08-28 10:45:19 4394 [Note] InnoDB: 128 rollback segment(s) are active.
2016-08-28 10:45:19 4394 [Note] InnoDB: Waiting for purge to start
2016-08-28 10:45:19 4394 [Note] InnoDB: 5.6.31 started; log sequence number 2535999
2016-08-28 10:45:19 4394 [ERROR] /usr/sbin/mysqld: unknown variable 'log_slow_verbosity=query_plan'
2016-08-28 10:45:19 4394 [ERROR] Aborting
2016-08-28 10:45:19 4394 [Note] Binlog end
2016-08-28 10:45:19 4394 [Note] InnoDB: FTS optimize thread exiting.
2016-08-28 10:45:19 4394 [Note] InnoDB: Starting shutdown...
2016-08-28 10:45:21 4394 [Note] InnoDB: Shutdown completed; log sequence number 2536009
2016-08-28 10:45:21 4394 [Note] /usr/sbin/mysqld: Shutdown complete
Package configuration

然后显示此错误:

设置MySQL管理用户的密码时发生错误。 这可能是由于该帐户已经有密码,或者是由于与MySQL服务器的通讯问题而发生的。

安装软件包后,您应该检查帐户的密码。 请阅读/usr/share/doc/mysql-server-5.6/README.Debian文件以获取更多信息。

尝试了很多东西。 检查了错误日志vim /var/log/mysql/error.log,并发现了/ tmp文件夹权限的问题。 将权限更改为777,已卸载然后重新安装。 奇迹般有效

也许,由于进行了后续教程,您弄乱了配置文件。

我建议您完成卸载程序包

apt-get remove --purge mysql-server
apt-get remove --purge mysql-common

然后确保/etc/mysql/my.cnf不存在。 然后重新安装

apt-get install mysql-server

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM