Created
November 9, 2018 13:24
-
-
Save BenMorel/b12a7c4f8690552b3521fa4e2714f343 to your computer and use it in GitHub Desktop.
(Medium) Remove MySQL root password *DO NOT USE THIS ON A PRODUCTION SERVER*
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
password=$(grep -oP 'temporary password(.*): \K(\S+)' /var/log/mysqld.log) | |
mysqladmin --user=root --password="$password" password aaBB@@cc1122 | |
mysql --user=root --password=aaBB@@cc1122 -e "UNINSTALL COMPONENT 'file://component_validate_password';" | |
mysqladmin --user=root --password="aaBB@@cc1122" password "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment