簡體   English   中英

phpMyAdmin MySQL錯誤#1045

[英]phpMyAdmin MySQL error # 1045

我一直在努力設置一個家庭Web服務器,現在整個早晨都在工作,除了我不能再從Web服務器訪問phpMyAdmin之外,它的工作情況很好。 config.inc.php中的密碼和用戶與MySQL中的密碼匹配,我可以很好地訪問MySQL控制台。

我已經為Web服務器設置了端口轉發,並向DNS注冊了域名,並修改了httpd.conf文件以允許訪問。

這是httpd.conf目錄的各個部分:

ServerName localhost:80
DocumentRoot "c:/wamp/www/"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all
#   onlineoffline tag - don't remove
    Order allow,deny
    Allow from all
</Directory>

這是我的config.inc.php文件:

<?php

/* Servers configuration */
$i = 0;

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'XXXXXXX';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* End of servers configuration */

$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';


/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
?>

我已經讀了數小時的問題和答案,我不知道是什么原因造成的,有什么想法嗎? 謝謝。

我發現了問題所在。 盡管以上所有信息均正確無誤,但Web瀏覽器在不正確的情況下緩存了該信息。 我要做的就是清除緩存並重新啟動服務器。

對我來說,搜索許多答案后,正在config.inc.php中更改主機。

默認情況下是:

$ cfg ['Servers'] [$ i] ['host'] ='127.0.0.1';

但是改為

$ cfg ['Servers'] [$ i] ['host'] ='localhost';

為我解決了問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM