Tutorial on installing mysql5.7.18 on mac os10.12

Tutorial on installing mysql5.7.18 on mac os10.12

I searched the entire web and found all kinds of pitfalls, which did not solve my problem. Finally figured it out myself.

After installation, a temporary password will pop up, copy it. If you click too quickly, you will have another chance in the notification bar, but if you click too quickly in the notification bar, you can only type by looking at your hand. If the notification bar is gone, the fastest way is to reinstall it. (Uninstall before reinstalling)

Then open the console and enter mysql. It will prompt command not found . Then enter

alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin

Give it an alias. Note that you need to re-run the above command after closing the terminal (if you want it to be permanent, you can save it to a bash file)

Then enter mysqladmin -u root password *** (replace *** with the temporary password)

Another error: 'Access denied for user 'root'@'localhost' (using password: NO)'

Baidu has a lot of information that requires Mac OS to enable the root user (search for the method to enable it yourself)

After opening, enter su root

Then enter the root password to enter root mode

Then enter mysqladmin -u root password *** (replace *** with the temporary password)

The result is command not found again

Finally in root mode

sh-3.2# alias mysql=/usr/local/mysql/bin/mysql
sh-3.2# alias mysqladmin=/usr/local/mysql/bin/mysqladmin
sh-3.2# mysqladmin -u root -p password

Then enter the temporary password

Then you are prompted to enter a new password

Finally complete the installation.

Summarize

After installing MySQL, set the system preferences to start the service

Then enter root mode

sh-3.2# alias mysql=/usr/local/mysql/bin/mysql
sh-3.2# alias mysqladmin=/usr/local/mysql/bin/mysqladmin
sh-3.2# mysqladmin -u root -p password

Enter temporary password

Enter new password

Enter the confirmation password

OK

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:
  • MySQL 5.7.18 download and installation process detailed instructions
  • Tutorial on installing mysql5.7.18 on windows10
  • Detailed tutorial for installing mysql5.7.18 on centos7.3
  • mysql5.7.18.zip Installation-free version configuration tutorial (windows)
  • Detailed tutorial on installing MySQL 5.7.18 under CentOS 6.5
  • Alibaba Cloud Centos7.3 installation mysql5.7.18 rpm installation tutorial
  • Windows system mysql5.7.18 installation graphic tutorial
  • Detailed tutorial on the free installation version of MySQL 5.7.18 on Linux
  • CentOS 6.4 MySQL 5.7.18 installation and configuration method graphic tutorial
  • MySQL 5.7.18 MSI Installation Graphics Tutorial

<<:  Use the sed command to modify the kv configuration file in Linux

>>:  Detailed explanation of Vue form binding and components

Recommend

Window.name solves the problem of cross-domain data transmission

<br />Original text: http://research.microso...

Explore the truth behind the reload process in Nginx

Today's article mainly introduces the reload ...

Viewing and analyzing MySQL execution status

When you feel that there is a problem with MySQL ...

Detailed explanation of server-id example in MySQL master-slave synchronization

Preface When we build a MySQL cluster, we natural...

HTML table markup tutorial (15): table title

<br />This tag can be used to directly add a...

vue_drf implements SMS verification code

Table of contents 1. Demand 1. Demand 2. SDK para...

Why should you be careful with Nginx's add_header directive?

Preface As we all know, the nginx configuration f...

CSS style does not work (the most complete solution summary in history)

When we write pages, we sometimes find that the C...

Briefly describe mysql monitoring group replication

Original text: https://dev.mysql.com/doc/refman/8...

How to view the running time of MySQL statements through Query Profiler

The previous article introduced two methods to ch...

Method of realizing automated deployment based on Docker+Jenkins

Use Code Cloud to build a Git code storage wareho...

Apache Log4j2 reports a nuclear-level vulnerability and a quick fix

Apache Log4j2 reported a nuclear-level vulnerabil...

How to use axios request in Vue project

Table of contents 1. Installation 2. There is no ...

Dockerfile implementation code when starting two processes in a docker container

I want to make a docker for cron scheduled tasks ...