I summarized the notes on the previous installation of mysql and shared them with you.
1. Download
Download address: http://dev.mysql.com/downloads/mysql/
Choose according to the computer configuration. I chose windows (x86, 64-bit) and ZIP Archive. Click Download and the page will jump to the following picture
Click No thanks, just start my download at the bottom to start downloading.
My mysql installation path is D:Mysqlmysql-5.7.13-winx64
2. Configure the my.ini file and add the data folder
Create a new my.ini file under the path where mysql is installed
Write the following code in the my.ini file:
[mysql] # 设置mysql客户端默认字符集 default-character-set=utf8 [mysqld] #设置3306端口 port = 3306 # 设置mysql的安装目录 basedir=D:\Mysql\mysql-5.7.13-winx64 # 设置mysql数据库的数据的存放目录 datadir=D:\Mysql\mysql-5.7.13-winx64\data # 允许最大连接数 max_connections=200 # 服务端使用的字符集默认为8比特编码的latin1字符集 character-set-server=utf8 # 创建新表时将使用的默认存储引擎 default-storage-engine=INNODB
Create a new folder named data
Open cmd
It will be OK if the installation success message appears (I have already installed it here, so the service already exists appears)
3. Start the mysql server
Start Task Manager - click Services
Enter service
Right-click mysql and click Start or Restart
4. Open mysql
Enter mysql -u root -p in cmd and enter the password
If you want to reset the password mysqladmin -u root -p password
After entering mysql, enter show databases;
Enter use myweb;
Enter show tables;
The above is the installation and configuration method of mysql 5.7.13winx64. I hope it will be helpful to everyone's learning.