Detailed explanation of MySQL 8.0.18 commands

Detailed explanation of MySQL 8.0.18 commands

Open the folder C:\web\mysql-8.0.11 that you just unzipped, create a my.ini configuration file in the folder, and edit my.ini to configure the following basic information:

[client]
# Set the default character set of the mysql client to default-character-set=utf8
[mysqld]
# Set port 3306 port = 3306
#Set the installation directory of mysql basedir=C:\\web\\mysql-8.0.11
#Set the storage directory of the MySQL database data. MySQL 8+ does not require the following configuration, the system can generate it by itself, otherwise an error may be reported # datadir=C:\\web\\sqldata
# Maximum number of connections allowed max_connections=20
# The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB

Open the cmd command line tool as an administrator (failure to open it as an administrator will cause the database installation to fail later) and switch directories:

cd C:\web\mysql-8.0.11\bin

Initialize the database:

mysqld --initialize --console
//Remember the APWCY5ws&hjQ after root@localhost. APWCY5ws&hjQ is the initial password. You will need it for subsequent logins. You can also change the password after logging in.

Enter the following installation command:

mysqld install

To start, enter the following command:

net start mysql

Log in to MySQL:

mysql -u root -p

Then enter your login password.

To change your password:

ALTER USER 'root'@'localhost' identified by '123';

Create the database:

create database 創建的數據庫名稱;

Switch database:

use 數據庫名;

Delete the database:

drop database 數據庫名;

Exit MySQL:

quit

Summarize

The above is the MySQL 8.0.18 command that I introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • MySQL 8 new features: detailed explanation of persistence of auto-increment primary key
  • Detailed explanation of common commands in MySQL 8.0+
  • MySQL 8.0 new features: support for atomic DDL statements
  • MySQL 8.0 DDL atomicity feature and implementation principle
  • Mysql8.0 uses window functions to solve sorting problems
  • MySQL 8.0.18 adds users to the database and grants permissions
  • How to correctly modify the ROOT password in MySql8.0 and above versions
  • mysql8 Common Table Expression CTE usage example analysis

<<:  Introduction to Nginx regular expression related parameters and rules

>>:  Native JS to implement real-time clock

Recommend

MySQL briefly understands how "order by" works

For sorting, order by is a keyword we use very fr...

A simple way to put HTML footer at the bottom of the page

Requirement: Sometimes, when the page content is ...

JavaScript+html to implement front-end page sliding verification

This article shares the specific code of JavaScri...

Summary of JavaScript's setTimeout() usage

Table of contents 1. Introduction 2. The differen...

Detailed description of common events and methods of html text

Event Description onactivate: Fired when the objec...

Useful codes for web page creation

<br />How can I remove the scroll bar on the...

Use of Vue filters and custom instructions

Table of contents Filters 01.What is 02. How to d...

Query the data of the day before the current time interval in MySQL

1. Background In actual projects, we will encount...

Vue implements three-dimensional column chart based on echarts

The three-dimensional column chart consists of th...

Detailed explanation of the difference between $router and $route in Vue

We usually use routing in vue projects, and vue-r...

Detailed explanation of redundant and duplicate indexes in MySQL

MySQL allows you to create multiple indexes on th...

How to install phabricator using Docker

I am using the Ubuntu 16.04 system here. Installa...

Example of using CSS3 to customize the style of input multiple-select box

Principle: First hide the input element, then use...

Improvements to the web server to improve website performance

<br />In the first section of this series, w...