To configure MySQL ———— steps

Source: Internet
Author: User

1. Go to MySQL website https://dev.mysql.com/downloads/mysql/, find your suitable version in the list of the page, my computer is a 64-bit system, so choose Windows (x86, 64-bit), ZIP Archive version:

Click "Download" button, then will pop up a page, require users to log in or register, if you have an Oracle account or want to register, you can choose the appropriate operation, if you do not want, you can choose the following line of blue Word, directly download:

2. Unzip

Unzip the downloaded files to the specified directory, my directory is f:/software/mysql/mysql-5.7.17-winx64

Second, installation and configuration

1. Configure Environment variables

Go to computer → properties → advanced system settings → environment variables, select the system variable below, click "New", then enter the variable name and the variable value in the popup window, click "OK",

Note that the variable value here is your decompression directory, and here I am f:/software/mysql/mysql-5.7.17-winx64/

Then, configure mysql_home in Path, select Path, click "Edit", enter%mysql_home%bin into path, and if it is placed in the non-trailer of path, remember to append the semicolon (;) the contents behind the isolation. Then "OK".

2. Go to your own extract directory, there is a My-default.ini file, copy the file, and named My.nin, enter the following code in My.nin:

#########################################################

[Client]

Default-character-set=utf8

[Mysqld]

#解压目录

Basedir =%mysql_home%

#解压目录

DataDir =%mysql_home%/data

Port = 3306

Default-character-set=utf8

#########################################################

3. Move the modified My.ini file to the Bin folder

Third, initialize the configuration

1. Run the cmd command line as an administrator

2. In the command line, go to the MySQL extract directory and enter into its bin directory

3. Enter mysqld--install MySQL registry MySQL service, if the "service successfully installed" shown in, the registration is successful.

4. Then enter MYSQLD--initialize-insecure to initialize the data directory, this will be in the MySQL extract directory to produce a data folder, folders have some files and folders, and will generate a blank password of the root user

5. Enter the net start MySQL startup server, the output MySQL service is starting ... As well as the MySQL service and the successful start of the word (boot success will not output)

6. Set the password, enter the mysqladmin-u root password password, I set the password here is 123456, so prompt me password simple has security hidden trouble and so on

7. Start using MySQL, enter command: Mysql-u root-p

Then enter the password you just set

You can see the following welcome words Oh, the login is successful.

Third, verification

After the login is successful, you can verify that the server configuration is successful by entering show databases, and display the following information after success:

Iv. Removal

If you are removing a MySQL that is already in use, you will need to enter CMD inside the bin directory under the MySQL decompression directory, enter net stop MySQL on the command line, and then run the command mysqld--remove

To configure MySQL ———— steps

Related Article

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.