mysql - Access Denied fro user 'root@localhost' on centos 7 -


i newbie centos .

i want setup mysqlfabric multiple mysql servers in single machine.

first want setup mysql instances. following steps followed not start single mysql server instance.

step 1. fresh installation of centos 7

setp 2. added required yum repository mysql-community-server.version.noarch.rpm.

setp 3. installed yum mysql-community-server (the mysql version 5.7.10 installed.)

step 4. checked mysqld status systemctl status mysqld.

step 5. systemctl start mysqld.services

step 6. want check mysql shell.

step 7. had checked mysql client installed while mysql commuinty server has installed.

step 8. mysql root user not prompted password had tried default password . mysql -u root -p mysql

it asking enter password . tried different password getting error  error 1045 (28000) : access denied user 'root'@'localhost' (using password: yes). way tried mysql_secure_installation getting same error. dont know how resolve this.  mysqladmin -u root password = 'newpassword' tried. getting access denied error.  

the root password not yet set access denied. dont know how resolve . please me resolve. in advance.

after first instance running can proceed multiple instances , need configure mysqlfabric. please me.

i had referred mysql installation link http://sharadchhetri.com/2014/07/31/how-to-install-mysql-server-5-6-on-centos-7-rhel-7/

finally resolved problem on centos7 mysqlserver 5.7.10.

the reason behind mysql server 5.7.10 generating random password mysql.

so following commands resolved problem.

step 1. login root

step 2. grep 'temporary password' /var/log/mysqld.log

step 3. show password.

step 4. copy password , following ,

4.1 mysql -u root -p

4.2 enter temporary password

4.3 mysqlserver 5.7.10 has security need update password further process in mysql shell.

so following

alter user 'root'@'localhost' identified 'your new password'; alter user 'root'@'localhost' password expire never; 

4.4 process in mysql shell.

thanks all.


Comments