Skip to content

Instantly share code, notes, and snippets.

@kunxin-chor
Created August 7, 2020 02:55
Show Gist options
  • Save kunxin-chor/17c8f24b816138b17a99d862f9fec67d to your computer and use it in GitHub Desktop.
Save kunxin-chor/17c8f24b816138b17a99d862f9fec67d to your computer and use it in GitHub Desktop.
Create a gitpod user for use in pymysql
echo "Setting the greeting"
sed -i "s/USER_NAME/$GITPOD_GIT_USER_NAME/g" ${GITPOD_REPO_ROOT}/README.md
echo "Creating the ${C9_USER} user in MySQL"
mysql -e "CREATE USER '${C9_USER}'@'%' IDENTIFIED BY '';" -u root
echo "Granting privileges"
mysql -e "GRANT ALL PRIVILEGES ON *.* TO '${C9_USER}'@'%' WITH GRANT OPTION;" -u root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment