guipf2017
deepin
2018-06-04 19:43 1. mysql是如何安装的,假定$mysql是你的安装路径, $mysql/bin/mysql -u root -p
2. 如果上一步执行没问题,执行: ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';flush privileges;
2. 如果上一步执行没问题,执行: ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';flush privileges;
Reply Like 0 View the author


中文 

安装mysql之后打算打开看看
输入sudo mysqladmin start之后提示输入密码
密码输入之后提示:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
搜索了网上的一些方法:
deepin@DESKTOP-D5SKB0B:~/Desktop$ mysql -uroot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
deepin@DESKTOP-D5SKB0B:~/Desktop$ sudo cat /root/.mysql_secret
cat: /root/.mysql_secret: 没有那个文件或目录
deepin@DESKTOP-D5SKB0B:~/Desktop$ alter user 'root'@'localhost' identified by
bash: alter: 未找到命令
deepin@DESKTOP-D5SKB0B:~/Desktop$ sudo /etc/init.d/mysqld start
sudo: /etc/init.d/mysqld:找不到命令
deepin@DESKTOP-D5SKB0B:~/Desktop$ mysql: mysql -uroot -p
bash: mysql:: 未找到命令
都没有用
有大佬知道怎么回事吗