2014-03-06 42 views
-1

嗨,我試圖在XAMPP安裝worpress設計和測試我的博客上,但是當我去到localhost/WordPress的它總是告訴我,WordPress的上XAMPP數據庫錯誤

「錯誤建立一個數據庫連接」

請幫助一直嘗試。

// ** MySQL settings - You can get this info from your web host ** // 
/** The name of the database for WordPress */ 
define('DB_NAME', 'wordpress'); 

/** MySQL database username */ 
define('DB_USER', 'root'); 

/** MySQL database password */ 
define('DB_PASSWORD', ''); 

/** MySQL hostname */ 
define('DB_HOST', 'localhost'); 

/** Database Charset to use in creating database tables. */ 
define('DB_CHARSET', 'utf8'); 

/** The Database Collate type. Don't change this if in doubt. */ 
define('DB_COLLATE', ''); 

我運行它WindowsXP

+0

而您的數據庫服務器正在localhost下運行,並設置了無密碼用戶root?你是否創建了數據庫'wordpress'? – FAS

+0

我有phpMyadmin拉起來,我創建了一個數據庫WordPress的一切都設置爲無密碼「據我所知」。 – budsemporium

+0

據你所知?如果你有一個沒有密碼的用戶root,你會在phpMyAdmin首頁上看到一個很大的紅色警告。 – FAS

回答

-1

該錯誤消息會建議你有你的詳細代碼示例中是不正確的。

你有'wordpress'表嗎?

您可以使用XAMPP套件使用帳戶'root'而無密碼登錄到phpMyAdmin嗎?

您可能需要使用密碼設置新用戶帳戶並授予相關權限,然後重新安裝Wordpress。

+0

不,我沒有一個表,我是新來的,不知道那是什麼。我去過很多網站,看過很多視頻,而且大多數人都表現出來做同樣的事情。但是當我嘗試它時,我得到了數據庫錯誤 – budsemporium

0

嘗試在您的MySQL服務器上創建Wordpress數據庫

+0

我在phpmyadmin中做了,並設置爲utf8_unicode_ci – budsemporium