MySQL 5.7.13 installation tutorial for Mac, very detailed, recorded as follows First, download the installation package. If you are not afraid of trouble, you can directly download it from Baidu mysql This is to use the command line installation, which may cause various problems in the middle. Another way is to go directly to the official website to download the DMG format installation package (Ps: It is best to use Thunder to download directly, so that the download will not be very slow due to network speed problems. It only took me two minutes to download at a normal speed) 1. The installation package downloaded from the official website: just open it and click the next step. After the installation is complete Remember password. This will be used when changing password. Open the system preferences and you will find a mysql icon at the bottom. This is the installation successfully. Click it and click start Mysql to start. If there is no response, just restart it directly. You don’t have to toss it. You will find that after tossing for a long time, it can be done by restarting. After restarting, you will find that your Mysql automatically starts serving. At this time, if you execute it directly in the command line, you will definitely be prompted $ mysql -bash: mysql: command not found At this time we need to add mysql to the environment variables: Execute vim ~/.bash_profile Add the mysql/bin directory to the file, see pic7: PATH=$PATH:/usr/local/mysql/bin After adding, press esc and enter wq to save the changes. Finally, enter source ~/.bash_profile in the command line The path above is the mysql folder under /usr/local/. It may be the same as the downloaded name. Go in and have a look. Ps: To enter the editing mode in vim, press i Then your mysql is installed. 2. Install using the command line downloaded from Baidu First, unzip the package you downloaded. It should be like this Rename the first one to mysql (just for ease of viewing) and move it to /usr/local/ Enter the /bin/ folder in the console mysqld --initialize --user='your username' Then wait for a while and the installation will be completed. Finally, you will be given a password. Remember to use it to change the password later. Install the previous steps to configure the environment variables At this time, if you open mysql in the command line, you will find that it will prompt an error. Don't worry about it. It's a waste of time. Just restart it. Then your mysql can be used 3. Change the root user password The initial password is long and boring, so you must change it to what you want. prodeMacBook-Pro:local pro$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 86 Server version: 5.7.17 MySQL Community Server (GPL) mysql> SET PASSWORD = PASSWORD('123456'); Query OK, 0 rows affected (0.03 sec) Done, done. The official provides a graphical management interface. You can download the workbench from the official website. It is very fast using Thunder. 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:
|
<<: A complete list of common Linux system commands for beginners
>>: How to encapsulate the table component of Vue Element
MySQL 8.0.25 decompression version installation t...
This article shares the specific code of js to im...
An event is an action performed by the user or th...
First, let’s take an example: There is a type fie...
The color presentation on a web page will be affec...
Method 1: INSERT INTO t1(field1,field2) VALUE(v00...
tar backup system sudo tar cvpzf backup.tgz --exc...
Xhtml has many tags that are not commonly used but...
This article describes how to use the local yum s...
Function Origin I was recently working on an H5 t...
If we introduce the nesting rules of basic HTML w...
1. Go to Vim's official website to download t...
Preface To delete a table, the command that comes...
What are the attributes of the JS script tag: cha...
There are two common ways to download files in da...