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.