MySQL说:用户'root'@'localhost'的访问被拒绝(使用密码:NO). [英] MySQL said: Access denied for user 'root'@'localhost' (using password: NO)"
问题描述
我正在尝试使用Sequel Pro创建数据库,并且不断出现错误由于访问被拒绝而无法连接到主机.
I am trying to create a database with Sequel Pro and it keeps coming up with an error "Unable to connect to host because access was denied.
仔细检查您的用户名和密码,并确保允许从您当前的位置进行访问.
Double-check your username and password and ensure that access from your current location is permitted.
MySQL说:用户'root'@'localhost'的访问被拒绝(使用密码:NO)"
MySQL said: Access denied for user 'root'@'localhost' (using password: NO)"
我的Mac上运行了mySQL服务器.不知道我在做什么错.任何帮助将不胜感激.
I have mySQL server running on my Mac. Not sure what I am doing wrong. Any help would be appreciated.
推荐答案
较新版本的MySQL在设置后使用临时密码,您可以使用mysqladmin将其设置为永久密码.
Newer versions of MySQL use a temporary password after setup, and you can use mysqladmin to set it to something permanent.
mysqladmin -u root -p password
这篇关于MySQL说:用户'root'@'localhost'的访问被拒绝(使用密码:NO).的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!