Home > Backend Development > PHP Tutorial > Modify mysql password phpmyadmin cannot log in_PHP tutorial

Modify mysql password phpmyadmin cannot log in_PHP tutorial

WBOY
Release: 2016-07-13 10:56:39
Original
1050 people have browsed it

The reason why phpmyadmin cannot log in was after I changed the password of my mysql server. Later, Baidu found out the relevant reason. It turned out that after changing the mysql password, we still need to modify the contents of config.inc.php in the phpmyadmin directory. .

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 to join phpMyAdmin to connect to MySQL. Find the line of code:

The code is as follows Copy code
 代码如下 复制代码


// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';

// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';

Delete the "//" comment number and enter the username and password configured in MySQL, such as here:
 代码如下 复制代码
$cfg['Servers'][$i]['controluser'] = 'ids.la';
$cfg['Servers'][$i]['controlpass'] = '*********';


The code is as follows Copy code
$cfg['Servers'][$i ]['controluser'] = 'ids.la'; $cfg['Servers'][$i]['controlpass'] = '************';
 代码如下 复制代码

$cfg['blowfish_secret'] = '';

Note: If you need to use phpMyAdmin through remote server debugging, you need to add the blowfish_secret content definition cookie and look for the line of code:

The code is as follows Copy code
$cfg['blowfish_secret'] = '';
 代码如下 复制代码

$cfg['blowfish_secret'] = 'leosn';

Set the content to COOKIE

The code is as follows Copy code

$cfg['blowfish_secret'] = 'leosn';
Solution to the problem that phpmyadmin cannot log in and connect to MySQL under Linux without any prompt

The question is as follows:
The php environment has been configured and is normal. phpmyadmin cannot log in. No matter whether the password is entered correctly or not, there is no error message and it automatically jumps back to the login page

Noodles.

Solution:

1. Find the session.save_path line in php.ini, set it to session.save_path = “/var/lib/php/session”, and replace the previous

 代码如下 复制代码
# chown -R nobody:nobody /var/lib/php/session
Remove the semicolon.

The above /var/lib/php/session is set according to your actual situation.

 代码如下 复制代码
# chmod 777 /var/lib/php/session
2. Modify the permissions and owners of this directory: (nobody has very low permissions, it is best to set it as a web running account!)
The code is as follows Copy code
# chmod 777 /var/lib/php/ session

(Session directory must be set to at least 770 permissions, otherwise there will be problems logging in to phpmyadmin.)

3. Restart related services. If it is apache, restart the apache service: /etc/init.d/httpd restart; if it is nginx, restart php-fpm

Service

 代码如下 复制代码
:/etc/init.d/php-fpm restart

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632145.htmlTechArticleThe reason why phpmyadmin could not log in was because I changed the password of my mysql server. Later, Baidu found out the related reasons. It turned out that After changing the mysql password, we still need to enter the phpmyadmin directory...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template