Problem with Database Schema Installer / Updater
-
@koelhomem So you can access the db by running:
mysql -u root -p'YourPassHere'
-
@Tom-Elliott Yes.
-
@koelhomem Does your password contain any special characters? Double/Single quotes, $ symbol?
-
@Tom-Elliott No. Alphanumeric only.
-
@koelhomem Then something seems really off.
If you login to the DB then via command line:
Try running:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<YourPasswordHere>';
-
@Tom-Elliott That solved it. But this issue occurred after the default automated installation.
For now, this is only a test server. Later on, if everything going ok, it will be implemented on a production environment. Hope everything goes ok from here.
Thanks a lot for your help!
-
@koelhomem When you installed initially, did you set the password AFTER it ran through once?
I say this because that ALTER statement only runs if the password is initially blank (in which case it sounds like it was originally).
-
@Tom-Elliott Yes I did set the password after. I don’t know what went wrong with it, but after the installation finished, I ran through the configurations (and its passwords), in order to verify if everything was ok.
Anyway, all ok and going to test the image capture/deployment tasks.
Thanks a bunch.
-
I’ve modified the code base slightly to help prevent this problem in the future.
Of note:
The installer will adjust the alter syntax to whatever value is stored in snmysqlpass now. It will only run on known versions of mysql/mariadb that will accept the ALTER USER syntax. It does not set the mysql user password FOR you. It ONLY set’s the alter user syntax (which can break your system if you simply enter a password and ALTER USER is not accepted on your version.) I don’t know what setting this without runnign through GRANT on system that accept this will do.
-
@Tom-Elliott Perfect. You can mark this topic as “Solved”.