Home > Database > Mysql Tutorial > Detailed introduction to Win2008 R2 mysql5.5zip format mysql installation and configuration graphic code sharing

Detailed introduction to Win2008 R2 mysql5.5zip format mysql installation and configuration graphic code sharing

黄舟
Release: 2017-06-18 10:36:58
Original
1937 people have browsed it

This article mainly introduces Win2008 R2 mysql 5.5 zip format mysql Installation and configuration, friends in need can refer to

Win2008 R2 zip format mysql installation and configuration

1. Download the Baidu mysql5.6 ZIP 64-bit installation-free version and unzip it to the D drive

2. You can consider modifying the configuration character-set-server=utf8 in my.ini. This sentence is encoding Format setting port=.. Port setting

3. Set the environment variable PATH. Add D:\mysql-5.6.20-winx64\bin to the path.

4. To install the MySQL service, be sure to enter the D:\mysql-5.6.20-winx64\bin directory to execute the installation mysqld install

5. Enter the service manager to start the MySQL service

6. Enter the database, change the login password of the root account to 1234, create a mysql remote connection user, and set the maximum permissions and login password.


##

mysql -u root -p 
GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY '1234';
GRANT ALL ON *.* TO 'sa'@'%' IDENTIFIED BY '1234' WITH GRANT OPTION;
Copy after login

7. Open firewall port 3306 Network->windows Firewall->Advanced Settings->Inbound Rules and then click New Rule in the upper right corner and select "Port" Next step, enter port 3306 and add rules.

The editor of Script House added:

Sometimes my.ini

is configured in order to match the installation version. To add the file path, you can refer to the following method

Modify the registry

HKEY_LOCAL_MACHINE\SYSTEM\

CurrentControlSet\services\MySQL

Find ImagePath

"D:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="D:\Program Files\MySQL\MySQL Server 5.5\my.ini" MySQL

mysql changes the data file directory and my.ini location.

Requirements: Change the mysql data file directory and my.ini location.

Steps:

1. Find the location of my.ini. You can check the corresponding

property->executable file path through the mysql startup item corresponding to the windows service. Get the my.ini path.

 "D:\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="D:\MySQL Data\my.ini" MySQL55

2. Edit my.ini Corresponds to datadir

Before the change: datadir="D:\MySQL Data\data\"

After the change: datadir="D:\MySQL Data\MySQL Server 5.5\data\"

3. Reorganize the data file directory corresponding to mysql (if you do not do this, mysql cannot start normally)

4. Search the registry and modify the defaults-file path associated with the mysql startup item:

 KEY_LOCAL_MACHINE/SYSTEM/Services/MySQL55

 After modification, refresh the windows service and check the mysql startup item properties again ->executable file path, the result is as follows:

 " D:\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="D:\MySQL Data\MySQL Server 5.5\my.ini" MySQL

Make sure to port my.ini to the correct Under contents.

5. Restart mysql and the configuration is successful.

Solution The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

At this time we only need to

flush privileges and it will be OK OK,
mysql>
flush privileges;Query OK, 0 rows affected (0.01 sec)

The above is the detailed content of Detailed introduction to Win2008 R2 mysql5.5zip format mysql installation and configuration graphic code sharing. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template