数据库--MySQL之简单操作(一)

登录数据库:

#启动mysql服务
sudo service mysql start

#使用root用户登录
mysql -u root

查看数据库:

#注意不要漏掉分号
mysql> show databases;

连接数据库:

#其中information_schema是数据库名
mysql> use information_schema

查看表:

#注意不要漏掉分号
mysql> show tables

退出使用命令 quit 或者 exit

猜你喜欢

转载自blog.csdn.net/qq_17214501/article/details/81287326
今日推荐