another way to change passwd

This commit is contained in:
yedongfu 2021-07-15 20:36:11 +08:00
parent 62796535c8
commit 028be819ca

View File

@ -3,6 +3,8 @@ go:
- 1.15.x
env:
- GO111MODULE=on
before_script:
- echo "USE mysql;\nUPDATE user SET password=PASSWORD('my-secret-pw') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
before_install:
- sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('my-secret-pw') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
- sudo mysql_upgrade -u root -pmy-secret-pw
- sudo service mysql restart
script: go test ./...