Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. DBHOST=localhost
  2. DBNAME=dbname
  3. DBUSER=dbuser
  4. DBPASSWD=test123
  5. DB_ROOT_PASS=password123
  6.  
  7. apt-get -y install curl build-essential python-software-properties git
  8.  
  9. debconf-set-selections <<< "mysql-server mysql-server/root_password password $DB_ROOT_PASS"
  10. debconf-set-selections <<< "mysql-server mysql-server/root_password_again password $DB_ROOT_PASS"
  11.  
  12. apt-get -y install mysql-server
  13.  
  14. mysql -uroot -p$DB_ROOT_PASS -e "CREATE DATABASE $DBNAME"
  15. mysql -uroot -p$DB_ROOT_PASS -e "grant all privileges on $DBNAME.* to '$DBUSER'@'$DBHOST' identified by '$DBPASSWD'"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement