Windows install MySQL Note point

Source: Internet
Author: User

MySQL installation files are divided into two types, one in MSI format and one in ZIP format.

After the installation in MSI format, do not be busy to start MySQL, we also need to modify the configuration file (if not configured, after the start of the error will appear in the picture Oh!). : Error 2 system cannot find file), mysql-5.6.1x default profile is D:\\mysql\mysql Server 5.6\my-default.ini, or create a My.ini file yourself,

In which the configuration () is modified or added:

[Mysqld]

Basedir=d:\mysql\mysql Server 5.6 (MySQL directory)

Datadir=d:\mysql\mysql Server 5.6\data (MySQL directory \data)

Run cmd as administrator (be sure to run as administrator, or not have enough permissions),

Input: cd D:mysql\mysql Server 5.6\bin into the bin folder of MySQL (regardless of whether the environment variable has been configured, but also to enter the Bin folder, or after the start of the service will still report error 2)

Enter Mysqld-install (if run without administrator, there will be an error due to insufficient permissions: Install/remove of the Service denied!)

The installation was successful.

After the installation is successful, start the service, continue to enter in cmd: net start MySQL, the service started successfully!

D:\MySQL\MySQL Server 5.6\my.ini or My-default.ini file modification

# These is commonly set, remove the # and set as required.
Basedir=d:\mysql\mysql Server 5.6
Datadir=d:\mysql\mysql Server 5.6\data
Port = 3306
server_id = Gradven
#日志路径
Log_bin = D:\MySQL\MySQL Server 5.6\log

Go to MySQL

C:> mysql-u Root

Set Password

mysql> Update Mysql.user Set Password=password (' root ') where user= ' root ';mysql> flush privileges;

If you want to listen to the external network, in addition to My.ini to set Bind-address, also set permissions.

Mysql> Grant all privileges on * * to [e-mail protected] "%" identified by ' MyPassword ' with Grant option;mysql> flush privileges;

Where% means any address can be logged in, you can also specify a specific IP, such as "192.168.1.102".

Windows install MySQL Note point

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.