Closed dbpolito closed 3 years ago
@dbpolito can you please provide what you're using for the various attributes you use in your example, or change them to something else I could just copy/paste for replicating it on my end? Thanks!
# create database
mysql_database 'database' do
host 'localhost'
port '3306'
database_name 'database'
user 'admin'
password 'rootpass'
encoding 'latin1'
collation 'latin1_swedish_ci'
end
# create user
mysql_user 'user' do
ctrl_host 'localhost'
ctrl_port '3306'
ctrl_user 'admin'
ctrl_password 'rootpass'
username 'username'
database_name 'database'
host '%'
password 'pass'
action [ :create, :grant ]
end
My issue is that i'm managing an RDS database which the root
user isn't called root
, in my case it's admin
, and ctrl_user
is being ignored and the query is still uring root
@dbpolito can you please confirm that #665 resolves this problem?
@ramereth it does look it will do the trick, thanks for looking into that :+1:
I'm doing something like this:
mysql_database
works fine, butmysql_user
breaks because it still trying to useroot
userLooking at the code i suspect it may be related, if you look at:
https://github.com/sous-chefs/mysql/blob/master/resources/mysql_user.rb#L57 https://github.com/sous-chefs/mysql/blob/master/resources/mysql_user.rb#L69
One is mapping to
username
and the other withuser
https://github.com/sous-chefs/mysql/blob/master/resources/mysql_database.rb#L85
On database it does use
user
.