MySQL 5.7.20 installation and configuration method graphic tutorial, share with you 1. Official website: https://dev.mysql.com/downloads/mysql/Download It is strongly recommended to download the dmg file. After downloading the tar version and unzipping it, you need to move the folder to the default installation location /usr/local. It also requires various configurations, which is really troublesome~ 2. Double-click the pkg file to install it, and continue until the following interface pops up: The part in the red box in the figure is the initial password after MySQL installation, please remember 3. Open the system "Preferences" and click the MySQL icon below Enter the mysql console, where you can start or stop the mysql server 4. Environment Setup Open the terminal, enter the MySQL installation directory /usr/local/mysql, enter the bin directory, and execute the mysql -u root -p login statement. The system prompts the error "-bash:mysql:command not found". The reason is that when executing the command, the system will actively search for the command under the environment variable $PATH. If the command is not found, it will prompt that it does not exist. Because we did not configure MySQL after installing MySQL, the system cannot find the mysql command. Edit the file, vim ~/.bash_profile and add the MYSQL_PATH environment variable: #mysql export PATH=${PATH}:/usr/local/mysql/bin Type source ~/.bash_profile to make the file take effect immediately. 5. Reset Password Enter the bin file and enter the new password in the terminal. The password here is the password automatically generated by the system that you remembered before. Then use mysql -u root -p to log in to mysql. 6. Aliases In order to improve work efficiency, it is obviously troublesome to enter mysql in the bin file every time. For this reason, we need to define an alias so that no matter where you are, you can directly call the mysql and mysqkadmin commands. Terminal input: alias mysql=/usr/local/mysql/bin/mysql alias mysqladmin=/usr/local/mysql/bin/mysqladmin Wonderful topic sharing: MySQL different versions installation tutorial MySQL 5.6 installation tutorials for various versions MySQL 5.7 installation tutorials for various versions mysql8.0 installation tutorials for various versions The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Understanding Vuex in one article
>>: Using vsftp to build an FTP server under Linux (with parameter description)
Compared with Windows system, Linux system provid...
Copy code The code is as follows: <iframe id=&...
Introduction to MySQL Window Functions MySQL has ...
Background of the accident: A few days ago, due t...
Table of contents Overview Is the extension neces...
Table of contents Vue3 encapsulation message prom...
Table of contents 1. Implementation of counter 2....
Set Tomcat to automatically start the service: I ...
Preface Hello everyone, this is the CSS wizard - ...
1. Modify the firewall settings and open the corr...
The specific method is as follows: CSS Code Copy ...
Preface JavaScript is not like other languages ...
Let's take a look at the dynamic splicing of ...
Load balancing is a commonly used device in serve...
SSH stands for Secure Shell, which is a secure tr...