Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ -z "$1" ];
- then
- echo "usage: ./luo_kanta kanta user password"
- else
- KANTA=$1
- USER=$2
- PASSWORD=$3
- ROOT="MLsDR7y^rKr9"
- mysql -u root -p$ROOT -e "create database $KANTA;"
- mysql -u root -p$ROOT -e "grant usage on *.* to $USER@localhost identified by '$PASSWORD';"
- mysql -u root -p$ROOT -e "grant all privileges on $KANTA.* to $USER@localhost;"
- fi
Add Comment
Please, Sign In to add comment