mysql Putty Commands

Log onto mysql: mysql -p mysql -u root -p Create a database: mysql> create database [database name]; Show all databases: mysql> show databases; Select database: mysql> use [database name] Show your database tables: mysql> show tables; Find database directory: mysql> select @@datadir; Create user: mysql> grant all privileges on [database name].* to ‘[username]’@’localhost’ identified by […]

Useful Putty Commands

Navigate directories: cd .. cd [FOLDERPATH]/ Change owner of a file/folder: chown [USERNAME] [FILENAME] chown [USERNAME] -R [FOLDERNAME] Move a file: mv [FILENAME].ext [NEWDIRECTORY]/ Move a directory: mv [FOLDERNAME]/ [NEWDIRECTORY]/ Change File/Folder Permissions: chmod 755 [filename].ext Change Permission for all files/folder in current folder: chmod -R 755 Compress folder to download: tar cvfz [OUTPUTNAME].tar.gz [FOLDERNAME]/ […]