MySQL installation windows

Source: Internet
Author: User

Recently in the study of MySQL, see a lot of people in the construction of MySQL encountered many problems, we do not talk about the installation version of the configuration process, because the installation version of the configuration is very simple.

Configuring MySQL under Windows

First download the community version of the installation package from the official website: the latest version of 5.7, the old version of 5.6 and 5.5 according to their own needs to download the appropriate installation package

The installation of these versions is basically the same, but there are a few subtle differences,

Let's take the installation of version 5.6 as an example to explain:

After downloading the file, unzip the folder and copy the Data folder in the folder to the parallel folder in the MySQL installation directory.

Then go to the mysql5.6 folder

Can see my folder more than a My.ini file, which is required in the MySQL installation process configuration files, the basic format and My-default.ini, we can copy My-default.ini for My.ini

Next we need to set the corresponding parameters.

[Mysqld]
# Skip Authorization Formskip-grant-tablesbasedir="d:/mysql/mysql5.6/"#Path to the Database Rootdatadir="d:/mysql/data/"character_set_server= Utf8collation-server=utf8_general_ci[client] #设置客户端字符集 default-character-set =utf8

After setting up the configuration file, we need to add our d:/mysql/mysql5.6/bin to the environment variables of the computer.

The next step is to start service.

Open our cmd as an administrator, install the MySQL service to our computer

Next enter net start MySQL to start our server

This is where we log in to our MySQL user, with the initial username as the root password empty

# connect MySQL server mysql-u root-p # Prompt Please enter password, direct enter

The next thing we need to do is set the password for our root user.

mysql5.6

Update Mysql.user set Password=password (' 123 ') where user = ' root ';

Flush privileges;

mysql5.7

Update Mysql.user set Authentication_string=password (' 123 ') where user = ' root ';

Flush privileges;

Then we comment out the My.ini file in the

Skip-grant-tables

Then we can

Log in to our MySQL with the password we set

MySQL installation windows

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.