RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
Mysql登录出错userroot@localhost(usingpassword:NO)

环境:redhat 5.7 安装了MySQL 5.0
安装完mysql之后启动成功,但是使用mysql -uroot -p登录是,密码错误,确定没有设置过密码
出错提示:Access denied for user 'root'@'localhost' (using password : No)
解决办法如下:

10年积累的成都网站建设、成都网站制作经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站制作后付款的网站建设流程,更有霞浦免费网站建设让你可以放心的选择与我们合作。

1.先关闭mysql服务
xiaopeng# /etc/init.d/mysqld stop
2.输入操作命令
xiaopeng# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3.连接mysql
xiaopeng# mysql -uroot mysql
mysql> update user set Password=PASSWORD('newpassword') where USER='root';
mysql> flush PRIVILEGES;
mysql> quit
4.重启mysql服务
xiaopeng# /etc/init.d/mysqld restart
xiaopeng# mysql -uroot -p
Enter password:

更多资源请访问www.arppinging.com


分享标题:Mysql登录出错userroot@localhost(usingpassword:NO)
转载来于:http://scyingshan.cn/article/ppsjhi.html