Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本地mysql客户端连接centos的数据库(2017.10.01) #7

Open
aermin opened this issue Feb 13, 2018 · 0 comments
Open

本地mysql客户端连接centos的数据库(2017.10.01) #7

aermin opened this issue Feb 13, 2018 · 0 comments

Comments

@aermin
Copy link
Owner

aermin commented Feb 13, 2018

最近觉得用终端修改centos数据库有点麻烦,所以用本地mysql客户端可视化

进入centos的数据库

mysql -u root -h localhost -p

使用数据库

use mysql;

赋予远程权限

GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

让权限立即生效

flush privileges;

--解释
其中root表示用户名,%表示所有的电脑都可以连接,也可以设置某个ip地址运行连接,password表示密码

然后在本地的mysql客户端连接

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant