Login phpMyAdmin prompt: #1045 Unable to log on to MySQL server

Source: Internet
Author: User
Tags phpmyadmin

Open phpMyAdmin, log in, the following problems occur, prompted: #1045 unable to log on to the MySQL server

The following error condition may occur: phpMyAdmin: #1045 cannot log on to the MySQL server. Access denied for user ' root ' @ ' localhost ' (using Password:yes)

Cause: This may be due to the previous setting of the MySQL password is not successful, so we use the set MySQL root password can not log on to the server.

Workaround: You can then attempt to log into the database using the empty password of the MySQL default root account.

If you log in with a blank password, it appears: empty password login is forbidden (see allow null password) error. To modify the/phpmyadmin/libraries/config.default.php file, locate the following two lines

$cfg [' Servers '] [$i] [' nopassword '] = false;
$cfg [' Servers '] [$i] [' allownopassword '] = false;

Change two false to True and set $cfg [' Servers '] [$i] [' password '] = "; After you set up the configuration file, phpMyAdmin allows you to log in to the MySQL database with a blank password.

If you re-login to phpmyadmin with a blank password, you may still not be able to log in, please clear the cookie or close the original phpMyAdmin login window and re-login with a blank password.

If this time still shows the blank password login is forbidden, try to enter a few characters as a password to see if the landing is successful.

Log in to MySQL server and change the MySQL password in phpMyAdmin as soon as possible. or modify the MySQL password on the SSH client: cd/usr/local/mysql/bin

Then execute the command:./mysqladmin-u root-p passwordhttp://laser-mall.com/passwd.

Finally, all users except root are removed from the MySQL user table.

Login phpMyAdmin prompt: #1045 Unable to log on to MySQL server

Related Article

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.