首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何创建可以连接的用户?

问如何创建可以连接的用户?
EN

Stack Overflow用户
提问于 2020-08-12 00:47:59
回答 1查看 47关注 0票数 0

这里是MySQL新手

我已经在我的Windows10机器上安装了MySQL,可以使用根用户名使用MySQL工作台进行连接,一切都如我所承诺的那样工作。

但是,现在我想创建另一个用户进行连接,并只授予该用户对服务器上一个数据库的访问权限。

我已经使用以下命令创建了用户:

代码语言:javascript
复制
CREATE USER 'user'@'localhost' IDENTIFIED BY 'f^rest_of_password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'user'@'localhost';
FLUSH PRIVILEGES;

我使用以下命令创建了数据库:

代码语言:javascript
复制
CREATE DATABASE wordpress

因此,现在我尝试使用该用户和密码在MySQL工作台中创建连接,但失败了。错误消息显示:

代码语言:javascript
复制
Cannot Connect to Database Server

Your connection attempt failed for user 'user' to the MySQL server at localhost:3306

Please:
1 Check that MySQL is running on address localhost
2 Check that MySQL is reachable on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the user user has rights to connect to loclahost from your address (MySQL rights define what clients can connect to the server and from which machines)
4 Make sure you are both providing a password if needed and using the correct password for loclahost connecting from the host address you're connecting from

我的下一步是什么?

谢谢,欧文

EN

回答 1

Stack Overflow用户

发布于 2020-08-12 00:57:15

只要我发了一个问题...

原来我需要指定自定义的“安装类型”、mysqld的“配置文件部分”和MySQL80的"Windows服务名称“

(最终复制工作根连接并更改用户名和密码)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63362750

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档