[root@test root]# mysql mysql -uroot -p新密码 Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 to server version: 3.22.27
[root@test root]# mysqladmin -uroot -p密码 drop 数据库名称
说明:用法与上述新增数据库方式一样。
关闭MySQL服务:
[root@test root]# mysqladmin -uroot -p密码 shutdown
五、基本用法:
增加新的MySQL使用者:(方法一) (1)开启mysql数据库
[root@test root]# mysql mysql -uroot -p密码 Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 to server version: 3.22.27
Type 'help' for help.
mysql>
(2)增加一个新账号,并设定权限
mysql> insert into user values ('host','user',password('密码'),'y','y','y','y','y','y','y','y','y','y','y','y','y','y');