adam
2011-Oct-11 14:18 UTC
[Puppet Users] puppetlabs-mysql: How does the command on this line get the mysql root password?
Stupid question here: how does this line of code get the mysql root password?: https://github.com/puppetlabs/puppetlabs-mysql/blob/master/lib/puppet/provider/database/mysql.rb#L12 I am asking because when I run the set of commands to make a mysql server and db locally, everything is fine. When I run on my ec2 instance, I get: debug: Puppet::Type::Database::ProviderMysql: Executing ''/usr/bin/ mysql -NBe CREATE DATABASE testdb CHARACTER SET utf8'' err: /Stage[main]/Testdb::Dev::Db/Mysql::Db[testdb]/Database[testdb]/ ensure: change from absent to present failed: Execution of ''/usr/bin/ mysql -NBe CREATE DATABASE testdb CHARACTER SET utf8'' returned 1: ERROR 1045 (28000): Access denied for user ''root''@''localhost'' (using password: NO) I figured I would just debug the code in the module, but it''s pretty unclear to me how the mysql command is supposed to get the root password. Thanks! Adam -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Dan Bode
2011-Oct-11 16:55 UTC
Re: [Puppet Users] puppetlabs-mysql: How does the command on this line get the mysql root password?
It expects the password to be set somewhere other than on the command line (my.cnf) On Tue, Oct 11, 2011 at 7:18 AM, adam <aduston@gmail.com> wrote:> Stupid question here: how does this line of code get the mysql root > password?: > > > https://github.com/puppetlabs/puppetlabs-mysql/blob/master/lib/puppet/provider/database/mysql.rb#L12 > > I am asking because when I run the set of commands to make a mysql > server and db locally, everything is fine. When I run on my ec2 > instance, I get: > > debug: Puppet::Type::Database::ProviderMysql: Executing ''/usr/bin/ > mysql -NBe CREATE DATABASE testdb CHARACTER SET utf8'' > err: /Stage[main]/Testdb::Dev::Db/Mysql::Db[testdb]/Database[testdb]/ > ensure: change from absent to present failed: Execution of ''/usr/bin/ > mysql -NBe CREATE DATABASE testdb CHARACTER SET utf8'' returned 1: > ERROR 1045 (28000): Access denied for user ''root''@''localhost'' (using > password: NO) > > I figured I would just debug the code in the module, but it''s pretty > unclear to me how the mysql command is supposed to get the root > password. > > Thanks! > Adam > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Bruno Leon
2011-Oct-11 17:01 UTC
Re: [Puppet Users] puppetlabs-mysql: How does the command on this line get the mysql root password?
~/.my.cnf ? On 11-10-11 10:18 AM, adam wrote:> Stupid question here: how does this line of code get the mysql root > password?: > > https://github.com/puppetlabs/puppetlabs-mysql/blob/master/lib/puppet/provider/database/mysql.rb#L12 > > I am asking because when I run the set of commands to make a mysql > server and db locally, everything is fine. When I run on my ec2 > instance, I get: > > debug: Puppet::Type::Database::ProviderMysql: Executing ''/usr/bin/ > mysql -NBe CREATE DATABASE testdb CHARACTER SET utf8'' > err: /Stage[main]/Testdb::Dev::Db/Mysql::Db[testdb]/Database[testdb]/ > ensure: change from absent to present failed: Execution of ''/usr/bin/ > mysql -NBe CREATE DATABASE testdb CHARACTER SET utf8'' returned 1: > ERROR 1045 (28000): Access denied for user ''root''@''localhost'' (using > password: NO) > > I figured I would just debug the code in the module, but it''s pretty > unclear to me how the mysql command is supposed to get the root > password. > > Thanks! > Adam >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
adam
2011-Oct-11 17:30 UTC
[Puppet Users] Re: puppetlabs-mysql: How does the command on this line get the mysql root password?
Thanks, guys. Told you it was a stupid question. I know quite a bit about programming and CS but am not fluent in mysql config. Thanks again! On Oct 11, 1:01 pm, Bruno Leon <nonolem...@gmail.com> wrote:> ~/.my.cnf ? > > On 11-10-11 10:18 AM, adam wrote: > > > > > > > > > Stupid question here: how does this line of code get the mysql root > > password?: > > >https://github.com/puppetlabs/puppetlabs-mysql/blob/master/lib/puppet... > > > I am asking because when I run the set of commands to make a mysql > > server and db locally, everything is fine. When I run on my ec2 > > instance, I get: > > > debug: Puppet::Type::Database::ProviderMysql: Executing ''/usr/bin/ > > mysql -NBe CREATE DATABASE testdb CHARACTER SET utf8'' > > err: /Stage[main]/Testdb::Dev::Db/Mysql::Db[testdb]/Database[testdb]/ > > ensure: change from absent to present failed: Execution of ''/usr/bin/ > > mysql -NBe CREATE DATABASE testdb CHARACTER SET utf8'' returned 1: > > ERROR 1045 (28000): Access denied for user ''root''@''localhost'' (using > > password: NO) > > > I figured I would just debug the code in the module, but it''s pretty > > unclear to me how the mysql command is supposed to get the root > > password. > > > Thanks! > > Adam-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.