MySQL 说:访问被拒绝用户 'root'@'localhost'(使用密码:否)"

问题描述:

我正在尝试使用 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