我并没有改密码,怎么进不去了mysql

hotenM 2002-10-16 07:07:05
刚装好的系统

[root@dbserver bin]# ./mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 3.22.29

Type 'help' for help.

mysql>
//可以进去
mysql> GRANT ALL PRIVILEGES ON *.* to 'root'@'localhost' identified by ''
-> ;
Query OK, 0 rows affected (0.00 sec)
mysql>exit

root@dbserver bin]# mysql
ash: mysql: command not found
root@dbserver bin]# ./mysql -u root -p
nter password:
RROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

//现在怎么进不去了,是不是我执行的那步不小心改了密码
...全文
387 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ckc 2002-10-18
  • 打赏
  • 举报
回复
把mysqld kill掉
然后加参数--skip-grant-tables启动mysqld
就可以连上数据库操作了
记得改完密码后去掉参数重启。
royalier 2002-10-17
  • 打赏
  • 举报
回复
简单啦,直接使用./mysql进去不就完了
yu_dx 2002-10-17
  • 打赏
  • 举报
回复
将MYSQL服务重起
shuixin13 2002-10-17
  • 打赏
  • 举报
回复
MySQL安装完后应该还有一个UserName为空,PassWord为空的超级用户,
你用./mysql再试试呢,

57,065

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧