Windows install MySQL steps

Source: Internet
Author: User

Windows installation mysql 5.7.12 tutorial

1. Download mysql5.7.12.zip and unzip the website

    1. Copy the default profile My-default.ini, and name My.ini to Open with Notepad, modify the configuration as follows

[Mysqld]

Basedir = D:\Program files\mysql-5.7.12-winx64

DataDir = D:\Program files\mysql-5.7.12-winx64\data (Data Catalog)

# Set encoding format

Default-storage-engine=innodb

Character-set-server=utf8

Collation-server=utf8_general_ci

[MySQL]

Default-character-set=utf8

3. Open the Windows console,cd to the bin directory of the extracted directory of MySQL ,

such as:>CD:

>CD D:\Program files\mysql-5.7.12-winx64\bin

Of course, you can also add D:\Program files\mysql-5.7.12-winx64\bin to the path environment variable, so you don't have to switch to MySQL every time. installation directory.

Run instructions, initialize MySQL

Mysqld--initialize-insecure--user=mysql

4. Install the MySQL service and start

Mysqld-install

net start MySQL

5. If startup fails, reinstall, reinstall the tutorial at the back. After the successful start, you need to modify the initial password, the first login without entering a password, directly enter MySQL.

Mysql-uroot-p

To modify the root user password

mysql>Update mysql.user set Authentication_string=password (' root ') where user= ' root ' and Host = ' localhost ';

Refresh Permissions

Mysql>flush Privileges;

Mysql>Exit

6. Log in with the root user after exiting (password is the root you just modified )

Mysql-uroot-p

Second, re-install MySQL

1. First delete the Data directory , such as:D:\Program files\mysql-5.7.12-winx64\data

2. Logout Service ( note Switch to the MySQL -installed bin directory )

Mysqld-remove

3. Initialize (change cmd window)

Mysqld--initialize-insecure--user=mysql

4. Installation Services

Mysqld-install

5. The subsequent steps to change the password are the same as for the first installation.

Iii. Other issues

1. Unable to log in to MySQL using other client software ;

ERROR 1862 (HY000): Your password has expired. To log on you must

Change it using a client, that supports expired passwords.

Just re-modify the password can be modified in the following ways:

log in to MySQLwith root : (Here my account is root, the password is root)

Mysql-uroot-proot

Then change the password:

SET PASSWORD = PASSWORD (' root ');

2. Other hosts in the intranet cannot connect to MySQL

Error:1130 host' xxx ' is not allowed connect ...

To run the command:

Mysql>Grant all privileges on * * to ' root ' @ '% ' identified by ' root ' with GRANT OPTION;

To authorize a person:

Mysql>Grant all privileges on * * to ' root ' @ ' 192.168.1.3 ' identified by ' root ' with GRANT OPTION;

3. reset mysql login password

1 mysql cmd open dos window, input net Stop MySQL

2 cmd command line window, enter mysql installation directory such as e:\program files\mysql\mysql Server 5.0\bin demonstration command : e: enter CD "E:\Program files\mysql\mysql Server 5.0\bin" So you can go to Span style= "FONT-FAMILY:CALIBRI;" >mysql install directory

3, enter the mysql security mode, that is, when MySQL up, you can enter the database without entering a password. The command is: mysqld-nt--skip-grant-tables

4. Reopen a CMD command-line window, enter mysql-uroot-p, and log in to MySQL using a blank password (do not enter the password, press ENTER directly)

5, enter the following command to start modifying the root user's password (note: There is a "dot" in the middle of the mysql.user command)

Update Mysql.user set Authentication_string=password (' root ') where user= ' root ' and Host = ' localhost ';

6, refresh the permissions table mysql> flush privileges;

7, quit mysql> quit so the MySQL Super Admin account ROOT has been reset , then end the Mysql-nt.exe process in Task Manager and restart mysql ! (You can also restart the server directly) after MySQL restarts, you can log in to MySQL with the newly-installed ROOT password out!

Windows install 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.