Skip to content

Instantly share code, notes, and snippets.

@miaoles
Created May 7, 2021 19:15
Show Gist options
  • Save miaoles/e77b3e13db43b7244bda3975fbf953cb to your computer and use it in GitHub Desktop.
Save miaoles/e77b3e13db43b7244bda3975fbf953cb to your computer and use it in GitHub Desktop.
CCM 4
#!/bin/bash
PASSWORD=pa$$w0rd
for name in $(cat users.txt); do
sudo mysql -u $name -p $PASSWORD create $name
echo "User $name with password $PASSWORD added to created database $name"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment