Mysql Login / Run script / Export CSV

3/8/2006; 10:42 AM
  • Login: mysql [database name] -u [user] -p
  • E.g. mysql baseball -u mike -p
  • Run Script: mysql [database name] -f -u [user] -p < file_name.sql
  • E.g. mysql baseball -f -u mike -p < insert_teams.sql (use -f to ignore errors)
  • Export data to CSV: SELECT * INTO OUTFILE '/somefile.csv' FIELDS TERMINATED BY ',' LINES TERMINATED BY 'n' FROM table WHERE column='value'";

Logon

Fill out the form below to logon to this site, or sign up below.

Username (email address):
Password:
I forgot my password; please send me a new one.
 

Signup

Fill out the form below to join as a member of this site.

Screen name:
Email address:
Password:
Repeat password:
Homepage (optional)