tall-winter-40504
01/13/2021, 8:29 PMbillowy-army-68599
01/13/2021, 8:31 PMtall-winter-40504
01/13/2021, 8:32 PMdb_user = mysql.User(
resource_name="db-user",
user="actualuser",
plaintext_password=secret_from_config,
host=rds_instance.address,
opts=mysql_opts)
where mysql_opts
is:
mysql_provider = mysql.Provider(
resource_name="db-provider",
endpoint=rds_instance.endpoint,
username=rds_instance.username,
password=config_secret,
)
mysql_opts = pulumi.ResourceOptions(provider=mysql_provider)
admin
account and I can successfully use it to connect to the db and run sql commands using the mysql
CLI
Doing sth like this to connect:
mysql -h <http://somelongstring.us-west-2.rds.amazonaws.com|somelongstring.us-west-2.rds.amazonaws.com> -u admin -p
mysql
library additional statements that I’m having trouble with.select user from mysql.user;
I even see the username actualuser
in the results printed however when I try to log-in with that same mysql
CLI I typed above I get Access Deniedadmin
user and the CLI as I mentioned above and manually create a new user I have no problem granting them permissions or then using that new user with the CLI to connect back to the db…
Just the user created through Pulumi mysql provider that is having issues.billowy-army-68599
01/13/2021, 9:36 PMplaintext_password
- that takes a string, and your secret_from_config
will actually be an output, so you may need to wrap it in an apply. Can you verify it's that by setting plaintext_password
manually?tall-winter-40504
01/13/2021, 9:46 PMmysql
CLI to access the db with that user due to Access Deniedbillowy-army-68599
01/13/2021, 11:16 PMdb_user = mysql.User(
resource_name="db-user",
user="actualuser",
plaintext_password=secret_from_config,
host=0.0.0.0,
opts=mysql_opts)
tall-winter-40504
01/13/2021, 11:19 PM0.0.0.0
suggestion 😛grant
was the other smoking gun I found in the logs%
nextgrant=True
after allmysql> show grants for webserver;
+---------------------------------------------------------+
| Grants for webserver@% |
+---------------------------------------------------------+
| GRANT PROCESS ON *.* TO `webserver`@`%` |
| GRANT ALL PRIVILEGES ON `databasename`.* TO `webserver`@`%` |
+---------------------------------------------------------+
2 rows in set (0.03 sec)
mysql> show grants for webserver;
+---------------------------------------+
| Grants for webserver@% |
+---------------------------------------+
| GRANT USAGE ON *.* TO `webserver`@`%` |
+---------------------------------------+
1 row in set (0.03 sec)