Guest User

Untitled

a guest
Feb 11th, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ -z "$1" ];
  4. then
  5. echo "usage: ./luo_kanta kanta user password"
  6. else
  7.  
  8. KANTA=$1
  9. USER=$2
  10. PASSWORD=$3
  11. ROOT="MLsDR7y^rKr9"
  12.  
  13. mysql -u root -p$ROOT -e "create database $KANTA;"
  14. mysql -u root -p$ROOT -e "grant usage on *.* to $USER@localhost identified by '$PASSWORD';"
  15. mysql -u root -p$ROOT -e "grant all privileges on $KANTA.* to $USER@localhost;"
  16. fi
Add Comment
Please, Sign In to add comment