Home > Database > Mysql Tutorial > Detailed explanation of the basic knowledge of mysql learning

Detailed explanation of the basic knowledge of mysql learning

黄舟
Release: 2017-03-25 14:05:49
Original
952 people have browsed it

This article is the first article in the MySQL study notes series. I will give you a brief explanation of some MySQL check operation commands. I hope you will like it

View the database

show databases;
Copy after login

Create database

create DATABASE 数据库名称
create DATABASE databasetest;
Copy after login

Select database

use database name

use databasetest;
------------
Database changed;切换成功
Copy after login

View current database Name

SELECT DATABASE();
Copy after login

Delete database

drop DATABASE 数据库名称
drop DATABASE databasetest;
Copy after login

Database status

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
--------------
Copy after login

The above is the detailed content of Detailed explanation of the basic knowledge of mysql learning. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template