Install MySQL (under Windows)

Source: Internet
Author: User
Tags mysql client mysql commands

First, download the corresponding version of the MySQL Zip package (for Windows) from the MySQL official web

Second, unzip the zip package into a custom folder (I put the e-drive, the path is E:\mysql-5.6.40-winx64)

Third, enter the MySQL installation path, create a new document named My.ini, copy the following contents into the My.ini document (the document will be read automatically after MySQL is turned on by default)

[mysql]# set MySQL client default character set Default-character-set=utf8 [mysqld] #设置3306端口port = 3306 # Set the installation directory for MySQL Basedir=e:\ mysql-5.6.40-winx64# set the data storage directory for the MySQL database datadir=e:\mysql-5.6.40-winx64\data# the 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# the default storage engine that will be used when creating a new table Default-storage-engine=innodb

  

Four, run cmd with administrator's permission, under CMD, go to the bin directory of MySQL installation directory

C:\users\frankie>e:      #进入e盘 # go to MySQL installation directory E:\>CD MYSQL-5.6.40-WINX64E:\MYSQL-5.6.40-WINX64>CD bin# Install MYSQLE:\MYSQL-5.6.40-WINX64\BIN>MYSQLD Installservice successfully installed. #启动mysql服务E: \ Mysql-5.6.40-winx64\bin>net Start Mysqlmysql service is starting ..... The MySQL service has started successfully.

  

V. Set the root password (executed in cmd)

#不输入密码进入mysql中E:\mysql-5.6.40-winx64\bin> mysql-uroot #设置root的密码E: \mysql-5.6.40-winx64\bin>update Mysql.user Set Password = password (' 12345678 ') where user = ' root '; E:\mysql-5.6.40-winx64\bin>flush privileges; e:\mysql-5.6.40-winx64\bin>exit; #重新用密码进入mysqlE: \mysql-5.6.40-winx64\bin>mysql-uroot-penter Password: * * * * #进入后查看一些允许连线的host, you need to set localhost,% to guarantee local logon and remote client logon

  

  

Vi. to configure MySQL environment variables in order to automatically execute MySQL commands on any path to enter the command line

1) Installation path of Mysql_home:mysql

2) Path:;%mysql_home%\bin;

Install MySQL (under Windows)

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.