1.mysql 启动服务提示输入密码

1.解决mysql启动服务过程中一直提示输密码,分析是mysql安装时自动建立的linux user,运行passwd -d mysql后解决,在此记录

root@ubuntu:/etc/init.d# service mysql start
 * A MySQL Server is already started
root@ubuntu:/etc/init.d# service mysql restart
 * Stopping MySQL Community Server 5.7.18
.....
 * MySQL Community Server 5.7.18 is stopped
 * Re-starting MySQL Community Server 5.7.18
[sudo] password for mysql:
Sorry, try again.
[sudo] password for mysql:
Sorry, try again.
[sudo] password for mysql:
Sorry, try again.
sudo: 3 incorrect password attempts
[sudo] password for mysql:
Sorry, try again.
[sudo] password for mysql:
Sorry, try again.
[sudo] password for mysql:
Sorry, try again.
sudo: 3 incorrect password attempts
..
 * MySQL Community Server 5.7.18 is started

  

原文地址:https://www.cnblogs.com/black-/p/8980594.html