Hi,
I was previously instructed to do the following to grant a managed identify access to a db on a mysql flexible server.
- Connect to the server:
az account set --subscription XXXXXXXXXXX
az account get-access-token --resource https://ossrdbms-aad.database.windows.net
mysql -h YYYYY-mysql-01.mysql.database.azure.com --user ******@email.com --enable-cleartext-plugin --password=az account get-access-token --resource-type oss-rdbms --output tsv --query accessToken
But this gives the following errors:
WARNING: option '--enable-cleartext-plugin' is obsolete.
ERROR 1045 (28000): Plugin mysql_clear_password could not be loaded: /usr/lib/mysql/plugin/mysql_clear_password.so: cannot open shared object file: No such file or directory
And without the cleartext plugin:
ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: /usr/lib/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
- Once logged in, run the following commands on the mysql server:
SET aad_auth_validate_oids_in_tenant = OFF;
CREATE AADUSER 'myproject_db_mi' IDENTIFIED BY 'XXXXXXXX
GRANT ALL PRIVILEGES ON main_table_prod.* TO 'myproject_db_mi'@'%';
FLUSH PRIVILEGES;
What is now the recommended way to give myproject_db_mi access to main_table_prod?
Thank you.