kostakondras Posted February 7, 2011 Share Posted February 7, 2011 I recently exported a database from phpMyAdmin, now I'm not sure but I assume I missed out on some options, basically the whole import/export thing has got me confused. I think I exported the database however the .sql file that was created doesn't include th SQL commands to create the databse itself, so I assume it just expects a table skeleton to put its data in, now that I can solve by creating a skeleton. However I have another database which I exported in .sql format from another version of phpMyAdmin which is hosted by my server. Anyway once I try to import it back it tells me that I do not have the permission to create a new database (so this database I must have exported with the option to create a new database of the same name when it is re-imported, where is this option?). The problem I am having is that when I import this .sql file (which includes the CREATE DATABSAE command) it tells me that I do not have permissions to create a new database. Then when I create the database myself it then tells me it can't import because the database all ready exists! See the conondrum I'm in? Any suggestions would be appreciated. Thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/226924-database-phpmyadmin-exportimport-headache/ Share on other sites More sharing options...
Pikachu2000 Posted February 7, 2011 Share Posted February 7, 2011 If you create the database manually, just comment out the CREATE DATABASE line. Quote Link to comment https://forums.phpfreaks.com/topic/226924-database-phpmyadmin-exportimport-headache/#findComment-1170889 Share on other sites More sharing options...
lastkarrde Posted February 7, 2011 Share Posted February 7, 2011 What Pikachu said. FYI, when exporting a database in phpmyadmin you can (un)tick boxes on whether to create the schema or not, or even CREATE IF NOT EXISTS. Quote Link to comment https://forums.phpfreaks.com/topic/226924-database-phpmyadmin-exportimport-headache/#findComment-1170905 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.