SQL database error when backup imported

Ob3lix

New Member
I have a problem and some help will be greatly appreciated.

My host was hacked some time ago and all the sites on his account were deleted and mine as well. Now it's been a week that I try to bring the forum back online but I have a problem. Every time I import the database on my forum it gives me several SQL errors and I've tried many versions of vBulletin. The problem is I know that was 3.7.2. but I'm not sure if there was PL1 or PL2 or even without patch. As it's almost a year that I run that forum a start from scratches would be a very depressive and hard job. Anyone willing to help just reply here or send me a PM.

Morpheus set my forum the last time I had similar problems but I can't find him for few days now
 

Ob3lix

New Member
There are several error messages.

1st of all you cannot look at no post or thread list. You can just see the forum index page.

I think one of the problem is that backup I made is SQL not .tar.gz

One of the problems is
Code:
sql Error Number  : 1054

the file attached is the error it gives me while trying to view thread.
 

bluescorpion

New Member
The most common reason for the MySQL server has gone away error

1. Is that the server timed out and closed the connection. By default, the server closes the connection after 8 hours or 28800 seconds if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld via your server's /etc/my.cnf as well.

2. Another common reason to receive the MySQL server has gone away error is because you have issued a ``close'' on your MySQL connection and then tried to run a query on the closed connection. You can check that the MySQL hasn't died by executing mysqladmin version and examining the uptime.

i.e. to check mysql uptime, in shell as root user type:

mysqladmin -u root -p version

3. You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld gets a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by starting mysqld with the -O max_allowed_packet=# option (default 1M) or via max_allowed_packet variable in your /etc/my.cnf file and restarting mysql after you edited your /etc/my.cnf file. The extra memory is allocated on demand, so mysqld will use more memory only when you issue a big query or when mysqld must return a big result row

4. or simply your host restarted mysql.. i'd contact your web host
 

Ob3lix

New Member
I've tried downgrading MYSQL and restarting and all but it's always the same error. I have full control on my server and I'm 99% sure that error is not because of MYSQL

EDIT: The problem comes when I import the database

I tried vB 3.7.2
3.7.2. PL1
3.7.2. PL2
3.7.4

Also I tried to uninstall all the hacks once the database was up
 

GgAcE

New Member
Ob3lix said:
I've tried downgrading MYSQL and restarting and all but it's always the same error. I have full control on my server and I'm 99% sure that error is not because of MYSQL

EDIT: The problem comes when I import the database

I tried vB 3.7.2
3.7.2. PL1
3.7.2. PL2
3.7.4

Also I tried to uninstall all the hacks once the database was up


Excuse my ignorance if I am asking the same question you already answered.

#1 Your Vbulletin forum is installed already?
#2 Your forum is completely blank without any modifications?
#3 Your only receiving this error when you attempt to input a VBulletin backup?
 

bluescorpion

New Member
Gotcha, then I think your MySQL is not configured for the dump you are trying to import.

Add this to mysqld section of your my.ini file on windows:

Code:
max_allowed_packet = 64M

* On Linux, edit the /etc/my.cnf file
* Under the [mysqld] section, add the line:

Code:
 max_allowed_packet=64M

You may need to add it to your client section as well.

BTW, I had a similar problem with importing a large database about two weeks ago and this solved it flat out. When I was importing the data, I use command line and could see that the server gone message was happening in the middle of the import, added this line, problem solved. HTH
 

Ob3lix

New Member
GgAcE said:
Excuse my ignorance if I am asking the same question you already answered.

#1 Your Vbulletin forum is installed already?
#2 Your forum is completely blank without any modifications?
#3 Your only receiving this error when you attempt to input a VBulletin backup?

#1 The board was running for almost a year but now I need to bring the backup to a clean installation. Of course on the backup I had some hacks installed.
#2 A completely blank forum runs without any problems
#3 sure. When I try to import 2 backups I made It's always the same problem
 

Ob3lix

New Member
bluescorpion said:
Gotcha, then I think your MySQL is not configured for the dump you are trying to import.

Add this to mysqld section of your my.ini file on windows:

Code:
max_allowed_packet = 64M

* On Linux, edit the /etc/my.cnf file
* Under the [mysqld] section, add the line:

Code:
 max_allowed_packet=64M

You may need to add it to your client section as well.

BTW, I had a similar problem with importing a large database about two weeks ago and this solved it flat out. When I was importing the data, I use command line and could see that the server gone message was happening in the middle of the import, added this line, problem solved. HTH

Let me try this and I'll let you know

EDIT: no result. :S

I just can't believe that importing a database on a board can be such a problem :S

Any more ideas??
 

bluescorpion

New Member
Do you see errors on the screen when you are importing the data? How big is the database?

Try bigdump to import it, that either works or fails so you have an idea where the problem might be.
 

Ob3lix

New Member
No, there are no errors while importing the database.

One of my friends that is a system admin and helped me some times told me that backup is corrupted and that my .sql file does not have all the tables that it must have.

I made the backup from admincp and he told me that is a mistake because php has a timeout error.

Can you confirm that and was that all my mistake??

And ya... sorry I forgot. This sql file has about 55 MB - the forum had about 13 000 posts and 3 K users and just for the record. The tar.gz file that was a full backup made in July was about 65 MB
 

bluescorpion

New Member
Sad to say, I think he's right on that one. I have tried to use backups from there in the past with no success but I was never able to pinpoint exactly why they didn't work. My preferred method is full system back from a cpanel that seems to always work for me.
 

Ob3lix

New Member
well, I decided to import the last cpanel backup I have that I made. The forum was on SMF those days. And then bring it back to vB. Well, I've recieved a hard lession now. Never backup from admincp.

Thank you all for support
 

miniman

New Member
i would recommend not to backup db thru vb admincp, sucks!
you have problem with php timed out try to set it 900 in your phpadmin setting.
 
Top