Detailed installation and use tutorial of mysql 8.0.15 under windows

Detailed installation and use tutorial of mysql 8.0.15 under windows

This article shares with you the detailed installation and use tutorial of MySQL 8.0.15 for your reference. The specific contents are as follows

Install

1. Download zip from the official website

2. Unzip and copy to the specified directory. Create a new data file. Add environment variables

3. Create a new my.ini file

[mysqld]
# Set port 3306 port=3306
# Set the installation directory of mysql basedir=D:\\MySQL\\mysql-8.0.15-winx64
# Set the storage directory of MySQL database data datadir=D:\MySQL\\data
# Maximum number of connections allowed max_connections=200
# The number of connection failures allowed.
max_connect_errors=10
# The default character set used by the server is UTF8
character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB
#Default authentication is done with the "mysql_native_password" plugin #mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
# Set the default character set of the mysql client to default-character-set=utf8
[client]
# Set the default port used by the mysql client to connect to the server port = 3306
default-character-set=utf8

4. The administrator runs the command line window to configure MySQL

Enter the bin directory and execute the command

mysqld --install --console

Then execute <

mysqld --initialize --console

Remember password: kf,aaCx:I6Rq (excluding the first space)

5. Start the mysql service

net start mysql

It says the service name is invalid

mysqld --install --console According to the prompt, the service already exists, but the service name is still invalid. Later, I removed the console parameter and executed

mysql --install

Displays that the service was installed successfully and then started

net start mysql

Startup successful.

(Stop the service: net stop mysql)

6. Start login

mysql -u root -p

Press Enter and enter the default extremely secure password.

Using Database:

use mysql

It will prompt you to reset your password first. implement

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

At this time, the password was changed to 123456.

7. Use database

Encountered this error, Access denied for user 'root'@'localhost' (using password: YES) This login error,

I typed the command wrong.

Refer to the blog post for the solution: Solve the problem of Access denied for user 'root'@'localhost' (using password: YES) in MySQL 8.0 login under win10

8. Create database and table

9. Check the MySQL version

use

1. Start the mysql service

net start mysql

To enable it for administrator

(Stop the service: net stop mysql)

2. Start login

mysql -u root -p

3. Use database

show databases;
use test;
show tables;
quit
net stop mysql

4. Common operations to create a database

create database test;

Create Table

create table student(
 -> id integer,
 -> name varchar(8),
 -> password varchar(20));

Inserting Data

insert into student(id,name,password)
 -> value(1001,"xx",123456);

Select Data

select * from student;

Navicat connects to MySQL

Link: Navicat Premium 12.0

Open exe and create a MySQL connection

The connection success icon is green

Solve the problem of database Can't connect to MySQL server on 'localhost' (10061)

Can't connect to MySQL server on 'localhost' (10061). I don't think I have ever touched it, there is no way, I can't open it.

Open Task Manager -> Click Services -> Find MySQL and right-click to start the service. Wait for a while and reopen the database.

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • MySQL 8.0.15 installation and configuration tutorial under Win10
  • MySQL 8.0.15 download and installation detailed tutorial is a must for novices!
  • MySQL 8.0.15 installation and configuration method graphic tutorial under Windows
  • MySQL 8.0.15 installation and configuration method graphic tutorial
  • MySQL 8.0.15 winx64 decompression version installation and configuration method graphic tutorial
  • MySQL 8.0.15 installation graphic tutorial and database basics
  • MySQL 8.0.15 installation and configuration graphic tutorial
  • MySQL 8.0.15 installation and configuration graphic tutorial under Win10
  • MySQL 8.0.15 installation and configuration graphic tutorial and password change under Linux
  • Installation and configuration of mysql 8.0.15 under Centos7

<<:  Regarding the problem of using webpack instructions in vscode showing "Because running scripts is prohibited in this system" (perfect solution)

>>:  Solution to the problem of Windows Server 2008 r2 server automatically restarting for no reason

Recommend

How to use JavaScript and CSS correctly in XHTML documents

In more and more websites, the use of XHTML is rep...

JavaScript to achieve elastic navigation effect

This article shares the specific code for JavaScr...

Native JS to achieve draggable login box

This article shares a draggable login box impleme...

MySQL Series II Multi-Instance Configuration

Tutorial Series MySQL series: Basic concepts of M...

Perform data statistics on different values ​​of the same field in SQL

Application scenario: It is necessary to count th...

Docker installation and configuration steps for MySQL

Table of contents Preface environment Install Cre...

Solution to MySQL Chinese garbled characters problem

1. The Chinese garbled characters appear in MySQL...

Simple example of adding and removing HTML nodes

Simple example of adding and removing HTML nodes ...

How to configure SSL certificate in nginx to implement https service

In the previous article, after using openssl to g...

MySQL 5.7.11 zip installation and configuration method graphic tutorial

1. Download the MySQL 5.7.11 zip installation pac...

Springboot+Vue-Cropper realizes the effect of avatar cutting and uploading

Use the Vue-Cropper component to upload avatars. ...

How to customize Docker images using Dockerfile

Customizing images using Dockerfile Image customi...

Example analysis of mysql non-primary key self-increment usage

This article uses an example to illustrate the us...

How to generate PDF and download it in Vue front-end

Table of contents 1. Installation and introductio...