Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My new webhosting company has set up a MySQL database for me and it has the tables MySQL and Information_schema already there. I want to copy my existing database from another server (a) to the new one (b). I assume I need to overwrite the 'mysql' database on server (b) with the one from my existing server (a) or atleast copy over the users and permissions.

  1. What information does the mysql database hold? users and permissions I can see, does it have the login info for phpMyAdmin? I dont want to overwrite that obviously.
  2. Should I drop the table on server (b) and import my original?
  3. Should I just copy the users table?
  4. Do I need to worry about the information_schema table? should I copy this over too?

thanks

share|improve this question

2 Answers 2

up vote 3 down vote accepted

To migrate from your old system to the new one export all the databases and tables EXCEPT mysql and Information_Schema. Then import them into the new system.

The mysql database is the "system" database and you shouldn't even be seeing it if the system was set up correctly. You certainly shouldn't have, or require, write access to it. Ditto for the schema, which is a virtual table and doesn't actually exist.

share|improve this answer
    
Thanks, so should I manually create the users and set permissions once I have imported the databases? The way I did it was to export each database individually as SQL and then create a new database on new server and import from file. –  undefined Apr 1 '10 at 13:27
    
Normally MySQL users, as stored in the mysql database are mainaitned by your hosting company and you will not be able to make changes there. If in doubt, talk to the hosting company support people. Any users contained in your application databases will of course be retained when you import the old data. –  John Gardeniers Apr 2 '10 at 0:13

Chances are those tables are not writable for you.

You will most likely just want to copy over the data tables relating to your use and then update your web config files with the new username given to you by the host and the password for the database that you will change so it's not the default one given by them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.