美文网首页
mysql 命令

mysql 命令

作者: Newzer | 来源:发表于2023-06-04 10:59 被阅读0次

开机与关机
mysql.server start
mysql.server status
chkconfig --add mysqld 加入自启动列表
chkconfig --list 查看自启动列表
mysql.server stop
mysqladmin -uroot -ppass shutdown

连接相关
create user 'chen1'@'localhost' identified by 'pass' 创建本地连接用户chen,密码为pass
create user 'chen2'@'%' identified by 'pass' 创建远程用户
alter user 'chen1'@'localhost' identified by 'pass2' 修改密码为pass2
grant all on . to 'chen1'@'localhost' 授权
flush privileges 刷新

基本操作
create database db1
use db1
show databases
drop database db2

相关文章

网友评论

      本文标题:mysql 命令

      本文链接:https://www.haomeiwen.com/subject/nzdbedtx.html