Ask Your Question
0

Issues with puppetlabs/mysql module

asked 2013-12-01 13:09:29 -0500

elvisjohndowson gravatar image

Hi, I'm having basic issues with the puppetlabs/mysql module. I'm running puppet 3.3.x on debian wheezy.

I have observed the following issues: - root user password is not set to 'password' as specified in the puppet script. It's set to blank. - the user elvis is not created in the list of users in the mysql database - wordpress user's password is not set to 'password'. It too, is set to blank. - additional access location specfiers for the wordpress user are ignored and replaced with %, instead of explicitly specifying wordpress@localhost, wordpress@192.168.1.142 ... (more)

edit retag flag offensive close merge delete

Comments

Try running with --debug. My guess is that you didn't specify `old_root_password` so puppet is unable to update any users.

spuder gravatar imagespuder ( 2013-12-01 15:57:00 -0500 )edit

You're correct in assuming that I haven't specified it at all. After setting old_root_password = '', deleting the root .my.cnf file, and re-running puppet agent worked.

elvisjohndowson gravatar imageelvisjohndowson ( 2013-12-01 16:27:11 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2013-12-01 14:32:29 -0500

I just applied your manifests on a clean VM using the puppetlabs-mysql module from github and all users are created correctly.

edit flag offensive delete link more
0

answered 2013-12-01 16:37:34 -0500

elvisjohndowson gravatar image

Setting oldrootpassword => ' ' (i.e. null), logging in as root user on the debian lxc container, and deleting the /.my.cnf and /root/.my.cnf , and re-running the puppet agent allowed everything to get set correctly as intended.

puppet agent --test --debug

I'm now able to see the wordpress database, and all the users with the correct location based access permissions set.

Here is a copy of the working code:

# Database server configuration management
# ----------------------------------------

# Local variable to control database installation.
$db_install  = present

# Define databases.
$databases = {
    'wordpress' => {
            ensure      => $db_install,
            charset     => 'utf8',
    },
}

# Define privileges.
$grants = {
    'elvis@localhost/*.*' => {
        ensure     => $db_install,
        options ...
(more)
edit flag offensive delete link more
0

answered 2013-12-02 11:12:09 -0500

spuder gravatar image

In order to change the root password, you will need to specify the following type old_root_password

Try

class  {  'mysql::server':
    old_root_password       => '',
    root_password           => 'test1234',
   ....
}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-12-01 13:09:29 -0500

Seen: 327 times

Last updated: Dec 02 '13