标签:div bsp int 查看 登录 span 操作 create mysql
启动/关闭MYSQL数据库服务:
net start/stop mysql
登录数据库:mysql -h[IP] -u[用户名] -p[密码]
例如:登录本地数据库 mysql -hlocalhost -uroot -p123456
查看数据库:show databases;
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | | testdb | +--------------------+ 4 rows in set (0.00 sec) mysql>
创建数据库:create database [库名];
mysql> create database TestDB; Query OK, 1 row affected (0.00 sec) mysql>
切换/使用数据库:use [库名]
mysql> use testdb; Database changed
创建数据库的数据表:
create table Student ( ID varchar(50), Name varchar(50), Age int );
查看数据的数据表:show tables;
mysql> show tables; +------------------+ | Tables_in_testdb | +------------------+ | student | +------------------+ 1 row in set (0.00 sec) mysql>
标签:div bsp int 查看 登录 span 操作 create mysql
原文地址:https://www.cnblogs.com/no-end-to-learning/p/11719170.html