Home Backend Development PHP Tutorial Summary of solutions to why phpmyadmin cannot log in_PHP tutorial

Summary of solutions to why phpmyadmin cannot log in_PHP tutorial

Jul 13, 2016 am 10:56 AM
phpmyadmin under cannot exist develop Summarize method Log in of solve

The following summarizes some solutions to the problem that phpmyadmin cannot log in during development. Friends in need can refer to it.

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
 代码如下 复制代码

$cfg['Servers'][$i]['user'] = 'user';
$cfg['Servers'][$i]['password'] = 'password';

Copy code


$cfg['Servers'][$i]['user'] = 'user';

$cfg['Servers'][$i]['password'] = 'password';



Prompt error: Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. From the prompt, you can see that it is a PHP problem. Search the Internet to find a solution and try it. Success:

1. In the PHP installation directory, change the value of session.auto_start in php.ini to 1 (start), the default is 0 (disable)

2. Create a folder tmp in the php directory (such as C:/php/tmp), and set the tmp attribute to every one full control

3. Find the session.save_path line in php.ini, set it to session.save_path = “C:/php/tmp”, and remove the semicolon in front of it (the above C:/php/tmp is set according to your actual situation )
4. Restart the computer, everything is OK, and you can log in to both versions of phpMyAdmin


It will be a little different in Linux, the error is as follows.

An error will be prompted when logging in. The error message content is the same, but the code may be different. Because I don’t know where the problem lies, I often change this and that when checking and testing. The error message is as follows:

#2002 Cannot log in to the MySQL server

or

#2003 Cannot log in to the MySQL server

or

 代码如下 复制代码

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

#1045 Cannot log in to the MySQL server

2. Solution
 代码如下 复制代码

vim /etc/phpMyAdmin/config.inc.php

I spent a lot of time yesterday but couldn’t figure it out, and I couldn’t find the answer on the Internet. I went out for fun today and solved this problem just after I came back in the evening. It's actually very simple.

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

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

$cfg['blowfish_secret'] = '';

Copy code

 代码如下 复制代码

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

cp /usr/share/phpMyAdmin/config.sample.inc.php /etc/phpMyAdmin/config.inc.php
Then use vim to edit and modify some configurations directly in the system (also recorded in the installation method mentioned above)
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 the blowfish_secret content definition cookie and find the line of code:
The code is as follows Copy code
$cfg['blowfish_secret'] = ''; Set content as COOKIE
The code is as follows Copy code
$cfg['blowfish_secret'] = 'leosn';

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632164.htmlTechArticleThe following summarizes some solutions to the problem that phpmyadmin cannot log in during development. Friends in need can refer to it. Error MySQL returns: #1045 - Access denied for user 'root'@'localh...
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 AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

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)

How to set primary key in phpmyadmin How to set primary key in phpmyadmin Apr 07, 2024 pm 02:54 PM

The primary key of a table is one or more columns that uniquely identify each record in the table. Here are the steps to set a primary key: Log in to phpMyAdmin. Select database and table. Check the column you want to use as the primary key. Click "Save Changes". Primary keys provide data integrity, lookup speed, and relationship modeling benefits.

How to recover deleted contacts on WeChat (simple tutorial tells you how to recover deleted contacts) How to recover deleted contacts on WeChat (simple tutorial tells you how to recover deleted contacts) May 01, 2024 pm 12:01 PM

Unfortunately, people often delete certain contacts accidentally for some reasons. WeChat is a widely used social software. To help users solve this problem, this article will introduce how to retrieve deleted contacts in a simple way. 1. Understand the WeChat contact deletion mechanism. This provides us with the possibility to retrieve deleted contacts. The contact deletion mechanism in WeChat removes them from the address book, but does not delete them completely. 2. Use WeChat’s built-in “Contact Book Recovery” function. WeChat provides “Contact Book Recovery” to save time and energy. Users can quickly retrieve previously deleted contacts through this function. 3. Enter the WeChat settings page and click the lower right corner, open the WeChat application "Me" and click the settings icon in the upper right corner to enter the settings page.

How to add foreign keys in phpmyadmin How to add foreign keys in phpmyadmin Apr 07, 2024 pm 02:36 PM

Adding a foreign key in phpMyAdmin can be achieved by following these steps: Select the parent table that contains the foreign key. Edit the parent table structure and add new columns in "Columns". Enable foreign key constraints and select the referencing table and key. Set update/delete operations. save Changes.

Where does the wordpress database exist? Where does the wordpress database exist? Apr 15, 2024 pm 10:39 PM

The WordPress database is housed in a MySQL database that stores all website data and can be accessed through your hosting provider’s dashboard, FTP, or phpMyAdmin. The database name is related to the website URL or username, and access requires the use of database credentials, including name, username, password, and hostname, which are typically stored in the "wp-config.php" file.

How to delete data table in phpmyadmin How to delete data table in phpmyadmin Apr 07, 2024 pm 03:00 PM

Steps to delete a data table in phpMyAdmin: Select the database and data table; click the "Action" tab; select the "Delete" option; confirm and perform the deletion operation.

Four recommended AI-assisted programming tools Four recommended AI-assisted programming tools Apr 22, 2024 pm 05:34 PM

This AI-assisted programming tool has unearthed a large number of useful AI-assisted programming tools in this stage of rapid AI development. AI-assisted programming tools can improve development efficiency, improve code quality, and reduce bug rates. They are important assistants in the modern software development process. Today Dayao will share with you 4 AI-assisted programming tools (and all support C# language). I hope it will be helpful to everyone. https://github.com/YSGStudyHards/DotNetGuide1.GitHubCopilotGitHubCopilot is an AI coding assistant that helps you write code faster and with less effort, so you can focus more on problem solving and collaboration. Git

The secret of hatching mobile dragon eggs is revealed (step by step to teach you how to successfully hatch mobile dragon eggs) The secret of hatching mobile dragon eggs is revealed (step by step to teach you how to successfully hatch mobile dragon eggs) May 04, 2024 pm 06:01 PM

Mobile games have become an integral part of people's lives with the development of technology. It has attracted the attention of many players with its cute dragon egg image and interesting hatching process, and one of the games that has attracted much attention is the mobile version of Dragon Egg. To help players better cultivate and grow their own dragons in the game, this article will introduce to you how to hatch dragon eggs in the mobile version. 1. Choose the appropriate type of dragon egg. Players need to carefully choose the type of dragon egg that they like and suit themselves, based on the different types of dragon egg attributes and abilities provided in the game. 2. Upgrade the level of the incubation machine. Players need to improve the level of the incubation machine by completing tasks and collecting props. The level of the incubation machine determines the hatching speed and hatching success rate. 3. Collect the resources required for hatching. Players need to be in the game

How to set font size on mobile phone (easily adjust font size on mobile phone) How to set font size on mobile phone (easily adjust font size on mobile phone) May 07, 2024 pm 03:34 PM

Setting font size has become an important personalization requirement as mobile phones become an important tool in people's daily lives. In order to meet the needs of different users, this article will introduce how to improve the mobile phone use experience and adjust the font size of the mobile phone through simple operations. Why do you need to adjust the font size of your mobile phone - Adjusting the font size can make the text clearer and easier to read - Suitable for the reading needs of users of different ages - Convenient for users with poor vision to use the font size setting function of the mobile phone system - How to enter the system settings interface - In Find and enter the "Display" option in the settings interface - find the "Font Size" option and adjust it. Adjust the font size with a third-party application - download and install an application that supports font size adjustment - open the application and enter the relevant settings interface - according to the individual

See all articles