Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The installation process of MySQL5.7.22 under Mac

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Use the installation package to install mysql (it is too slow to download online, if you need to install the package, you can leave a message at the bottom of the article, I will send it to you) double-click to open the installation file

Double-click the pkg file to install all the way down, and remember to save the password in the last pop-up box (it is the password for your mysql root account) under normal circumstances, the installation is successful. Only the installation is successful at this time, but additional configuration is required:

(1) enter the system preference settings

(2) Click mysql

(3) enable mysql service

Add mysql to the system environment variable

Enter / usr/local/mysql/bin to see if there is a mysql in this directory

Execute vim ~ / .bash_profile

To add the directory of mysql/bin to this file, see pic7:

PATH=$PATH:/usr/local/mysql/bin

When the addition is complete, press esc, and then enter wq to save.

Finally, enter source ~ / .bash_profile on the command line

Pass through

Mysql-u root-p

Log in to mysql and you will be asked to enter your password

Apple-> system preferences-> bottom point mysql shuts down the mysql service in the pop-up page (click stop mysql server)

Step2:

Enter terminal input: cd / usr/local/mysql/bin/

Log in to administrator permission sudo su after pressing enter.

Enter the following command to disable the mysql verification function. / mysqld_safe-- skip-grant-tables &

Mysql will restart automatically when you enter (the status of mysql will change to running in the preference setting)

Step3.

Enter the command. / mysql

After entering enter, enter the command FLUSH PRIVILEGES

After you enter, enter the command

MySQL 5.7.6 and later: ALTER USER 'root'@'localhost' IDENTIFIED BY' your new password

MySQL 5.7.5 and earlier: SET PASSWORD FOR 'root'@'localhost' = PASSWORD (' your new password')

At this point, the password has been changed and you can log in successfully.

Summary

The above is the installation process of MySQL5.7.22 under Mac introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave a message for me, and the editor will reply you in time. Thank you very much for your support to the website!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report