Was not able to create a new database ...in puppet 3.8.5
My Master is Ubuntu 16.04 My Agent is Windows 8.1 MySql version is 5.7
I tried the following code in master to create a new database
ubuntu@puppet:/etc/puppet/modules/mysql/manifests$ cat init.pp
class mysql{
package {'mysql':
ensure => installed,
provider => 'chocolatey',
install_options => ['-override', '-installArgs',
'"/INSTALLDIR=""C:\Program', 'Files"""'],
}
service { 'mysql':
ensure => true,
enable => true,
require => Package['mysql'],
}
mysql_database { 'ansi':
ensure => 'present',
charset => 'utf8',
collate => 'utf8_swedish_ci',
}}
And in agent puppet agent -t I'm getting the following error
C:\Windows\system32>puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for andromeda
Info: Applying configuration version '1520852454'
Error: Could not prefetch mysql_database provider 'mysql': Execution of 'C:/tool
s/mysql/current/bin/mysql.exe -NBe show databases' returned 1: ERROR 1045 (28000
): Access denied for user 'Galaxy'@'localhost' (using password: NO)
Error: Execution of 'C:/tools/mysql/current/bin/mysql.exe -NBe create database i
f not exists `ansi` character set `utf8` collate `utf8_swedish_ci`' returned 1:
ERROR 1045 (28000): Access denied for user 'Galaxy'@'localhost' (using password:
NO)
Error: /Stage[main]/Mysql/Mysql_database[ansi]/ensure: change from absent to pre
sent failed: Execution of 'C:/tools/mysql/current/bin/mysql.exe -NBe create data
base if not exists `ansi` character set `utf8` collate `utf8_swedish_ci`' return
ed 1: ERROR 1045 (28000): Access denied for user 'Galaxy'@'localhost' (using pas
sword: NO)
Notice: Finished catalog run in 12.67 seconds
add a comment