Forum Moderators: open

Message Too Old, No Replies

MySQL Error 2005 (HY000)?

ERROR 2005 (HY000) at line 362057

         

Menekali

4:30 pm on Aug 20, 2008 (gmt 0)

10+ Year Member



Hello everyone. I'm in the process of putting up a database back up via SSH(root), and am having an issue. It's a backup ~560MB of an Invision Forums export. I'm using this command:

#mysql -uusername -ppassword ipb <ibf_dbbackup.sql

I've also tried:

#mysql -hlocalhost -uusername -ppassword ipb <ibf_dbbackup.sql

Each time I get the following error midway through (it does go through and create a large amount of data, but then I'm hit with):

ERROR 2005 (HY000) at line 362057: Unknown MySQL server host '/>r<br

Does anybody have any idea what I may be able to do about this?

jatar_k

4:34 pm on Aug 20, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I would start by taking a look at line 362057

I assume the command at that line or the one or two before is no good

Menekali

4:55 pm on Aug 20, 2008 (gmt 0)

10+ Year Member



Ok. Any suggestions as so what sort of text editor I could use to open a file this large?

rocknbil

5:28 pm on Aug 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Some of this may or may not be helpful.

I cannot locate the documentation, but that error basically means the mysql server is dying at that point. This could be some limitation in the configuration? (Shouldn't be, but . . . )

It's obviously something in the exported file at that point, without seeing the line there's a couple "stabs" you can take at it.

- Make sure the exported mySQL version and the imported version are the same. Since you got to line 362057, this is probably fine, unless that line uses some command/datatype/charset not in this version or incompatible with this table collation.

- Check the table collation, I've had issues with this, especially with encoded fields. If it was exported as latin and your new DB tables are set to utf8, it could be an issue.

Last, I'm not familiar with that method of data import. Here is what I use. Log in to the EMPTY database (no tables) as the administrative user for the DB (doesn't need to be root, just a valid user with all privileges.)

mysql> source /path/to/database_backup.sql

The two commands are probably identical, but hey, it's worth a shot.

Menekali

8:36 pm on Aug 20, 2008 (gmt 0)

10+ Year Member



I'll begin giving these a try. Thanks a lot rocknbil.

ZydoSEO

9:37 pm on Aug 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm guessing you're on UNIX/Linux? It's been a LONNNNNNNNNNNNNG time since I worked on UNIX (20 yrs LOL). But if you want to see that particular line from the export file couldn't you use some command line commands to do that? Seems like there was a 'head' and 'tail' utility to show the first X or last X lines in a file, respectively. Using pipes you should be able to run head to get the first 362057 lines and 'pipe' standard out from the head command to tail showing the last line. This should give you line 362057 from the file.

I forget the syntax but something like

cat exportfile ¦ head 362057 ¦ tail 1

[edited by: ZydoSEO at 9:38 pm (utc) on Aug. 20, 2008]