Sunday, April 30, 2017 07:03 am EDT

Linux

Bri's picture

MySQL Export/Import Command Line Syntax

If you are like me, occasionally you find yourself working with a database that is so large it's pretty much impossible to do any importing/exporting with the GUI tools. It doesn't happen often enough for myself to have the MySQL commands memorized, so I'm putting them here so I can find them again later.

Exporting using mysqldump

mysqldump –u mysqlUser -p DatabaseName TableName > FilenameToSaveAs 

Importing the same file

mysql –u mysqlUser -p DatabaseName < FilenameToImport 
Bri's picture

Changing folder ownership thru SSH

If you ever need to change ownership of a folder using SSH here is how:

You'll need to login to the root of the server, and then run the command

chown -R ownername:groupname /path/to/the/folder/that/needs/to/be/changed

The "-R" will make this a recursive ownership change, changing all folders that are included below the path you have specified.

Bri's picture

Remove / Delete Directory and Its Contents in Linux

rm -rf

This command will remove a directory and its contents without prompting you to make sure you want to delete each file in the directory. Substitute with the actual directory name.

Syndicate content