After MySQL installs server side and client, log in to MySQL times wrong:
[[email protected] MySQL 5.6.23-rmp]# MySQL
ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock ' (2)
[[email protected] MySQL 5.6.23-rmp]# service MySQL start
Starting MySQL. [OK]
[[email protected] MySQL 5.6.23-RMP for oraclelinux or rhel5-x86-64v74393-01]# mysql ERROR 1045 (28000): Access denied For user ' root ' @ ' localhost ' (using Password:no
The installation process has not set any password, reload many times is the same ....
==========================
Processing method:
Reset Forgotten MySQL Root Password:
First things first. Log in as root and stop the MySQL daemon.
sudo /etc/init.d/mysql stop
Now lets start up the MySQL daemon and skip the grant tables which store the passwords.
sudo mysqld_safe--skip-grant-tables&
(Press CTRL + C now to disown the process and start typing commands again)
You should see mysqld start up successfully. If not, well you have bigger issues. Now you should is able to connect to MySQL without a password.
sudo mysql--user=root mysql
Update user set Password=password (' New-password ');
Flush privileges;
Exit
Now kill your running mysqld then restart it normally.
sudo killall mysqld_safe&
(Press CTRL + C now to disown the process and start typing commands again)
/etc/init.d/mysql start
You should is good to go. Try not to forget your password again.
Https://www.howtoforge.com/reset-forgotten-mysql-root-password
MySQL ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using password:no