MySQL 5.7 Free Install version configuration

Source: Internet
Author: User
Tags mysql in mysql version

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
    • 1



7. Enter net start mysqlStart 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 –pAccess 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

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.