1. Download the installation package The installation package is now at: https://dev.mysql.com/downloads/mysql/ 2. Unzip to the installation directory Unzip the downloaded zip. The installation path I use here is: C:\Program Files\mysql-8.0.18-winx64 After decompression, you need to manually create the data folder and my.ini file in the installation path 3. Configure the my.ini file Edit the contents of the my.ini file [mysqld] # Set port 3306 port=3306 # Set the mysql installation directory basedir=C:\Program Files\mysql-8.0.18-winx64 # Set the storage directory of mysql database data datadir=C:\Program Files\mysql-8.0.18-winx64\data # Maximum number of connections allowed max_connections=200 # The number of connection failures allowed. This is to prevent someone from trying to attack the database system from this host 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 Tips: Remember that the my.ini file format must be in ANSI format, otherwise this error will be reported.
4. Initialize and start the mysql service Run the cmd command as an administrator. Enter the C:\Program Files\mysql-8.0.18-winx64 directory --Initialize, the database password will be printed, remember the password, you will use it later mysqld --initialize --console --Here MySql8 is the name of the service. You can leave it blank or name a service yourself mysqld --install localmysql --Here is the name of the startup service, which is the name just named net start localmysql --Log in to the database, then you will be asked to enter the password mysql -u root -p --The password is too hard to remember, change it to: 123456 set password for root@localhost='123456'; --Show all databases show databases; The initial password is the following string. 5. Installation Verification verify 1. There is a mysql process in the process verify 2. Use navicat to connect to the database 6. Create a database and run the specified sql file mysql -u root -p create database rexel_hzzg; Execute sql file Execute outside of mysql console C:\Program Files\mysql-8.0.18-winx64\bin>mysql -uroot -p123456 -Drexel_hzzg<D:\rexel\sql\rexel_hzzg.sql 7. Stop the mysql process Method 1: Method 2: Summarize The above is the tutorial for installing mysql-8.0.18-winx64 under Windows introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Nginx+FastDFS to build an image server
>>: Summary of constructor and super knowledge points in react components
1. Search mysql in the browser to download and in...
What is JDK? Well, if you don't know this que...
Table of contents 1. Introduction 2. Code Impleme...
Nginx has taken over the majority of the Web serv...
Database transaction isolation level There are 4 ...
Preface This article introduces the fifth questio...
Table of contents 1. Front-end control 1. In the ...
Table of contents Browser kernel JavaScript Engin...
Table of contents 1. Use in components 2. Option ...
How to shorten the page rendering time on the bro...
1. MySql Architecture Before introducing the stor...
Table of contents MySql8.0 View transaction isola...
Preface Vuex allows us to define "getters&qu...
Development Trends: html (Hypertext Markup Languag...
like LIKE requires the entire data to match, whil...