Database and user not created (Puppetlabs mysql module)

1,175 views
Skip to first unread message

Moteo

unread,
Mar 12, 2012, 2:51:58 AM3/12/12
to Puppet Users
Hi everyone,

I am new to Puppet and try to make some simple "automation things".
I have succeed with apache2, ssh modules, but have problems with
Puppetlabs mysql module.

It installs mysql server, changes/creates admin user password, but
does not create database and user.
I cannot find anything wrong in logs (--debug --verbose). I see that
manifests is read, but no db/user in mysql.

There is all my node config:

include openssh
include apache
include php
php::module { "mysql": }
include mysql

class { 'mysql::server':
config_hash => { root_password => "xxxx"}
}

mysql::db { 'mydb1':
user => 'user1',
password => 'xxxxx1',
host => 'localhost',
grant => ['all'],
}


apache::virtualhost { "s1.test.com": }
apache::virtualhost { "s2.test.com": }

What I have missed?

Thank You
Moteo

Moteo Air

unread,
Mar 13, 2012, 4:04:22 AM3/13/12
to Puppet Users
Hi,

still no tiny step forward :(
From puppet agent log:

moteo@myHOST:~$ sudo puppet agent --no-daemonize --onetime --debug
--verbose | grep ysql
debug: /Stage[main]//Node[myHOST]/Php::Module[mysql]/Package[php-mysql]/notify:
subscribes to Service[apache]
debug: /Stage[main]/Mysql::Config/File[/root/.my.cnf]/require:
requires Package[mysql-server]
debug: /Stage[main]/Mysql::Config/File[/root/.my.cnf]/notify:
subscribes to Exec[mysqld-restart]
debug: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/require:
requires Package[mysql-server]
debug: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/notify:
subscribes to Exec[mysqld-restart]
debug: /Stage[main]//Node[myHOST]/Mysql::Db[mydb1]/Database_user[mydbuser@localhost]/require:
requires Database[mydb1]
debug: /Stage[main]/Mysql::Server/Package[mysql-server]/notify:
subscribes to Service[mysqld]
debug: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/require:
requires Package[mysql-server]
debug: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/require:
requires Service[mysqld]
debug: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/before:
requires File[/root/.my.cnf]
debug: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]/notify:
subscribes to Exec[mysqld-restart]
debug: /Stage[main]//Node[myHOST]/Mysql::Db[mydb1]/Database_grant[mydbuser@localhost/mydb1]/require:
requires Database_user[mydbuser@localhost]
debug: /Stage[main]//Node[myHOST]/Mysql::Db[mydb1]/Database[mydb1]/require:
requires Class[Mysql::Server]
debug: /Stage[main]/Mysql::Config/File[/etc/mysql]/require: requires
Package[mysql-server]
debug: /Stage[main]/Mysql::Config/File[/etc/mysql]/notify: subscribes
to Exec[mysqld-restart]
debug: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]:
Autorequiring File[/etc/mysql]
debug: Service[mysqld](provider=debian): Executing '/etc/init.d/mysql status'
debug: Exec[set_mysql_rootpw](provider=posix): Executing check
'mysqladmin -u root -pXXXXXXX status > /dev/null'
debug: Executing 'mysqladmin -u root -pXXXXXXX status > /dev/null'

There is: "requires Database[mydb1]" and "requires
Database_user[mydbuser@localhost]", but user and database aren't
created.
And no errors also... Very strange... Can be anything Ubuntu specific?

Thank You
Moteo

2012/3/12 Moteo <mote...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>

Adam Heinz

unread,
Mar 14, 2012, 4:49:26 PM3/14/12
to puppet...@googlegroups.com
I don't know anything about that particular module, but I have been
using github.com/camptocamp/puppet-mysql for over a year without much
trouble.

Moteo Air

unread,
Mar 15, 2012, 6:51:04 AM3/15/12
to puppet...@googlegroups.com
I will try this module.

Thank You Adam.

2012/3/14 Adam Heinz <a...@metricwise.net>:


> I don't know anything about that particular module, but I have been
> using github.com/camptocamp/puppet-mysql for over a year without much
> trouble.
>

Luca Spiller

unread,
Mar 28, 2012, 7:16:16 AM3/28/12
to puppet...@googlegroups.com
Moteo, did you get this issue resolved?

I've used the Puppetlabs MySql module in the past, but I'm now getting these issues setting up a new machine with Ubuntu 11.10. I've used the same Puppet scripts on other Ubuntu 11.10 machines previously with no issues.

On Thursday, 15 March 2012 10:51:04 UTC, Moteo wrote:
I will try this module.

Thank You Adam.

2012/3/14 Adam Heinz <a...@metricwise.net>:
> I don't know anything about that particular module, but I have been
> using github.com/camptocamp/puppet-mysql for over a year without much
> trouble.
>
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.

> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.

Moteo Air

unread,
Apr 11, 2012, 9:12:03 AM4/11/12
to puppet...@googlegroups.com
Hi Luca,

sadly I left "nice puppet" way for a while for Mysql management and
did everything manuallly :(

Best regards
M.

2012/3/28 Luca Spiller <lu...@stackednotion.com>:


> Moteo, did you get this issue resolved?
>
> I've used the Puppetlabs MySql module in the past, but I'm now getting these
> issues setting up a new machine with Ubuntu 11.10. I've used the same Puppet
> scripts on other Ubuntu 11.10 machines previously with no issues.
>
> On Thursday, 15 March 2012 10:51:04 UTC, Moteo wrote:
>>
>> I will try this module.
>>
>> Thank You Adam.
>>
>> 2012/3/14 Adam Heinz <a...@metricwise.net>:
>> > I don't know anything about that particular module, but I have been
>> > using github.com/camptocamp/puppet-mysql for over a year without much
>> > trouble.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Puppet Users" group.
>> > To post to this group, send email to puppet...@googlegroups.com.
>> > To unsubscribe from this group, send email to

>> > puppet-users...@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 view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/ZwavJYd6jwMJ.


>
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to

> puppet-users...@googlegroups.com.

Piotr Usewicz

unread,
Apr 28, 2014, 2:12:43 PM4/28/14
to puppet...@googlegroups.com
I think you have to enable pluginssync option in the [main] section in puppet.conf

Pete Brown

unread,
Apr 30, 2014, 8:22:05 PM4/30/14
to puppet-users
On 29 April 2014 04:12, Piotr Usewicz <pi...@layer22.com> wrote:
> I think you have to enable pluginssync option in the [main] section in
> puppet.conf

I am pretty sure pluginsync is on by default in recent versions of puppet.
So unless you have disabled it it should work.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/d3af5373-21c2-4ee5-a3d3-8e6ab74a6c4e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages