MySQL 8.0.12 installation configuration method and password change

MySQL 8.0.12 installation configuration method and password change

This article records the installation and configuration methods of MySQL 8.0.12 for your reference. The specific contents are as follows

1. Download MySQL for Windows from the official website: https://dev.mysql.com/downloads/mysql/

2. Install on the local computer "D:mysql": After decompressing the zip file, copy all the files in the decompressed folder to the mysql folder on the D drive.

3. Create the mysql.ini file and put it in D:mysql file. The file content is:

[mysqld]
# Set port 3306 port=3306
# Set the installation directory of mysql basedir=D:\\mySQL\\mysql 
# Set the storage directory of mysql database data datadir=D:\\mySQL\\mysql\\Data 
# Maximum number of connections allowed max_connections=200
# The number of connection failures allowed is 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
# By default, the "mysql_native_password" plug-in is used for authentication. 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. Open the cmd command line tool as an administrator and switch the directory to: D:\mysql\bin

1) Enter the following installation command mysqld install

2) After successful installation, initialize the data directory using the mysqld --initialize-insecure command

3) Then restart it: net start mysql

4) After successful startup, you need to log in to mysql: mysql -u root -p

At this point, just press Enter to enter without entering a password

5) After successful login, the mysql> logo appears, and then enter "ALTER USER USER() IDENTIFIED BY 'new password';" to change the password.

6) If you cannot enter the MySQL database by pressing Enter in step 4, then:

  • Open the mysql.ini file in the mysql directory, add a line "skip-grant-tables" at the end of the file, save and close the file.
  • Restart the MySQL service.
  • Enter the mysql bin directory through the command line, enter "mysql -u root -p" (without entering a password), and press Enter to enter the database.
  • After changing the password, open the mysql.ini file in the mysql directory, delete the last line of "skip-grant-tables", save and close the file.

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:
  • Detailed explanation of the idea of ​​installing mysql8.0.11 and changing the root password and connecting navicat for mysql
  • How to correctly modify the ROOT password in MySql8.0 and above versions
  • Solve the problem of changing the password when logging in for the first time after installing MySQL 8.0
  • Summary of how to modify the root password in MySQL 5.7 and MySQL 8.0
  • MySQL 8.0.19 winx64 installation tutorial and change the initial password under Windows 10
  • MySQL 8.0.15 installation and configuration graphic tutorial and password change under Linux
  • How to modify the root user password in mysql 8.0.16 winx64 and Linux
  • Problems with changing password and connecting to Navicat when installing and using MySQL 8.0.16 under Windows 7
  • mysql8.0 forgotten password modification and net command service name invalid problem
  • The correct way to change the password in MySQL 8.0

<<:  Native js encapsulation seamless carousel function

>>:  Installing Windows Server 2008 operating system on a virtual machine

Recommend

Implementation of TypeScript in React project

Table of contents 1. Introduction 2. Usage Statel...

Detailed explanation of cocoscreater prefab

Table of contents Prefab How to create a prefab T...

Implementation of CSS border length control function

In the past, when I needed the border length to b...

Teach you how to build Tencent Cloud Server (graphic tutorial)

This article was originally written by blogger We...

Differences in the hr separator between browsers

When making a web page, you sometimes use a dividi...

WeChat applet implements search function and jumps to search results page

Search Page: search.wxml page: <view class=&qu...

Ansible automated operation and maintenance deployment method for Linux system

Ansible is a new automated operation and maintena...

Some experience in building the React Native project framework

React Native is a cross-platform mobile applicati...

Detailed explanation of mixed inheritance in Vue

Table of contents The effect of mixed inheritance...

Use the more, less, and cat commands in Linux to view file contents

In Linux, the commands cat, more, and less can al...

What to do if the online MySQL auto-increment ID is exhausted

Table of contents Table definition auto-increment...

Detailed explanation of Vue filters

<body> <div id="root"> <...

Talk about the understanding of CSS attribute margin

1.What is margin? Margin is used to control the sp...

A preliminary understanding of CSS custom properties

Today, CSS preprocessors are the standard for web...