Can't connect to local MySQL server through socket
So, I recently went ahead and set up Oracle VM and installed MySQL 8 using yum. Everything seemed to be going well, but when I tried to start MySQL server, I ran into a bit of a hiccup. The error message that popped up said something about not being able to connect to the local MySQL server through a socket.
I even tried running the 'mysql' command in the terminal, and it gave me this error: "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)."
In an attempt to fix things, I thought maybe starting the mysqld service could help. It seemed like it started up fine with the messages "[OK]" showing up.
After that, I tried the 'mysql' command again, but this time, it showed me a different error: "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)."
To get a little more control, I tried using the 'mysql' command with the '-u root -p' options, hoping to enter my password and sort things out. But at that point, it prompted me for a password and didn't seem to proceed any further.
I did some digging around and found this link: (https://tableplus.com/blog/2018/08/solved-cant-connect-to-local-mysql-server-through-socket.html), which seemed to be related to the issue I was facing. It might have some solutions worth exploring.
Hope this helps anyone else who might be facing a similar problem!