- 连接数据库
mysql -uroot -p123456
update mysql.user set authentication_string=password('123456') where user='root' and Host = 'localhost'
------修改用户信息flush privileges;
–----- 刷新权限show databases;
–----- 查看所有的数据库
- 所有的语句分号结尾,否则不生效;退出当前语句ctrl+c
use school;
–----- 切换数据库
show tables;
–----- 查看数据库中所有的表
describe student;
–----- 显示数据库中所有的表的详细信息
create database yangyangyang;
------创建数据库表
exit;
------退出命令行
MySQL------命令行连接数据库 及简单操作
猜你喜欢
转载自blog.csdn.net/y18791050779/article/details/104820428
今日推荐
周排行