Download MySQL
- Baidu cloud download
Baidu Cloud Link: MySQL-5.6.45-Winx64 , extraction code: 38jp
- Official website to download
Enter the official website: https://www.mysql.com/ , select Download
Go to Download Community
Select the MySQL Community Server
Version history
Select the corresponding version
Download free landing
Extracting archive
After downloading directly extracted, then the default directory file my-default.ini copy, rename my.ini (if not my-default.ini, can create a new my.ini file yourself)
The following copy into the my.ini file, note the path content into their own respective
[client]
#客户端字符集
default-character-set=utf8
[mysqld]
#端口
port=3306
#服务端字符集
character_set_server=utf8
#MySQL安装目录
basedir=D:\Program Files\mysql-5.6.45-winx64
#数据库文件存储目录
datadir=D:\Program Files\mysql-5.6.45-winx64\data
[WinMySQLAdmin]
D:\Program Files\mysql-5.6.45-winx64\bin\mysqld.exe
Adding Environment Variables
1) variable name: MYSQL_HOME
variable value: D: \ Program Files \ MySQL-5.6.45-Winx64 (installation directory)
2) Add the value of MySQL variables in the system variable Path: % MYSQL_HOME% \ bin
Registration Service
Administrators run cmd , go to the bin directory under the MySQL
输入mysqld install MySQL --defaults-file="D:\Program Files\mysql-5.6.45-winx64\my.ini"
If you need to remove the MySQL service, command: mysqld the Remove (Note: Always shut down the service and then delete)
Change the root account password
First start the service: net start mysql
然后依次输入命令:
c:>mysql –uroot
mysql>show databases;
mysql>use mysql;
mysql>UPDATE user SET password=PASSWORD("123456") WHERE user='root';
mysql>FLUSH PRIVILEGES;
mysql>QUIT