Win7x64 How to install and configure the MySQL database?

Source: Internet
Author: User

First, download MySQL

Go to MySQL official website download mysql Community Server, choose 64-bit, link is: https://dev.mysql.com/downloads/mysql/

Second, download the good compressed package, unzip to the specified location.

At this point, MySQL does not have the data directory and the My.ini file.

Third, configuration My.ini file

Create a new My.ini and enter the following:

 #version: 5.7.21-winx64  [ mysql  "   #设置mysql客户端默认字符集default-character-set  =utf8  [ mysqld     #跳过权限检查 #skip-grant-tables #设置3306端口port  = 3306 #设置mysql的安装目录basedir  = d:\mysql# set the data storage directory for the MySQL database datadir  =d:\mysql\ data# Maximum number of connections allowed max_connections  =200# The character set used by the service side defaults to the 8-bit encoded latin1 character set Character-set-server  =utf8# Default storage engine that will be used when creating a new table Default-storage-engine  =innodb 
My.ini x64

IV. Configuring environment variables

Add Mysql_home in the system variable, the value of the variable is the location of the decompression of MYSQL, and then add it in Path ;%mysql_home%\bin , click OK.

Enter the command prompt as an administrator,

install MySQL :   mysql-install    ( in the bin directory of the MySQL decompression location )

Initialize MySQL: mysqld-initialize (need to create a data directory first)

Start mysql:net start MySQL

Vi. entering MySQL

Not yet, you need to modify the My.ini, the directory under the "Mysqld" under the Skip-grant-tables uncomment, and then restart the MySQL service.

Next, enter the following instruction

    SET PASSWORD = PASSWORD ('your new PASSWORD ');

ALTER USER ' root ' @ ' localhost ' PASSWORD EXPIRE never;

Flush privileges;

And then comment out the My.ini file under [mysqld] skip-grant-tables

The equivalent of skipping permission checks, then setting the permissions again, and then turning on permission checking.

Seven, log in MySQL

I got into MySQL as root.

  

  

Win7x64 How to install and configure the MySQL database?

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.