The possible situation and solution of the failure to open the MySql terminal on the MAC terminal

One of the possible reasons:
MYSQL has already been opened, and an error is reported when it is opened again in the terminal:
check whether
the database is enabled by default.
Possible errors such as:

  • use terminal commandsudo mysql.server restartTurn it back on:
  • Error:

… ERROR! The server quit without updating PID file (/usr/local/var/mysql/MacBook-Air.local.pid).

  • or error

ERROR! MySQL server PID file could not be found!

  • entermysqlOrder:
  • Error:

ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)
MacB

When you close the opening of the location database as shown in the figure, and then enter the command in the terminal to start it, you can start it successfully.

Please add a picture description
as the picture shows:
Please add a picture description

Guess you like

Origin blog.csdn.net/m0_59416550/article/details/128103883