Last active
September 5, 2015 10:34
-
-
Save aratak/478350 to your computer and use it in GitHub Desktop.
sql script for rails db on production
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE USER 'testuser'@'%' IDENTIFIED BY '***'; | |
GRANT USAGE ON * . * TO 'testuser'@'%' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; | |
CREATE DATABASE IF NOT EXISTS `testuser` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; | |
GRANT ALL PRIVILEGES ON `testuser` . * TO 'testuser'@'%'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su | |
groupadd www | |
useradd aratak --shell /bin/bash --group www --home /home/aratak | |
mkdir /home/aratak | |
chown aratak:www /home/aratak | |
passwd aratak | |
# add username to AllowUsers /etc/ssh/sshd_config | |
# add `aratak ALL=(ALL) NOPASSWD:ALL` to the /etc/sudoers | |
sudo service ssh restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment