You cannot log on to phpmyadmin by changing the mysql password.

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.