Home php教程 php手册 phpmyadmin不能登录解决方法总结

phpmyadmin不能登录解决方法总结

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

下面总结一些在开发中碰到的phpmyadmin不能登录解决方法,有需要的朋友可参考参考。

错误

MySQL 返回:

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

phpmyadmin目录中找到config.inc.php文件,修改如下位置即可

 代码如下 复制代码

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


提示错误:Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly,通过提示能看出是PHP的问题,在网上一番搜索,找到解决方案,尝试成功:

1、在PHP的安装目录将php.ini中的session.auto_start的值改为1(启动),默认是0(禁用)
2、在php的目录建立个文件夹tmp(如C:/php/tmp),设置tmp属性为ervery one完全控制
3、在php.ini找到session.save_path 这一行,设成session.save_path = “C:/php/tmp”,并把前面的分号去掉(以上的C:/php/tmp根据你实际情况设定)
4、重启电脑,一切都OK了,两个版本的phpMyAdmin也都能登陆了


linux中会有一点不一样,错误如下。

登录的时候会提示错误。错误提示内容都一样,不过可能代码不一样。因为不知道问题所在,检查测试的时候经常改改这里、改改那里。错误提示如下:

#2002 Cannot log in to the MySQL server
或者

#2003 Cannot log in to the MySQL server
或者

#1045 Cannot log in to the MySQL server

2. 解决

昨天花了很多时间都没搞定,也没能从网上找到答案。今天出去玩了一圈,晚上刚回来就解决了这个问题。其实好简单。

直接 cp 复制 phpMyAdmin 安装目录中的配置文件样例 config.sample.inc.php 文件到配置文件目录(以下只用均为采用这里提供的安装方式时的默认目录)

 代码如下 复制代码

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

然后在系统中直接使用 vim 编辑修改一点儿配置(同样在上面提到的安装方式中有记录)

 代码如下 复制代码

vim /etc/phpMyAdmin/config.inc.php

注意:

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

 代码如下 复制代码

$cfg['blowfish_secret'] = '';

设置内容为COOKIE

 代码如下 复制代码

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

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

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 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 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.

What is the password for the phpmyadmin account? What is the password for the phpmyadmin account? Apr 07, 2024 pm 01:09 PM

The default username and password for PHPMyAdmin are root and empty. For security reasons, it is recommended to change the default password. Method to change password: 1. Log in to PHPMyAdmin; 2. Select "privileges"; 3. Enter the new password and save it. When you forget your password, you can reset it by stopping the MySQL service and editing the configuration file: 1. Add the skip-grant-tables line; 2. Log in to the MySQL command line and reset the root password; 3. Refresh the permission table; 4. Delete skip-grant-tables line, restart the MySQL service.

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

See all articles