Phpmyadmin cannot be logged on because I modified the password of my mysql server. Baidu later found the cause, after changing the mysql password, we also need to modify the config in the phpmyadmin directory. inc. php content.
Error Message
#1045-Access denied for user 'root' @ 'localhost' (using password: YES)
Find the config. inc. php file in the phpmyadmin directory and modify the following location:
For the config. inc. php file, the most important thing is to modify the username and password used by phpMyAdmin to connect to MySQL. Find the code line:
The Code is as follows: |
Copy code |
// $ Cfg ['servers'] [$ I] ['controluser'] = 'pma '; // $ Cfg ['servers'] [$ I] ['controlpass'] = 'pmapass ';
|
Delete the "//" comment and enter the username and password configured in MySQL, for example, here:
The Code is as follows: |
Copy code |
$ Cfg ['servers'] [$ I] ['controluser'] = 'IDs. la '; $ Cfg ['servers'] [$ I] ['controlpass'] = '*********'; |
Note: If you need to use phpMyAdmin through remote server debugging, you need to add blowfish_secret content to define the Cookie and find the code line:
The Code is as follows: |
Copy code |
$ Cfg ['blowfish _ secret'] = ''; |
Set content to COOKIE
The Code is as follows: |
Copy code |
$ Cfg ['blowfish _ secret'] = 'leosn '; |
In Linux, phpmyadmin cannot log on to MySQL, and there are no prompts to solve the problem.
The problem is as follows:
The php environment is properly configured. Phpmyadmin cannot log on. No error message is displayed no matter whether the password is entered correctly or not. The system automatically jumps back to the logon page.
.
Solution:
1. in php. ini, locate the session. save_path line and set it to session. save_path = "/var/lib/php/session ".
Remove the semicolon.
The above/var/lib/php/session is set based on your actual situation.
2. modify the permissions and owner of the directory:
The Code is as follows: |
Copy code |
# Chown-R nobody: nobody/var/lib/php/session |
(The nobody permission is very low. It is best to set it as a web running account !)
The Code is as follows: |
Copy code |
# Chmod 777/var/lib/php/session
|
(The session directory must have at least 770 permissions. Otherwise, phpmyadmin logon may fail .)
3. restart related services. For apache, restart apache services:/etc/init. d/httpd restart; For nginx, restart php-fpm.
Service
The Code is as follows: |
Copy code |
:/Etc/init. d/php-fpm restart |