Problem solving:
1. Enter the command: sudo chown -R _mysql /usr/local/var/mysql
2. Restart again: sudo mysql.server restart
Related Mysql errors;
The following error occurs when entering mysql
ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: NO)
Problem description: Insufficient permissions
Solution
Terminal command line
sudo su
input password
su -
get root authority - super administrator authority
At this point, you can run the mysql command normally