TwelvestoneBack End

Anyone wanna help a command line n00b?


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
Tha.Riddla
 
2011-09-23

Who's got some command line goodness for dumping a mysql db on a dev site and then importing and overwriting to my local instance?

the simple: mysqldump -u USER -p DB_NAME > FILE.SQL

seems to have exported fine, producing a nice 82 meg file (which I assume is all the data) but on the import end it didn't seem to write new db fields and/or data.

OMGTHX!

Stinky
 
2011-09-23

mysql -u user -p -D DB_NAME < FILE.SQL

Should do it, IIRC.

Tha.Riddla
 
2011-09-23

i'm guessing the -D is the key operator there?

Stinky
 
2011-09-23

Well, the -D, and the less-than sign < that reads the FILE.SQL into the msql command.

Tha.Riddla
 
2011-09-23

yeah, still not importing correctly..weird. I think this MAMP install gives me a weird mysql dump version or something. I don't ahve the option for -D and --add-drop-tables seems to be more of an export functionality.

looks like i have a mysqlimport command. I'm going to explore that. I'm guessing I should be using that k

Stinky
 
2011-09-23

Try not putting a space between the -D and the database name.

Tha.Riddla
 
2011-09-24

i'm just gonna ditch this MAMP crap and set up mysql for real. I've been needing to do it and this is just the reason i need to.

RobotDeathSquad
 
2011-09-24

Originally posted by Tha.Riddla

i'm just gonna ditch this MAMP crap and set up mysql for real. I've been needing to do it and this is just the reason i need to.

If you're on mac, check out Sequel Pro. I think it's free and it makes it super easy to move db's around.

Tha.Riddla
 
2011-10-31

Originally posted by RobotDeathSquad

If you're on mac, check out Sequel Pro. I think it's free and it makes it super easy to move db's around.

Just used this...awesome. It's the combo of gui and command line that i need for sure.

:thumbsoup:

arigato
 
2011-11-01

Oh, I see how it is. "gui". A soft g I'll bet - like Jewy. Of course, it's always about the Jews because they "command" everything. You fucking fascist.

*stomps off angrily

Tha.Riddla
 
2011-11-01

fack off, ya guibag.

k

arigato
 
2011-11-01

XO k

Mac8myPC
 
2011-11-02

you should be able to use phpmyadmin and export it ... it comes built into MAMP i think...

Tha.Riddla
 
2011-11-02

phpMyAdmin was giving me errors on the import...plus we have disabled it on our live server, so I needed another solution anyway.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneBack End

Anyone wanna help a command line n00b?