Restoring a file.sql problems



His guys!

I’m having the following problem:

This is what I want to do, I just moved from my other hosting to DreamHost and I have a SMF forum in my old host, I already changed my DNS and I want to install and restore my forum from my old host to dreamhost but I don’t know how to do this…

This is what I did:

I upload all the SMF php files to the server, and create the data base for my forum in dreamhost, after that I installed the forum and everything seems to be working ok…But right now I want to restore my backup.sql to my dreamhost data base in order for my forum to be working Ok!

I did tried to restore my backup.sql by using phpmyadmin but when I hit “import” it says:

(Warning: mb_strpos(): Unknown encoding or conversion error. in /usr/local/dh/web/phpmyadmin/libraries/string.lib.php on line 112

Warning: mb_strpos(): Unknown encoding or conversion error. in /usr/local/dh/web/phpmyadmin/libraries/string.lib.php on line 112

Warning: mb_strpos(): Unknown encoding or conversion error. in /usr/local/dh/web/phpmyadmin/libraries/string.lib.php on line 112

There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below:)

So right now I don’t know what the problem is and Im trying to restore my backup.sql byusing Putty Client SSH to connect to my SQL Server and now I have this problem when I try to restore my backup.sql using putty client SSH:

Error 1062 (23000) at line 2181: Duplicate entry ‘0-26’ for key 1

Some people told me that the problem was the version of SQL of both servers, because DreamHost SQL is 5.x version and my other (old) server is: 4.x version…

Can somebody please help me with this? I just want to install my forum and restore my backup.sql correctly, I already have more than 24 hours trying to do this…


It may indeed be a problem with going from 4 to 5 although I have used ver 4 database backups for other programs without problem.

It may just be a change of coding so it might be useful if you posted that problem line 112 here in case someone has a suggestion.

Hmmm I have just realised the error is thrown up from a library file on the DreamHost system. So that will not be of much help.
The line I believe is:-
return $GLOBALS[‘PMA_strpos’](’ ’ . $haystack, $needle);

So I would try plan B of deleting the new MySQL database and starting over just in case something was corrupted in the transfer. What I tend to do is transfer any backups back into the new database first before starting up the program just in case anything gets initialised that shouldn’t. Obviously you have changed the necessary hostname from localhost to your new hostname etc?



it might also be wise to try importing from the command line as the error message sigguested. See the Wiki article for help on this.



Thanks Guys for your answer, this is what I finally did:

I went to phpmyadmin in my old hosting and make another sql backup, this time I restore my backup.sql using phpmyadmin of DreamHost…Everything seems to be working allright for right now I have the following problems:

1: My forum is in spanish and I see some weard characters in my comunity, for example when I read a message I see some weard character such as “???” something like this…I don’t know why, I never have this problem before with my other hosting, can you guys please tell me what can I do in order to fix this? I don’t know if this have to do with the “latin1” thing of the server configuration, or I have no idea what this could be…Thanks…

2: I tried to sent 2 mass emails from my SMF (forum) control panel to all my users and it seems not to be working at all, Im not getting any mass email from my forum, I just have 78 users…

My forum is: SMF 1.1 RC2

Thanks for any help.