Home php教程 php手册 修改mysql密码phpmyadmin不能登录

修改mysql密码phpmyadmin不能登录

May 25, 2016 pm 04:52 PM
mysql phpmyadmin Revise password Log in

出现phpmyadmin不能登录是我在修改我mysql服务器密码之后导致的,后来百度了相关的原因,原来是修改了mysql密码之后我们还需要在phpmyadmin目录中去修改config.inc.php中的内容。

错误提示:#1045 - Access denied for user 'root'@'localhost' (using password: YES)

phpmyadmin目录中找到config.inc.php文件,修改如下位置即可,对于config.inc.php文件,最重要的即是修改加入phpMyAdmin连接MySQL的用户名和密码,寻找到代码行:

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

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

将"//"注释号删除,同时输入MySQL中配置的用户名和密码比如这里:

$cfg['Servers'][$i]['controluser'] = 'ids.la';

$cfg['Servers'][$i]['controlpass'] = '*********';

注意:如果需要通过远程服务器调试使用phpMyAdmin,则需要添加blowfish_secret内容定义Cookie,寻找到代码行:

$cfg['blowfish_secret'] = '';

设置内容为COOKIE

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

Linux下phpmyadmin不能登录连接MySQL,且无任何提示的问题解决方法

问题如下:php环境已经配好,正常,phpmyadmin不能登录,不论密码输入是否正确,都没有任何错误提示,自动跳转回到登录页面。

解决方法:

1、在php.ini 找到session.save_path 这一行,设成session.save_path = “/var/lib/php/session”,并把前面的分号去掉,以上的/var/lib/php/session根据你实际情况设定。

2、修改此目录的权限和属主:

# chown -R nobody:nobody /var/lib/php/session(nobody权限很低,最好设置它为web运行账户)

# chmod 777 /var/lib/php/session(session目录至少设置770权限以上,否则phpmyadmin登录会有问题)

3、重启相关服务,如果是apache,就重启apache服务:/etc/init.d/httpd restart;如果是nginx,就重启php-fpm服务,代码如下:

:/etc/init.d/php-fpm restart

文章网址:

随意转载^^但请附上教程地址。

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP's big data structure processing skills PHP's big data structure processing skills May 08, 2024 am 10:24 AM

PHP's big data structure processing skills

How to optimize MySQL query performance in PHP? How to optimize MySQL query performance in PHP? Jun 03, 2024 pm 08:11 PM

How to optimize MySQL query performance in PHP?

How to use MySQL backup and restore in PHP? How to use MySQL backup and restore in PHP? Jun 03, 2024 pm 12:19 PM

How to use MySQL backup and restore in PHP?

How to easily get the WiFi password of a connected mobile phone (quickly find the WiFi password saved in the mobile phone) How to easily get the WiFi password of a connected mobile phone (quickly find the WiFi password saved in the mobile phone) May 08, 2024 pm 01:10 PM

How to easily get the WiFi password of a connected mobile phone (quickly find the WiFi password saved in the mobile phone)

What should I do if my Win10 password does not meet the password policy requirements? What to do if my computer password does not meet the policy requirements? What should I do if my Win10 password does not meet the password policy requirements? What to do if my computer password does not meet the policy requirements? Jun 25, 2024 pm 04:59 PM

What should I do if my Win10 password does not meet the password policy requirements? What to do if my computer password does not meet the policy requirements?

How to insert data into a MySQL table using PHP? How to insert data into a MySQL table using PHP? Jun 02, 2024 pm 02:26 PM

How to insert data into a MySQL table using PHP?

What are the application scenarios of Java enumeration types in databases? What are the application scenarios of Java enumeration types in databases? May 05, 2024 am 09:06 AM

What are the application scenarios of Java enumeration types in databases?

How to fix mysql_native_password not loaded errors on MySQL 8.4 How to fix mysql_native_password not loaded errors on MySQL 8.4 Dec 09, 2024 am 11:42 AM

How to fix mysql_native_password not loaded errors on MySQL 8.4

See all articles