News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

My Forum is COMPLETELY down.

Started by Izirae, November 25, 2010, 01:16:09 AM

Previous topic - Next topic

Izirae

"Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later."
That's the error I keep getting when I try to access my forum. I've Google'd and searched for a solution, but I've yet to come across a fitting one.
I was trying to figure out how to import my database for my forum onto another website, and I was trying to change the password...
I went to the Server Settings and changed the password, but then I received that error and I can't bring up my forum!
I tried that repair_settings.php thing too, but it won't do anything. I've CHMOD'd and refreshed about a billion times...

Can someone help me? Or direct me to a board that would assist me.
Sorry if I posted this in the wrong place.

Paul_Pauline

Hi.

You should be able to get the correct password from your settings.php file, or your hosts control panel.
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

kat

You can't, actually, change the password, in Server settings.

If you do, it can't connect, as you've discovered.

You simply give the password, there. It HAS to be the correct password.

The only way to CHANGE the database's password, is by going to your site's CPanel.

So...

Whatever the password is, it has to be the same as it is, there.

As you can't get into your forum, now, the only way to get the password right is to download Settings.php and find the section headed:

########## Database Info ##########

Then, you need to put the correct password in this bit:

$db_passwd = 'YourDatabase'sPassword';

Road Rash Jr.

I've seen that error too and my host says it's due to to many people on the shared server at the same time. Usually if you wait a few minutes you can log in ok.
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Paul_Pauline

Not if you've changed the password you can't   ;)
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

Izirae

Quote from: K@ on November 25, 2010, 09:59:10 AM
You can't, actually, change the password, in Server settings.

If you do, it can't connect, as you've discovered.

You simply give the password, there. It HAS to be the correct password.

The only way to CHANGE the database's password, is by going to your site's CPanel.

So...

Whatever the password is, it has to be the same as it is, there.

As you can't get into your forum, now, the only way to get the password right is to download Settings.php and find the section headed:

########## Database Info ##########

Then, you need to put the correct password in this bit:

$db_passwd = 'YourDatabase'sPassword';

Oh...well, I tried doing that, and it still came up with the same error (I'm using 2.0 RC2 by the way).
I've tried changing the password to different ones I thought it would be, then uploading it, but to no avail.
Someone else suggested that I enter my password into the repair_settings.php file?

As for changing the password, that's actually how I tried doing it. xD I went to the admin section of the forum, and tried changing it. That's how I got to where I am. :(
I don't know if it's related, but I do not have access my phpMyAdmin because I am not the original owner of my website.
Dunno if that's useful.

Quote from: Paul_Pauline on November 25, 2010, 03:11:04 AM
Hi.

You should be able to get the correct password from your settings.php file, or your hosts control panel.

Ah, well, unfortunately, I do not have access to my host's control panel. Someone else is in charge of that.
I'll ask him if he can look into it.
Since I'm in the process of switching hosts, and I have the localhost.sql (I downloaded it about two days ago), so couldn't I just upload that to my new server's database? And install a new forum?

Sorry for all the questions. X_x

kat

You'll need the passwords to download the database, won't you?

Izirae

Uhm? To download what database?
I've already downloaded the database (with the tables and stuff)...do I need some kind of password to upload it to a new forum?
Actually, before my forum went down, I attempted uploading it to my server's phpMyAdmin, but it didn't work due to duplicate tables...
I'm really confused, and apparently, my host says he can't help me. This is really stressing me out!
Can someone explain to me what course of action I should take that would be best?

kat

I meant to get into your CPanel to download the database.

Yes, you already have it. But, as you've said, it's damaged.

So, why not go to CPanel>Databases>MySQL® Databases and repair the database, then download it, again?

Izirae

Hm. Well, I don't have access to my host's CPanel, unfortunately.
So I was thinking that I might have to just move the domain to my own server.
Once I do that, does the database shift over to my server too?
MySQL is a bit of a dark area for me. :X

Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Izirae

Gotcha.
I tried to do the first one, I got this error:
QuoteError
SQL query:

INSERT INTO `smf_log_search_subjects` (`word`, `id_topic`) VALUES ('#8', 1113), ('#8', 1129), ('#8', 1192), ('#8', 1220), ('#8', 1237), ('#8', 1249), ('#8-1', 1153), ('#8-1', 1154), ('#8-1', 1208), ('#8-2', 1246), ('#8-2', 1300), ('#9', 361), ('#9', 619), ('#9', 676), ('#9', 796), ('#9', 805), ('#9', 944), ('#9', 969), ('#9', 987), ('#9', 1068), ('#9', 1079), ('#9', 1089), ('#9', 1091), ('#9', 1109), ('#9', 1114), ('#9', 1118), ('#9', 1127), ('#9', 1187), ('#9', 1206), ('#9', 1215), ('#9', 1244), ('#9', 1267), ('#9', 1320), ('#simple', 1205), (01, 38), (01, 54), (01, 124), (01, 358), (02, 38), (02, 57), (02, 141), (02, 187), (03, 54), (03, 625), (03, 881), (03, 1202), (04, 152), (04, 881), (04, 1085), (05, 141), (05, 295), (05, 424), (05, 461), (05, 536), (05, 1136), (05, 1141), (06, 378), (06, 495), (06, 1136), (06, 1195), (06, 1196), (07, 538), (07, 713), [...]

MySQL said:

#1062 - Duplicate entry '1-54' for key 'PRIMARY'

As for the second option, hm...I don't have a directory for public_html files.
However, I did save all my database files, and have downloaded all my files.
At this point, I just want to see whether or not I can restore the database without exporting it from the current host via phpMyAdmin.
Gosh, I'm just having so many issues here. :'( Sorry about that.

Izirae

Ohhh-kay...
My forum is up, on another domain atm for testing. But the only problem...
None of the posts, nor members are showing up--though it says how many posts and members there are.
The only apparent thing lost is the stats for the forum.
This is my site:
www.sscans.com/forum.
Everything is there. I don't get this at all.

Norv

Is the database backup complete? (the .sql file I think you should have - the one you exported and restored)
How big is it?

Can you open it in a code editor (if it's small enough) and let us know what are the last 2-5 lines of the file? (no need to post anything confidential, just how it ends if it's nothing sensitive)
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Izirae

Hm. Well the size of the .sql file is 14.2 MB. It appears to be complete...
The last two lines:
Quote(1343, 0, 11, 11122, 11154, 6, 8, 0, 0, 0, 12, 30, 0, 0, 1),
   (1344, 0, 19, 11127, 11144, 38, 6, 0, 0, 0, 1, 7, 0, 0, 1),
   (1345, 0, 11, 11129, 11137, 8, 6, 0, 0, 0, 2, 19, 0, 0, 1);
-- --------------------------------------------------------

-- Done

On a side note, when I uploaded the .sql file to my new forum, it only partially restored my forum.
I found that if I break up the tables, and then upload them to their respective tables in the database, I can manually restore them.
But that is a painstaking process, so I'd like to do it all at once, if possible. xD

Norv

I think you're right. Your new host's phpmyadmin probably times out while uploading the file, if you use phpmyadmin to restore it.

You could try a backup utility like big_dump (you can find it on google) which restores database backups handling them table by table (even by partial inserts) as necessary, to avoid timing out.

Or, you could perhaps suggest to your new host to upgrade their phpmyadmin, if not already done, I understand that newer phpmyadmin versions handle timeouts as well.

Or, you could try to archive the .sql file as .tar.gz, and import it as such.

Or, if by any chance you have ssh access, you can use the command line mysql client to import it, that'd be certain. :)
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: