Cannot connect to database

Status
Not open for further replies.

audatioustitan

New Member
Messages
11
Reaction score
0
Points
0
My site went down around 12 hours ago with this error message

Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

I also recieved an email which comprised of:

There has been a problem with the database!
This is a notice email to let you know that SMF could not connect to the database, contact your host if this continues.

I have tried using the restore option on http://lotus.x10hosting.com uploading a tar.gz file i downloaded after creating a back up, this just takes me to a page that doesnt load.

Any one able to help with this? my website is http://www.animekingdom.exofire.net/ thanks

Edit: The page i get redirected to when i click backup loaded but it just contains this image

http://lotus.x10hosting.com:2082/frontend/x3/files/images/up.gif

and the words restoring files. It doesnt seem to be doing anything though.
 
Last edited:

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
My site went down around 12 hours ago with this error message

Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

I also recieved an email which comprised of:

There has been a problem with the database!
This is a notice email to let you know that SMF could not connect to the database, contact your host if this continues.

I have tried using the restore option on http://lotus.x10hosting.com uploading a tar.gz file i downloaded after creating a back up, this just takes me to a page that doesnt load.

Any one able to help with this? my website is http://www.animekingdom.exofire.net/ thanks

It seems to be the database host not going for localhost.

Check the config file and change to localhost.

You are using smf so you can also do it easily with repair_settings.php file download it from the simplemachines site.
 

audatioustitan

New Member
Messages
11
Reaction score
0
Points
0
It seems to be the database host not going for localhost.

Check the config file and change to localhost.

You are using smf so you can also do it easily with repair_settings.php file download it from the simplemachines site.

Thanks for the reply, unfortunatly i am new to this and not exactly sure how to use the repair settings. Any change you could give me a step by step? thanks
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Got into setting repair but it says


Some settings are not being shown because the MySQL connection information is incorrect.

any idea how to fix this? sorry fr so many questions, im still new to all this

First set the mysql connection to the localhost.

Then save

Again reopen the repair_settings then it shows the all the information.

PS: For every field there will be recommended setting, You can read it below the text box.
 
Last edited:

audatioustitan

New Member
Messages
11
Reaction score
0
Points
0
MySQL server: localhost

It was set to local host the first time i accesses it. All the settings are on recommended but i still get

Some settings are not being shown because the connection information is incorrect.
 
Last edited:

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
MySQL server: localhost

It was set to local host the first time i accesses it. All the settings are on recommended but i still get

Some settings are not being shown because the connection information is incorrect.

Once you set the localhost, Did you tried to access the site. It seems it is connecting.
 

audatioustitan

New Member
Messages
11
Reaction score
0
Points
0
Once you set the localhost, Did you tried to access the site. It seems it is connecting.

Nope, still getting

Connection Problems

Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

or the maintanence message when i enable it.

I refresh the setting repair page and still the same message. The info is correct from what i can see, the database name and account info
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Nope, still getting

Connection Problems

Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

or the maintanence message when i enable it.

I refresh the setting repair page and still the same message. The info is correct from what i can see, the database name and account info

Is your database name, database username and password for the database are correct?
 

audatioustitan

New Member
Messages
11
Reaction score
0
Points
0
yea i copied them from my sql database control panel. I am pretty sure that my password is correct. Is there a way to change the password to check?
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
yea i copied them from my sql database control panel. I am pretty sure that my password is correct. Is there a way to change the password to check?

In your cpanel, mysql databases, you can delete the assigned database user(Only database user not database) and recreate the user. Then re assign the user to the database.

Before that take the back up.
 
Last edited:

audatioustitan

New Member
Messages
11
Reaction score
0
Points
0
In your cpanel, mysql databases, you can delete the assigned database user(Only database user not database) and recreate the user. Then re assign the user to the database.

Before that take the back up.

Ok i have made a back up, just to make sure.... i just delete the user for the data base and create a new one? it automatically assigns it as the database user if i add it to the database

Add User To Database


database name
database user
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Ok i have made a back up, just to make sure.... i just delete the user for the data base and create a new one? it automatically assigns it as the database user if i add it to the database

Add User To Database


database name
database user

You recreated the user then assign the user to the database. It ask for privileges then give all.

Now change these things in repair_settings.php
 

audatioustitan

New Member
Messages
11
Reaction score
0
Points
0
You recreated the user then assign the user to the database. It ask for privileges then give all.

Now change these things in repair_settings.php

Yea that worked, thanks ALOT :D

Site is now working again. I am getting

MAJOR SECURITY RISK:
You have not removed repair_settings.php!

Do i just delete if from my database?
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Yea that worked, thanks ALOT :D

Site is now working again. I am getting

MAJOR SECURITY RISK:
You have not removed repair_settings.php!

Do i just delete if from my database?

You need to delete the repaid_settings.php from the filemanager
 
Last edited:

audatioustitan

New Member
Messages
11
Reaction score
0
Points
0
Couldnt find repaid_settings.php in the file manager, i removed repair_settings.php and the security message is no longer there, this should be fine?

Just noticed the typo lol, my bad, again THANKS ALOT. You are a life saver :D
 
Last edited:

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Couldnt find repaid_settings.php in the file manager, i removed repair_settings.php and the security message is no longer there, this should be fine?

Yeah, You did the same thing. Filemanager means in the website files.

Anyway you deleted that its ok.

good luck
 
Status
Not open for further replies.
Top