Reputation: 11
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.
Upvotes: 1
Views: 290
Reputation: 28721
change into the directory where the sql file is stored, then you'll need to execute something like
mysql –uroot –proot < xyz.sql
Upvotes: 1
Reputation: 74588
To execute the file, at the mysql prompt: source <filename>
If you need to switch to database xyz first, the command is: use xyz
Upvotes: 3