新开独立主机的配置
—–远程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=’wordpress’;
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 协议进行授权 | 嗅谱网
转载请注明:转自《新开独立主机的配置》
本文地址:http://www.xiupu.net/archives-561.html
关注公众号:
微信赞赏
支付宝赞赏