Difference between revisions of "Command Snips"
From copec
Line 4: | Line 4: | ||
== MySQL == | == MySQL == | ||
=== Create New Database and User === | === Create New Database and User === | ||
− | <nowiki> | + | <nowiki> |
mysql --defaults-file=/etc/mysql/debian.cnf | mysql --defaults-file=/etc/mysql/debian.cnf | ||
CREATE DATABASE database_name; | CREATE DATABASE database_name; |
Revision as of 10:50, 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;