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

Implementation of Vue large file upload and breakpoint resumable upload

Table of contents 2 solutions for file upload Bas...

JavaScript implements double-ended queue

This article example shares the specific code of ...

MySQL database SELECT query expression analysis

A large part of data management is searching, and...

Detailed explanation of docker network bidirectional connection

View Docker Network docker network ls [root@maste...

Detailed explanation of CSS3 to achieve responsive accordion effect

I recently watched a video of a foreign guy using...

A magical MySQL deadlock troubleshooting record

background Speaking of MySQL deadlock, I have wri...

Web Design Tutorial (7): Improving Web Design Efficiency

<br />Previous article: Web Design Tutorial ...

CenterOS7 installation and configuration environment jdk1.8 tutorial

1. Uninstall the JDK that comes with centeros fir...

Example of how to implement keepalived+nginx high availability

1. Introduction to keepalived Keepalived was orig...

JavaScript to achieve the effect of tab bar switching

Tab bar: Click different tabs to display differen...

How to use & and nohup in the background of Linux

When we work in a terminal or console, we may not...