Can not restore Mysql databases from ungzipped SQL file

saosangmo

Verified User
Joined
Oct 3, 2012
Messages
114
Location
Hanoi
Hi,
I have a problem about restore mysql databae.
After I create mysql db and user, I choose my file to restore, click on upload --> get the message "Database has been successfully Restored". But my db after restore is still empty.

You can look into the screen capture for more details.

Untitled.png

Please help me.
Thanks
 
Well if it's really 0 Bytes, then there's no wonder it's empty.

Could you describe your process?

You create database, create user and pass and then export?
No content filled?
 
hi,
I create database, create user & pass and then import.
The existing database is on local (use MySQL 5.0). My version on the server is 5.5.
The DA say that "Database has been successfully Restored" but no content's filled.
Where can I see the logs?
thanks
 
If you host MySQL server on a remote server, you should check this: http://help.directadmin.com/item.php?id=140

Now.. the easier part is to tell DA to use the remote server. Edit:
/usr/local/directadmin/conf/mysql.conf
add the line:
host=4.3.2.1
where 4.3.2.1 is the IP of your remote server. Make sure there is a newline character at the end of the line.. (Eg, press enter)

If not, then you might need to run directadmin in debug mode and see what happens there

Logs here: /var/log/directadmin/
MySQL logs: /var/lib/mysql/*.err
 
If logs won't help, try importing it via phpmyadmin, as it will tell you if any errors occur.

By the way, what is the size of archive on your local computer? Can you extract it and open with text editor?

Mysql server should not make a difference, since SQL language is still the same, and 5.5 is backwards compactible.
 
At last, I find the main problem. Because I use dump file with .sql extension. DA only uses .gz for restoring db.
But DA should warning if user import the raw dump file.
-saosangmo
 
Back
Top