Difference between revisions of "Command Snips"

From copec
Jump to: navigation, search
(Created page with "==== Date String Stamp ==== `date '+%Y-%m-%d-%Hh%M'`")
 
Line 1: Line 1:
 +
=== Shell ===
 
==== Date String Stamp ====
 
==== Date String Stamp ====
 
  `date '+%Y-%m-%d-%Hh%M'`
 
  `date '+%Y-%m-%d-%Hh%M'`
 +
=== MySQL ===
 +
==== Create New Database and User ====
 +
<nowiki>
 +
mysql --defaults-file=/etc/mysql/debian.cnf
 +
CREATE DATABASE database_name;
 +
CREATE USER 'foo'@'localhost' IDENTIFIED BY 'password';
 +
GRANT ALL PRIVILEGES ON database_name.* TO 'foo'@'localhost';
 +
FLUSH PRIVILEGES;
 +
</nowiki>

Revision as of 10:49, 31 March 2015

Shell

Date String Stamp

`date '+%Y-%m-%d-%Hh%M'`

MySQL

Create New Database and User

mysql --defaults-file=/etc/mysql/debian.cnf CREATE DATABASE database_name; CREATE USER 'foo'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON database_name.* TO 'foo'@'localhost'; FLUSH PRIVILEGES;