Home > Database > phpMyAdmin > body text

What to do if phpmyadmin 1045 error cannot log in to the MySQL server

coldplay.xixi
Release: 2020-08-17 15:28:27
Original
6229 people have browsed it

phpmyadmin 1045 error solution for unable to log in to the MySQL server: 1. Make sure the MySQL username and password are correct, and log in again; 2. Log in using the default root account and empty password that comes with MySQL; 3. Change the HOST host to [%] and save it, restart the MySQL database.

What to do if phpmyadmin 1045 error cannot log in to the MySQL server

【Related tutorial recommendations: phpmyadmin,mysql database graphic tutorial

phpmyadmin 1045 error solution to the MySQL server failure:

1. 1045 error caused by incorrect MySQL user name or password

The MySQL 1045 error may be caused by the MySQL user name or Caused by incorrect password, please make sure the MySQL username and password are correct and log in again.

2. 1045 error message caused by the MySQL password not being set successfully

The MySQL password is not set successfully. You can try to log in using the default root account that comes with MySQL and an empty password.

If empty password login is prohibited, use the following method:

Modify the file:/phpmyadmin/libraries/config.default.php

Modify the config.default.php file , find the two lines of code below:

$cfg['Servers'][$i]['nopassword'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Copy after login

Change false to true in the two lines of code above, and set $cfg['Servers'][$i]['password'] = '';.

After the configuration is completed, use the root account and empty password to log in. After logging in, change the password.

Or you can also change the MySQL password through the SSH client. The file path is: /usr/local/mysql/bin

3. Root user permissions issue leads to 1045 error

Possibly It is caused by the permissions of the root user. Open the user table in the MySQL database. The HOST host of the root user is localhost. Change the HOST host to % and save it. Restart the MySQL database.

Related recommendations: Programming video course

The above is the detailed content of What to do if phpmyadmin 1045 error cannot log in to the MySQL server. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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