MySQL8.0 version installation tutorial

These days environment is configured to engage a variety of crazy, query a lot of information, but also considered a little experience, for Mysql installation, and problems may arise made solutions.

I am here talking about the zip installation tutorial.

Mysql installation address: https://www.mysql.com/ either directly Baidu search Mysql .

1 , after entering the official website of the interface are:

 

 

 

 

 2, to find the lowest turn Downloads , select MySQL Community Server

 

 

 3, click in, select the first zip download

 

 

 

 4. Click to select the following no thanks ...

 

 

 After 5 download is a zip archive file: mysql-8.0.18-winx64.zip, then this file to decompress it, then unpack, I unzip the file in the C: \ Program Files in

 

 

 6, set the environment variable

Right after opening My Computer and select Properties

Then select Advanced System Settings

 

 

 7、

 

8, create a new system variable

 

 

 

 9, the variable named MYSQL_HOME, the variable value C: \ Program Files \ mysql-8.0.18-winx64 (path to your own installation package)

 

 

 10, PATH system variable to add% MYSQL_HOME% \ bin, we must remember that after the addition of "OK" or else he will not be saved, after also points out to determine

 

 

 

 

 

 

 11, the configuration of the environment, in mysql-8.0.11-winx64 folder below to create a new my.ini file (zip because the latest version is no my.ini file needs to their new one) and paste the following into my.ini file

[mysql]
# mysql client to set the default character set
default-Character-the SET utf8 =
[mysqld]
# set port 3306
Port = 3306
# Set the mysql installation directory
basedir = D: \ mysql-8.0.17-Winx64
# Set mysql database data storage directory
DATADIR = D: \ MySQL-8.0.17-Winx64 \ data
# maximum number of connections
max_connections = 200 is
# character set used by the server defaults to the 8-bit coded character set latin1
character-set-server = utf8
# will be used when you create a new default storage engine table
default-storage-engine = INNODB

12, where the basedir = D: \ mysql-8.0.17-winx64, datadir = D: \ mysql-8.0.17-winx64 \ path data into two paths of their line of the zip

13. It should be noted that some tutorials may make you if there is no data to create a new folder in the data folder mysql-8.0.17-winx64 root directory, which is a problem, and so will use the command line when you install Mysql You will not find the initial login password, personal experience, toss me a long time, in fact, you input mysqld --initialize when initialization mysql command will automatically create a new data folder.

14, as administrator cmd to open a command window, type: cd C: \ Program Files \ mysql-8.0.18-winx64 \ bin into under your bin directory and enter the mysqld --initialize command to initialize the data mysql data directory, initialized after, it will generate a directory in the decompressed data folder, there is a .err file ending in this folder, there will be randomly generated password after opening. As shown below

 

 15. The use Notepad to open, find this an A temporary password is generated for root @ localhost: goeT / zsgK64_, goeT / zsgK64_ is the beginning of a password, remember to use the sign in the back

 

 

16, followed by input mysqld -install serving add

  • Enter net start mysql start the service
  •  Enter mysql -u root -p log database, you are prompted for a password, and then log in with a password that is above you

  • Change Password statement: ALTER USER root @ localhost IDENTIFIED BY '123456'; modify the password is: 123456
  • To delete mysql, executable command mysqld --remove mysql

17, if you do not find the original password or forgotten password

MySQL version can read this blog before 8.0 https://blog.csdn.net/lina_999/article/details/87797322

After MySQL version 8.0 is https://blog.csdn.net/q283614346/article/details/90732968

18, start the MySQL error: ERROR 2003 (HY000): Can not connect to MySQL server on 'localhost' (10061)

https://blog.csdn.net/BigData_Mining/article/details/88344513

 18, because the tutorial are now a lot of older versions of Mysql installation, set the environment variable for a little bit different, according to the original cause I have does not work, some appear to solve the problem is the old version, not the fundamental solution to the above URL We are for the latest version.

Guess you like

Origin www.cnblogs.com/chenaiiu/p/11729840.html