Guest User

Untitled

a guest
Apr 14th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. class core {
  2.  
  3. class { '::mysql::server':
  4. root_password => '*23AE809DDACAF96AF0FD78ED04B6A265E05AA257',
  5. remove_default_accounts => true,
  6. override_options => {
  7. 'mysqld' => {
  8. 'bind-address' => '0.0.0.0',
  9. 'server-id' => '1',
  10. 'binlog-format' => 'mixed',
  11. 'log-bin' => 'mysql-bin',
  12. 'datadir' => '/var/lib/mysql',
  13. 'innodb_flush_log_at_trx_commit' => '1',
  14. 'sync_binlog' => '1',
  15. 'binlog-do-db' => ['app_db'],
  16. }
  17. }
  18. }
  19.  
  20.  
  21. mysql_user { 'slave_user@%':
  22. ensure => 'present',
  23. password_hash => mysql_password('123'),
  24. }
  25.  
  26.  
  27. mysql_grant { 'slave_user@%/*.*':
  28. ensure => 'present',
  29. privileges => ['REPLICATION SLAVE'],
  30. table => '*.*',
  31. user => 'slave_user@%',
  32. }
  33.  
  34.  
  35. mysql::db { 'app_db':
  36. user => 'dbuser',
  37. password => '*23AE809DDACAF96AF0FD78ED04B6A265E05AA257',
  38. host => '%',
  39. }
  40. }
  41.  
  42. Notice: /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]/content: content changed '{md5}b52301963c1bc0d06bd0de29e43c22d1' to '{md5}ca645da4ee27089926b4c47fb2ca81a3'
  43. Error: Failed to apply catalog: Execution of '/usr/bin/mysql --defaults-extra-file=/root/.my.cnf -NBe show databases' returned 1: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Add Comment
Please, Sign In to add comment