Ask Your Question
0

Install newer MySQL version 5.6+

asked 2016-05-13 07:30:16 -0500

Hi, I'm trying to install newer version of MySQL with puppetlabs-mysql module. With default options MariaDB 5.5 is installed which contains MySQL 5.4 which is incompatible with my application. I'm running CentOS 7.2 . I also tried add repository for MariaDB 10 but it doesn't work. Code below works, but it's not what I want.

class component::mysql_server inherits component::component {

  $override_options = {
    'mysqld' => {
      'bind-address' => '0.0.0.0',
      'max_allowed_packet' => '500M',
      'table_open_cache' => "64",
      'sort_buffer_size' => "512K",
      'net_buffer_length' => "8K",
      'read_buffer_size' => '256K',
      'read_rnd_buffer_size' => '512K',
      'myisam_sort_buffer_size' => '8M',
      'server-id' => '1',
    },
    'mysqldump' => {
      'max_allowed_packet' => "500M",
    },
    'mysql' => {
      'no-auto-rehash' => '',
    },
    'myisamchk' => {
      'key_buffer_size' => '20M',
      'sort_buffer_size' => '20M',
      'read_buffer' => '2M',
      'write_buffer' => '2M',
    },
    'mysqlhotcopy' => {
      'interactive-timeout' => '',
    }
  }

  firewall { '102 allow mysql connection':
    dport  => [3306],
    proto  => tcp,
    action => accept,
  }

  $root_password = hiera("mysql::root_password")
  class {'::mysql::server':
    root_password           => $root_password,
    remove_default_accounts => true,
    override_options        => $override_options,
    databases   => {
      "puppet_magento_${$environment}"  => {
        ensure  => 'present',
        charset => 'utf8',
      },
    },
  }

  mysql_user { 'ist@%':
    ensure                   => 'present',
    max_connections_per_hour => '0',
    max_queries_per_hour     => '0',
    max_updates_per_hour     => '0',
    max_user_connections     => '0',
    password_hash            => '*9580D4979DE4A30E6BA3ACA33768205F0524180D',
  }

  mysql_grant { 'root@localhost/*.*':
    ensure     => 'present',
    options    => ['GRANT'],
    privileges => ['ALL'],
    table      => '*.*',
    user       => 'root@localhost',
  }

  mysql_grant { 'ist@%/*.*':
    ensure     => 'present',
    options    => ['GRANT'],
    privileges => ['ALL'],
    table      => '*.*',
    user       => 'ist@%',
  }

}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-05-16 03:25:15 -0500

I had to add: 'pid-file' => undef to $override_options

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: 2016-05-13 07:30:16 -0500

Seen: 33 times

Last updated: May 16 '16