If your computer is a Mac, using homebrew to install MySQL is a very convenient way, but there are still some problems; First, make sure you have installed MySQL. If you installed it via homebrew, type If you enter mysql -u root This error ERROR 1045 (28000): Access denied for user 'zhongchengming'@'localhost' (using password: YES) appears. It should be that the initial password was not successfully changed. Solution steps (1) Enter mysqld_safe --skip-grant-tables in the terminal and the following is displayed: 2017-03-21T11:44:11.6NZ mysqld_safe Logging to '/usr/local/var/mysql/zhongchengmingdeMacBook-Air.local.err'. (2) Enter mysql -u root again and the following is displayed Welcome to the MySQL monitor. Commands end with ; or \g. (3) Enter use mysql in the terminal and the following is displayed Reading table information for completion of table and column names (4) Change password Success Query OK, 1 row affected, 1 warning (0.05 sec) Rows matched: 1 Changed: 1 Warnings: 1 The above is what I introduced to you about solving the problem of not being able to log in when installing MySQL on Mac using homebrew. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Configure VIM as a C++ development editor in Ubuntu
Develop a number guessing game that randomly sele...
prune To use this command, both the client and da...
Software Version Windows: Windows 10 MySQL: mysql...
Some command differences between versions: show i...
I've been asked a lot lately about an apparen...
1. Check the MySQL database encoding mysql -u use...
Recently, I encountered the need to embed a player...
1. Problem reproduction: Count the total number o...
Table of contents When declaring multiple variabl...
Introduction to structural pseudo-class selectors...
Mainly discuss its structure and some important pr...
Table of contents Problem Description Principle A...
Table of contents 1. Number in JavaScript 2. Math...
Problem: The PHP program on one server cannot con...
Docker Overview Docker is an open source software...