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

Detailed process of installing and configuring MySQL and Navicat prenium

Prerequisite: Mac, zsh installed, mysql downloade...

Summary of js execution context and scope

Table of contents Preface text 1. Concepts relate...

javascript to switch pictures by clicking a button

This article example shares the specific code of ...

Summary of MySQL database like statement wildcard fuzzy query

MySQL error: Parameter index out of range (1 >...

JavaScript implements click to change the image shape (transform application)

JavaScript clicks to change the shape of the pict...

Understand CSS3 Grid layout in 10 minutes

Basic Introduction In the previous article, we in...

Getting Started: A brief introduction to HTML's basic tags and attributes

HTML is made up of tags and attributes, which are...

How to ensure that every page of WeChat Mini Program is logged in

Table of contents status quo Solution Further sol...

HTML5+CSS3 header creation example and update

Last time, we came up with two header layouts, on...

The difference between ID and Name attributes of HTML elements

Today I am a little confused about <a href=&quo...

Teach you how to implement Vue3 Reactivity

Table of contents Preface start A little thought ...

Vue implements various ideas for detecting sensitive word filtering components

Table of contents Written in front Requirements A...

Vue sample code for online preview of office files

I'm working on electronic archives recently, ...

Solution to 404 Problem of Tomcat Installation in Docker

Find the containerID of tomcat and enter the toma...