Databases: phpmyadmin import?

Databases: phpmyadmin import?

by pierre vairo -
Number of replies: 1

Hi all

I am in the process of moving moodle onto another server.

I have backed up all the files in the XAMPP folder and exported the database to a .SQL file using phpmyadmin.

When i try to import this .SQL file onto the new server, phpmyadmin tells me that i can not because the database 'moodle' already exists...    I get the same error in even if i try to import the file into a newly created database called moodle2

Have i done something wrong by backing up using phpmyadmin?  If so am I in hot water because the old moodle server no longer exists thoughtful

Could someone please help me out or point me in the right direction?

Thanks in advance, pierre

Average of ratings: -
In reply to pierre vairo

Re: Databases: phpmyadmin import?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hi,

you should just look if your .SQL file include a string like "CREATE DATABASE moodle" at the beginning, and delete it (or replace it with "USE moodle").

Hope this helps