新开独立主机的配置

—–远程db管理配置

[root@tomrrow ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10818
Server version: 5.5.40 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;' or ‘\h' for help. Type ‘\c' to clear the current input statement.

mysql> create user ‘test'@'%' identified by ‘`sdfsdfsd';
Query OK, 0 rows affected (0.03 sec)

mysql> grant all on *.* to ‘test'@'%';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on *.* to ‘test'@'%' identified by ‘sdfsdfsd' with grant option ;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

—修改用户密码
[root@tomrrow ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10971
Server version: 5.5.40 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;' or ‘\h' for help. Type ‘\c' to clear the current input statement.

mysql> use mysql;
Database changed
mysql> update user set password=password(‘sdfddd') where user='';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

—修改root密码
[root@tomrrow ~]# mysqladmin -u root -pwqewq password 883kkiiidsf -h localhost

声明: 除非转自他站(如有侵权,请联系处理)外,本文采用 BY-NC-SA 协议进行授权 | 智乐兔
转载请注明:转自《新开独立主机的配置
本文地址:https://www.zhiletu.com/archives-561.html
关注公众号:智乐兔

赞赏

wechat pay微信赞赏alipay pay支付宝赞赏

上一篇
下一篇

相关文章

在线留言

你必须 登录后 才能留言!

在线客服
在线客服 X

售前: 点击这里给我发消息
售后: 点击这里给我发消息

智乐兔官微