Skip to content

Instantly share code, notes, and snippets.

@D4R4
Created February 17, 2019 07:45
Show Gist options
  • Save D4R4/6beafe73530a10454c77a6e5fafd1b19 to your computer and use it in GitHub Desktop.
Save D4R4/6beafe73530a10454c77a6e5fafd1b19 to your computer and use it in GitHub Desktop.
shell script to change MySQL root password
#!/bin/bash
mysql.server start
mysql -u root -e "SET PASSWORD FOR root@'localhost' = PASSWORD('admin');"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment