一、连接数据库
命令行连接
mysql -uroot -p --连接数据库
updat mysql user set authentication_string=password('11111') where user='root' and Host ='localhost'; --修改用户密码为11111
flush privileges; --刷新权限
--所有的语句都使用;结尾
show databases;--查看所有的数据库
mysql> use school --切换数据库 use 数据库名
show tables; --查看数据库中所有的表
describe student; --查看数据库中所有表的信息 describe 表名
creat database westos;--创建一个数据库名为westos
exit;