好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

MySQL数据库常用命令行操作

建立 数据库 databasetest create database databasetest;

添加用户 grant all on 数据库名.* to 用户名@localhost identified by ‘密码’; grant all on databasetest.* to newuser@localhost identified by ‘password’;

说明: (1)grant all 赋予所有的权限 (2)databasetest.* 数据库 databasetest 中所有的表 (3)newuser 用户名 (4)@localhost 在本地电脑上的 mysql server 服务器 (5)identfified by ‘password’ 设置密码

删除用户 use mysql mysql>Delete FROM user Where User=]xxxxx] and Host=]localhost]; mysql>flush privileges;

修改密码 mysqladmin -u root -p password mypasswd

查看更多关于MySQL数据库常用命令行操作的详细内容...

  阅读:43次