1024programmer Mysql How to run mysql5.7 installation

How to run mysql5.7 installation

How to install and run mysql5.7: first unzip the installation package to a certain directory, and initialize the database; then set a root random password, and start the mysqld service; then log in to Mysql and reset the root password; finally Install windows service and set remote access permissions.

More related free learning recommendation: mysql tutorial (video)

mysql5.7 How to install and run:

1. Unzip to a certain directory, such as: D:\tools\mysql-5.7.11-winx64

2.mysql5. Version 7 compressed package, there is no data folder by default, you need to initialize the database first, the command is as follows:

D:\tools\mysql-5.7.11-winx64\  bin> mysqld --initialize

3. After initialization, a data folder will be generated under the mysql-5.7.11-winx64 folder. The root password of the mysql5.7 version is disabled by default. It is empty, but a random password.

The password can be viewed in the “machine name.err” file under the data folder. The content is as follows:

2016-02-26T03:23:56.025673Z 1 [Note] A temporary password is generated for root@localhost: yai/UnHse8Nu

4. Start mysqld service

D:\tools\mysql-5.7.11-winx64\bin> mysqld --console

5. Use the random password to log in to mysql, command As follows:

D:\tools\mysql-5.7.11-winx64\bin> mysql -uroot -pyai/UnHse8Nu

6 .After logging in, you need to reset the root password before you can use the database. The command is as follows:

mysql> ALTER USER 'root'@&  #39;localhost' IDENTIFIED BY 'new_password';

7. Install as windows service

Installation: D:\tools\mysql-5.7.11 -winx64\bin> mysqld –install

Uninstall: D:\tools\mysql-5.7.11-winx64\bin> mysqld –remove

8. Set remote access permissions

mysql> grant all PRIVILEGES on *.* to root@'%' identified by 'your_passwd';
 mysql> flush privileges;

The above is the detailed content of how to install and run mysql5.7, please pay attention to other related articles on 1024programmer.com for more information!

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/how-to-run-mysql5-7-installation/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索