[Wordpress] Error establishing a database connection. Advise.

Status
Not open for further replies.

misterspock

New Member
Messages
85
Reaction score
0
Points
0
Hi there,

I have a problem with my website: Error establishing a database connection

That's all it says: http://www.campus-swag.com

Is there anything that x10hosting can do on their side to fix this? Or is it on my end (ie. wordpress)?

Note:
0.00MB on wordpress database

Question:
If I create a new database, will I lose my website content?

More information about the issue: http://wordpress.org/support/topic/404892?replies=3#post-1534096

Advise.
 
Last edited:

Derek

Community Support Force
Community Support
Messages
12,882
Reaction score
186
Points
63
Try and remove the user from the database and re-link it. But don't delete it..
 
Last edited:

techairlines

x10 Flyer
Community Support
Messages
2,867
Reaction score
165
Points
63
You can probably also ignore the 0.00 MB count for the database size. I believe its a glitch with cPanel right now. I have 0.00 MB shown also but my database works fine.

Try Derek's suggestion.

If you create a new database, you will need to import over your original database, though creating a new one shouldn't be necessary.
 

misterspock

New Member
Messages
85
Reaction score
0
Points
0
When you say "import over", do you mean creating a new database such as wordpress1 (db), replacing the original wordpress (db) in the wp-config.php?

Argghh, I created a new db (wordpress1) to replace (wordpress) in the wp-config.php and my page is completely erased with a fresh wordpress page.

Question: how do you import data from original database to a new one?

Here is what I did
I exported the db (wordpress) and imported to (wordpress1) from myphpadmin. However, I got this error message:

Note: replaced usernames and db for security purposes

SQL query:

--
-- Database: `****_****`
--
CREATE DATABASE `****_****` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;


MySQL said:

#1007 - Can't create database '****_****'; database exists
 
Last edited:

Derek

Community Support Force
Community Support
Messages
12,882
Reaction score
186
Points
63
No! You were supposed to go to mysql -> Add User To Database ._ re add with all privdlges
 

techairlines

x10 Flyer
Community Support
Messages
2,867
Reaction score
165
Points
63
When you say "import over", do you mean creating a new database such as wordpress1 (db), replacing the original wordpress (db) in the wp-config.php?

Argghh, I created a new db (wordpress1) to replace (wordpress) in the wp-config.php and my page is completely erased with a fresh wordpress page.

Question: how do you import data from original database to a new one?

Here is what I did
I exported the db (wordpress) and imported to (wordpress1) from myphpadmin. However, I got this error message:

Note: replaced usernames and db for security purposes

Creating a new database is the hard way to do this and should be tried only if readding the user with all privileges does not work, which it usually does work. Please follow what Derek is saying by dropping the user from the database and adding it back.
 

Derek

Community Support Force
Community Support
Messages
12,882
Reaction score
186
Points
63
Has your error been solved?
 

carl6969

Community Support Team
Community Support
Messages
6,874
Reaction score
206
Points
63
Has your error been solved?
"woot woot. you folks are da men or women!"
I would interpret that as a happy "problem solved" kind of statement :smile:
 
Status
Not open for further replies.
Top