• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Importing Database from backup problems on my vps


Active member
I've imported a database using the mysql command line before using this command:
mysql -u root -p -h localhost ngpforum_xf < /tmp/ngpforum_xf.sql
and this worked well when I transferred from my shared hosting site.

On my vps I setup Mopquill's Database Backup Script as a chron job and when trying to import it, the command line seemed to freeze, but it would let me do the help commands like \h and \s for status (too bad I don't really understand the information the status gave me). When I typed a ";" it told me there was an error in the sql file. I tested the backup in MAMP and phpmyadmin loaded it fine so after a while, I decided to install phpmyadmin. I'm using nginx so it was a struggle to do it and I still gave me an error with linked lists. I tried importing the database, it took a while and then gave me the error that either the file was empty or that the file was too large so I increased the import sizes for both php and nginx greatly. Restarted server/php etc, tried again, same error.

My last resort was, copy paste it into the text box under the sql tab and it worked!

Well. Only problem is, it changed some odd characters such as
CPU: ARM® Cortex™-A9 core (4 core)
to this:
CPU: ARM® Cortex™-A9 core
So now I'm guessing there was a encoding problem which may be why the command line locked up.

Can anyone guide me? Can I fix this problem without going back to the old backup (since people have posted since then).

Jake Bunce

XenForo moderator
Staff member
What was the error in the sql file? Did it give you a specific error?

If the backup isn't very large then I can take a look if you provide me a download link. I have a lot of experience working with database backups.