Phpmyadmin logon failure solution summary

Source: Internet
Author: User
Tags ini php file php and phpmyadmin

Error

MySQL returns:

#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:

The code is as follows: Copy code

$ Cfg ['servers'] [$ I] ['user'] = 'user ';
$ Cfg ['servers'] [$ I] ['password'] = 'password ';


Error message: Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. It can be seen from the prompt that it is a PHP problem, search for a solution on the Internet and try it successfully:

1. In the PHP installation directory, change the value of session. auto_start in php. ini to 1 (start). The default value is 0 (disable)
2. Create a folder tmp (such as C:/php/tmp) in the php directory and set the tmp attribute to ervery one for full control.
3. In php. ini finds the session. the row save_path is set to session. save_path = "C:/php/tmp", and remove the semicolon (the above C:/php/tmp is set according to your actual situation)
4. Restart your computer. Everything is OK. You can log on to phpMyAdmin of both versions.


There will be a difference in linux, the error is as follows.

An error is prompted during logon. The error message content is the same, but the code may be different. Because I don't know where the problem is, I often change it here during the test. The error message is as follows:

#2002 Cannot log in to the MySQL server
Or

#2003 Cannot log in to the MySQL server
Or

#1045 Cannot log in to the MySQL server

2. Solution

It took a lot of time yesterday to solve the problem and failed to find the answer from the Internet. I went out for a round today and solved the problem when I came back in the evening. It's actually easy.

Copy the configuration file sample config. sample. inc. php file in the phpMyAdmin installation directory by using cp to the configuration file directory (the following uses only the default directory when the installation method is provided here)

The code is as follows: Copy code

Cp/usr/share/phpMyAdmin/config. sample. inc. php/etc/phpMyAdmin/config. inc. php

Then, directly use vim in the system to edit and modify a little bit of configuration (also recorded in the above-mentioned installation method)

The code is as follows: Copy code

Vim/etc/phpMyAdmin/config. inc. php

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 ';

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.