Modify the MySQL login password in the 1.centos6.5.
[Email protected] ~]# mysql-u root-p
Enter Password:
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes)
Error message,
Workaround:
[[email protected] ~]# /etc/init.d/mysqld Stop
Stop mysqld: [OK]
[Email protected] ~]# mysqld_safe--user=mysql--skip-grant-tables--skip-networking &
[[email protected] ~]# mysql-u root MySQL
Reading table information for completion of table and column names
Can turn off this feature to get a quicker startup with-a
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 1
Server version:5.1.73 Source Distribution
Copyright (c) and/or, Oracle, its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Now start to change the password red is the new password by default is under the root account to modify the color is the new password by default is changed under the root account
mysql> UPDATE user SET Password=password ('77066188') where user= ' root ';
Query OK, 3 Rows Affected (0.00 sec)
Rows Matched:3 Changed:3 warnings:0
mysql> FLUSH privileges;
Query OK, 0 rows Affected (0.00 sec)
Mysql> quit
The next thing to do is restart MySQL
[Email protected] ~]# /etc/init.d/mysqld Restart
141105 16:47:10 mysqld_safe mysqld from PID File/var/run/mysqld/mysqld.pid ended
Stop mysqld: [OK]
Starting mysqld: [OK]
[1]+ done Mysqld_safe--user=mysql--skip-grant-tables--skip-networking
Log back in to MySQL
[Email protected] ~]# mysql-u root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 2
Server version:5.1.73 Source Distribution
Enter the password you just modified in red. You can come in, MySQL.
2. Unable to log in to phpMyAdmin, reported 1130 error
CentOS installation configuration Good phpMyAdmin Web login phpMyAdmin Interface Error
1. Workaround,
[Email protected] ~]# mysql-u root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 4
Server version:5.1.73 Source Distribution
Copyright (c) and/or, Oracle, its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
mysql> use mysql;
Reading table information for completion of table and column names
Can turn off this feature to get a quicker startup with-a
Database changed
mysql> Select ' Host ' from user where user= ' root ';
+------+
| Host |
+------+
| Host |
| Host |
| Host |
+------+
3 Rows in Set (0.00 sec)
Use authorized methods to grant remote access to users
GRANT all privileges on * * to ' root ' @ '% ' identified by ' MyPassword ' with GRANT OPTION;
Mysql> Select user,host from user;
+------+-----------+
| user | Host |
+------+-----------+
| Root | % |
| Root | 127.0.0.1 |
| | Cmstest |
| Root | Cmstest |
| | localhost |
+------+-----------+
5 rows in Set (0.00 sec)
Mysql> Grant all privileges on * * to ' root ' @ '% ' identified by ' 77066188 ' with GRANT option;
Query OK, 0 rows Affected (0.00 sec)
Mysql> Select user,host from user;
+------+-----------+
| user | Host |
+------+-----------+
| Root | % |
| Root | 127.0.0.1 |
| | Cmstest |
| Root | Cmstest |
| | localhost |
+------+-----------+
5 rows in Set (0.00 sec)
Mysql> quit
Bye
Here are the related commands
582/etc/init.d/mysqld stop
583 Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &
584 mysql-u Root MySQL
585/etc/init.d/mysqld restart
586 Mysql-u Root-p
587/etc/init.d/mysql stop
588/etc/init.d/mysqld stop
589 mysqld_safe--user=mysql--skip-grant-tables--skip-networking &
590 mysql-u Root MySQL
591/etc/init.d/mysqld restart
592 Mysql-u Root-p
593/etc/init.d/mysqld restart
594 [[email protected] ~]#/etc/init.d/mysqld stop
595 Stop mysqld:
After exiting MySQL, restart the transfer phpMyAdmin login screen. Now you can login and try it.
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650; src=/e/ U261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") No-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
phpMyAdmin Login error plus linux modify MySQL login password