MySQL5.7 Install-free version configuration
MySQL is a more popular and very useful database software, as follows, I learned to summarize the MySQL version of the installation of the configuration experience.
First, the software download
5.7 32-bit Https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-win32.zip
5.7 64-bit Https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-winx64.zip
This tutorial uses a 64-bit version, gentlemen can be tailored to your computer system and personal preferences.
Second, the Operation step 1. Download and get zip archive package
2. Unzip to the directory you want to install to, I extracted to the D:\Program Files (considering the file name after decompression is very long so I named it)
3. Add Environment variables
My Computer, properties, advanced environment variables
Select Path, after which you add: your MySQL installation file below the Bin folder
(such as: D:\Program Files\mysql-5.7\bin)
(Be careful not to delete anything else)
4. Create a new My.ini file
5. Edit the My.ini file
[mysqld]basedir=D:\Program Files\mysql-5.7datadir=D:\Program Files\mysql-5.7\dataport=3306skip-grant-tables#basedir表示mysql安装路径#datadir表示mysql数据文件存储路径#port表示mysql端口#skip-grant-tables表示忽略密码
6. Start cmd in Administrator mode and switch the path to the bin directory under MySQL and enter
mysqld –install 就行mysql
7. Enter
net start mysql
Start the MySQL service
8. Re-enter
mysqld --initialize-insecure --user=mysql;
Initializing the data file
9. Then start MySQL again and then use the command
mysql –u root –p
Access to MySQL Admin interface (password can be empty)
10. Change the root password after entering the interface
update mysql.user set authentication_string=password(‘123456789‘) where user=‘root‘ and Host = ‘localhost‘;
123456789 is my new password, the password here is your decision
Last Enter flush privileges
Refresh permissions
11. Modify the My.ini file to delete the last sentence skip-grant-tables
12. Restart MySQL for normal use
(Updated September 16, 2017)
13. About garbled characters
Recently started using MySQL in the Java EE Project, found that the JDBC inserted data in the kanji part is garbled.
Later found that in addition to the JSP to the servlet in the process of the resulting garbled and MySQL is not set up improperly generated garbled
Add and then restart the mysqld segment in the My.ini character_set_server=utf8
So MySQL basically solves the problem.
MySQL 5.7 Free Install version configuration