Problem Description
My local environment is:
- Fresh Ubuntu 16.04
- With PHP 7
- With installed MySQL 5.7
```bash
sudo apt-get install mysql-common mysql-server
```
***
When I tried to login to MySQL (via CLI):
```bash
mysql -u root -p
```
I came across an cyclic issue with 3 steps.
1. First was some socket issue
```bash
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
```
**Solution**: Restarting PC.
Which led to another error:
2. With access denied
```bash
ERROR 1698 (28000): Access denied for user 'root'@'localhost'.
```
Possible issue? Wrong password for `root` user!
**Solution**: [Reset root password with this RackSpace tutorial][1]. With correct password and working socket, there comes last error.
3. Incorrect auth plugin
```bash
mysql "ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded"
```
Here I stopped or somehow got to step 1. again.
[1]: https://web.archive.org/web/20190123093409/https://support.rackspace.com/how-to/mysql-resetting-a-lost-mysql-root-password/
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?