MYSQL操作

Linux 下命令操作

启动:service mysqld start
停止:service mysqld stop
重启:service mysqld restart
查看状态:service mysqld status
查看状态:systemctl status mysqld.service

进入mysql命令行

'''
mysql
'''

查看用户权限

'''
show grants for username@localhost;
'''

show grants for george@%;

CREATE DATABASE 数据库名;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON 数据库名.* TO 数据库名@localhost IDENTIFIED BY '密码';

你可能感兴趣的:(MYSQL操作)