Backing up a MySQL DB with phpMyAdmin
Posted on 2006-05-04
I am trying to move to a new web host and I need to move my old MySQL database to my new MySQL database.
What I'm doing:
From phpMyAdmin I choose the database from the drop down menu on the left.
I then choose the "Export" tab
I leave all the options as default (Export as SQL, Structure > Add AUTO_INCREMENT and Enclose table and field names with backquotes, Data > Use hexadecimal for binary fields, Export Type > Insert)
I then download the .sql file
On my new host I create a new database. I then select the database and click on the SQL tab.
I use the "Browse" button to choose the location of the .sql file.
I kept getting errors here until I changed the SQL export compatibility: to MySQL4 when exporting from the old database.
This seemed to work. The webpage that accesses the database is actually a knowledgbase. The knowledgebase loads fine and actually shows all the subcategories and knowledgebase article names. However when I click on a knowledgebase article to read it, I keep getting the following error:
Invalid query: Column 'id' cannot be null
I can't tell if this is something I'm doing wrong when backing up and restoring the database or if there is something else I'm missing. Any suggestions?