MySQL Community Server compressed package installation and configuration method, mysqlcommunity

Source: Internet
Author: User

MySQL Community Server compressed package installation and configuration method, mysqlcommunity

To install mysql today, go to the official website to download the latest Community version of mysql.

But! The downloaded package is a compressed package, which means we need to manually configure the mysql environment.

The procedure is as follows:

1. decompress the package to your path (do not include Chinese), my path is: F: \ software \ mysql-5.7.11-winx64 \

2. configure environment variables: My computer> Properties> advanced> environment variables. Configure the PATH of the bin folder under mysql to the PATH of the user variable, in this way, you can directly execute mysql-related commands in cmd.

3. modify the configuration file my-default.ini under the root directory of mysql, mysql path configuration in, a total of three lines, the operation after the data directory will be automatically generated, first fill in.

4. Open the command line window as an administrator. The attachment in the Start menu has a command prompt, right-click it, and run it as an administrator.

5. Locate the current path in the command line window to the bin folder in the mysql directory (Be sure to locate it in the bin directory), and enter three commands at a time.

Install the mysql service using mysqld-install

Mysqld -- initialize must be initialized

Net start mysql service.

6. Next I need to enter mysql. What is the user name and password ?? In the new mysql version, the password generation method has been changed and is randomly generated. Open the data folder in the root directory of mysql (generated by initialize), find a file ending with. err, and open

There is a line in it to record your user name (root) and a randomly generated temporary password (I (drANkaq1rf)

Next, you can run the command to log on to mysql (mysql-u root-p)

7. You need to change the password when logging in.

5.7.6 and later versions:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass'; 

The command for changing the password before 5.7.6 is:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass') 

This completes the basic configuration.

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.