tags:

views:

38

answers:

3

I've been assigned a downloaded xyz.sql file (which recreates tables and data that resided on another server.

I have running MAMP 1.8.4 on my Mac 10.6.2.

I finally got my mysql prompt at the command line using: /Applications/MAMP/Library/bin/mysql mysql –uroot –proot

Now, what command can take that file for input, give my Mysql server a new database name to use (xyz), and upload the whole thing?

What I mean is - I have other databases that my phpMyadmin sees. I want it to now see this new xyz database the next time I open phpMyadmin.

+2  A: 

To execute the file, at the mysql prompt: source <filename>

If you need to switch to database xyz first, the command is: use xyz

Chad Birch
A: 

change into the directory where the sql file is stored, then you'll need to execute something like

mysql –uroot –proot < xyz.sql
Ben Rowe
A: 

Thanks gentlemen

Frankie