mysql -uroot -p123456 --连接数据库
update mysql user set authentication_staring=password('123456') where user='root' and Host = 'localhost'; --修改密码
flush privileges; --刷新版权
-----------------------------------------
--所有的语句使用;结尾
show databases; --查看所有的数据库
mysql> use school --切换数据库 use 数据库名
Database changed
show tables;--查看数据库中所有的表
describe student; --显示数据库中所有表的信息
create database westos; --创建一个数据库
exit;--退出连接
--单行注释
基本的命令行操作
最新推荐文章于 2023-09-14 00:06:11 发布