Basic knowledge of MySQL learning notes

Basic knowledge of MySQL learning notes

View Database

show databases;

Create a database

create DATABASE database name

create DATABASE databasetest;

Select Database

use database name

use databasetest;
------------
Database changed; switch successful

View the current database name

SELECT DATABASE();

Deleting a Database

drop DATABASE database name

drop DATABASE databasetest;

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
--------------

You may also be interested in:
  • Detailed explanation of transaction isolation levels in MySql study notes
  • MySQL learning notes help document
  • MySQL learning notes: data engine
  • MySQL learning notes: how to add, delete and modify data
  • MySQL learning notes: how to create, delete, and modify tables
  • Summary of MySQL learning notes
  • A summary of MySQL study notes of 1,000 lines
  • MySQL Learning Notes 5: Modify Table (alter table)
  • MySQL Learning Notes 4: Integrity Constraint Restriction Fields
  • MySQL Learning Notes 1: Installation and Login (Multiple Methods)
  • Complete MySQL Learning Notes

<<:  A brief discussion on MySQL temporary tables and derived tables

>>:  Detailed explanation of using tcpdump command to capture and analyze data packets in Linux

Recommend

XHTML Web Page Tutorial

This article is mainly to let beginners understan...

CSS3 realizes the mask barrage function

Recently I saw a barrage effect on B station call...

Summary of 7 reasons why Docker is not suitable for deploying databases

Docker has been very popular in the past two year...

Detailed explanation of MySQL data rows and row overflow mechanism

1. What are the formats of lines? You can see you...

How to let https website send referrer https and http jump referrer

This article describes a proposal for a metadata ...

Some problems you may encounter when installing MySQL

Question 1: When entering net start mysql during ...

Introduction and use of triggers and cursors in MySQL

Trigger Introduction A trigger is a special store...

How to remove the underline of a hyperlink using three simple examples

To remove the underline of a hyperlink, you need t...

How to use limit_req_zone in Nginx to limit the access to the same IP

Nginx can use the limit_req_zone directive of the...

Front-end state management (Part 2)

Table of contents 1. Redux 1.1. Store (librarian)...

How to configure static network connection in Linux

Configuring network connectivity for Linux system...

CSS3 flip card number sample code

I received a task from the company today, and the...

Two solutions for automatically adding 0 to js regular format date and time

Table of contents background Solution 1 Ideas: Co...