Home > Database > Mysql Tutorial > Comprehensive analysis of how to install mysql5.7 under Windows_MySQL

Comprehensive analysis of how to install mysql5.7 under Windows_MySQL

WBOY
Release: 2016-08-20 08:48:09
Original
1215 people have browsed it

About installing mysql 5.7 under windows

•New pitfalls to pay attention to:

 After the 5.7 version is installed, the ROOT account has a default password. This password can be found under the data folder specified in the mysql.ini configuration file under Windows, in the file with the .err suffix.

 2016-07-16T04:14:27.448186Z 1 [Note] A temporary password is generated for root@localhost: ?wxxx

It is best to remove characters like -, . from the mysql folder name,

There are other installation posts on the Internet that say to create a new one, my.ini. After I created it, the mysql service could not start. If you want to change the configuration, just change it directly in my-default.ini.

•For other installations, follow the installation steps in the official documentation,  

 Download, unzip, add the bin directory of mysql to the environment variable, and specify the bin path in path.

  Run cmd, it is best to run it as admin, cd to the mysql bin directory and run the following command:

  Add service command to add mysql to windows services. It can be set to start automatically: mysqld install MySQL --defaults-file="D:mysqlmysql57my-default.ini"

 The command to remove the service is: mysqld remove (if you want to remove mysql, start over)

 The command to start mysql on the command line cmd is: net start mysql

 The command to close mysql is: net stop mysql

At this time, you can log in to mysql using mysql -u root -p, and find the password in the xx.err file.

• At this time, you can try to create a new user, create a new database, and use the newly created database for the new user,

  create user xiaofang identified by 'root';
  create database online_shopping;
  grant all privileges on online_shopping.* to xiaofang@'%' identified by 'root';
  commit;
  flush privileges; 
Copy after login

Then use the newly created xiaofang to connect to the database and see if it is successful.

The above is a comprehensive analysis of the method of installing mysql5.7 under Windows introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support of the website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template