Database file (phpMyAdmin)

Database file (phpMyAdmin)

by Kyle Goliath -
Number of replies: 3

Good Day all


I've been trying to backup my database in phpMyAdmin but when i try save the file as a zip it gets downloaded as 'sql.file' and not a zip or even gzip. I have tried zip and gzip outputs but it just saves as 50kb file with extension .file named sql. 


I am trying to do a site backup to move to a new server but I cant get this database file downloaded properly.






Anyone that can help please, will be much appreciated.


Kyle

Average of ratings: -
In reply to Kyle Goliath

Re: Database file (phpMyAdmin)

by Ken Task -
Picture of Particularly helpful Moodlers

PHPMyAdmin is prone to the same issues as the command line mysqldump *IF* there is an issue with the DB itself.    What's in the 50K .sql file it provides you?   Test ... can that .sql file be used to restore to a new database on another server or does it fail to restore?   If it fails to restore, there are issues with the DB and neither PHPMyAdmin NOR mysqldump can correct that.  Other DB tools might be required to discover what the issues are in order to know what approach to take to repair it.

Experienced something similar with mysqladmin command to dump all databases to a single .sql file.

One of the databases had a corrupted table so the SQL dump of that one database completed with NO error but portion of the single SQL file for that database actually contained only the header ... not actual data.

'spirit of sharing', Ken



In reply to Ken Task

Re: Database file (phpMyAdmin)

by Kyle Goliath -

Hey Ken 

Thank you for your response.

I actually just found out what i was doing wrong.

Instead of being on the home screen (phpMyAdmin) and clicking export I opened  the database and tried to export from there. So essentially i was only downloading 1 table and not the complete database. Beginner mistake.


Thank you again 

Kyle

In reply to Kyle Goliath

Re: Database file (phpMyAdmin)

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Consider clicking on your Home button in phpMyAdmin, then click on the database, then do the Export.  This might export the entire database.

Maybe you had clicked on the database, then a table, when you started your Export.  This might have caused one table to be exported.