The strongest offline installation mysql_8.0.2 method

Source: Internet
Author: User
Tags mysql client

The strongest offline installation mysql_8.0.2 method can be installed successfully at one time.

In this way, the offline installation of MySQL for five minutes will not be spent, saving a lot of valuable time.

Foreplay, let's say you've got the following compression package from the MySQL website:

After extracting it, it looks like this:

This is what the file looks like:

Here's the beginning, please note.

First step: Configure the My.ini file

The contents are as follows:

[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
#设置3306端口
Port = 3306
# Set up the MySQL installation directory
basedir=d:\\tools\\ mysql-8.0.2-dmr-winx64
# Set up a storage directory for MySQL database data
datadir=d:\\tools\\ Mysql-8.0.2-dmr-winx64\\data
Skip-grant-tables
# Maximum number of connections allowed
max_connections=200
# The character set used by the service side defaults to the 8-bit encoded latin1 character Set
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb

Copy the above into Notepad, then rename it to My.ini and move it to the MySQL installation directory.


Note two points

1. Each person's installation directory is different, so the installation directory and the data storage directory corresponding changes can be.

2.basedir=d:\\tools\\ mysql-8.0.2-dmr-winx64 ' \ \ ' must not be written as ' \ '.

Second step: Configure MySQL environment variables

1.win+r, input sysdm.cpl,

2. When the carriage return appears,

3. Point advanced-environment variable (N) ...

4. Continue

5. Continue

6. Continue

7. Continues to

Finally, the application can be determined.

Second step: Create the Data folder

Go to the command line with an administrator and go to the Bin folder under Mysql-8.0.2-dmr-winx64.

Then enter:mysqld–initialize–insecure, wait 40 seconds or so.

The data directory will then appear under the Mysql-8.0.2-dmr-winx64 folder:

Then enter mysqld–install, carriage return.

Then, start the database service:net start MySQL, appear as you like:

Step three: Set a password

After entering the MySQL environment, enter:

Update mysql.user Set authentication_string = password (' The password you are going to set ') where user = ' username ';

For example: Update mysql.user set authentication_string = password (' 147258369 ') where user = ' root ';

Then, enter the flush privileges; Indicates immediate effect.

Then enter quit to quit the MySQL environment and reboot.

Step four: Log in to the database

Log in to the database with administrator privileges and Enter the mysql–u user name –p

Example: Mysql–u root–p

Enter the password you previously set to return.

Description: Original. Previously also follow the online tutorial installed, failed n multiple times. Now learned, want to share to everyone. Originally those so-called spend a lot of time, but their own method is wrong.

The strongest offline installation mysql_8.0.2 method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.