mysql学习笔记之基础知识
程序员文章站
2023-11-17 14:44:04
查看数据库
show databases;
创建数据库
create database 数据库名称
create database databasetest...
查看数据库
show databases;
创建数据库
create database 数据库名称
create database databasetest;
选择数据库
use 数据库名称
use databasetest;
------------
database changed;切换成功
查看当前数据库名称
select database();
删除数据库
drop database 数据库名称
drop database databasetest;
数据库状态
status; -------------- mysql ver 14.14 distrib 5.7.17, for win64 (x86_64) connection id: 5 current database: current user: root@localhost ssl: not in use using delimiter: ; server version: 5.7.17-log mysql community server (gpl) protocol version: 10 connection: 127.0.0.1 via tcp/ip server characterset: utf8 db characterset: utf8 client characterset: gbk conn. characterset: gbk tcp port: 3306 uptime: 2 hours 25 min 34 sec threads: 2 questions: 57 slow queries: 0 opens: 114 flush tables: 1 open tables: 107 queries per second avg: 0.006 --------------
上一篇: C#运算符重载用法实例分析