Difference between revisions of "Command line cheat sheet"

From TempusServa wiki
Jump to navigation Jump to search
old>Admin
old>Admin
Line 1: Line 1:
== MySQL commands ==
== MySQL commands ==


Import data from a SQL dump:
Import data from a SQL dump file to a specific database:
<blockquote>
<blockquote>
mysql -uroot -pPW1234 tslive < import.sql
mysql -uroot -pPW1234 tslive < dumpLive.sql
</blockquote>
 
Export data from a SQL dump file to a specific database:
<blockquote>
mysql -uroot -pPW1234 --databases tslive tstest tsbase > dump.sql
</blockquote>
</blockquote>

Revision as of 00:27, 22 February 2013

MySQL commands

Import data from a SQL dump file to a specific database:

mysql -uroot -pPW1234 tslive < dumpLive.sql

Export data from a SQL dump file to a specific database:

mysql -uroot -pPW1234 --databases tslive tstest tsbase > dump.sql