Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max allowed packet #159

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Installs mysql-server packages, configures my.cnf and starts mysqld service:

Database login information stored in `/root/.my.cnf`.

**Note:** The `config-hash` parameter is passed through to the `mysql::config` class as its parameters. Check the header comments in `manifests/config.pp` to see which MySQL settings can be set.

### mysql::db
Creates a database with a user and assign some privileges.

Expand Down
40 changes: 21 additions & 19 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# [*default_engine] - configure a default table engine
# [*root_group] - use specified group for root-owned files
# [*restart] - whether to restart mysqld (true/false)
# [*max_allowed_packet] - sets the max_allowed_packet size
#
# Actions:
#
Expand All @@ -34,25 +35,26 @@
# }
#
class mysql::config(
$root_password = 'UNSET',
$old_root_password = '',
$bind_address = $mysql::params::bind_address,
$port = $mysql::params::port,
$etc_root_password = $mysql::params::etc_root_password,
$service_name = $mysql::params::service_name,
$config_file = $mysql::params::config_file,
$socket = $mysql::params::socket,
$pidfile = $mysql::params::pidfile,
$datadir = $mysql::params::datadir,
$ssl = $mysql::params::ssl,
$ssl_ca = $mysql::params::ssl_ca,
$ssl_cert = $mysql::params::ssl_cert,
$ssl_key = $mysql::params::ssl_key,
$log_error = $mysql::params::log_error,
$default_engine = 'UNSET',
$root_group = $mysql::params::root_group,
$restart = $mysql::params::restart,
$purge_conf_dir = false
$root_password = 'UNSET',
$old_root_password = '',
$bind_address = $mysql::params::bind_address,
$port = $mysql::params::port,
$etc_root_password = $mysql::params::etc_root_password,
$service_name = $mysql::params::service_name,
$config_file = $mysql::params::config_file,
$socket = $mysql::params::socket,
$pidfile = $mysql::params::pidfile,
$datadir = $mysql::params::datadir,
$ssl = $mysql::params::ssl,
$ssl_ca = $mysql::params::ssl_ca,
$ssl_cert = $mysql::params::ssl_cert,
$ssl_key = $mysql::params::ssl_key,
$log_error = $mysql::params::log_error,
$default_engine = 'UNSET',
$root_group = $mysql::params::root_group,
$restart = $mysql::params::restart,
$max_allowed_packet = $mysql::params::max_allowed_packet,
$purge_conf_dir = false
) inherits mysql::params {

File {
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
$etc_root_password = false
$ssl = false
$restart = true
$max_allowed_packet = '16M'

case $::operatingsystem {
'Ubuntu': {
Expand Down
4 changes: 2 additions & 2 deletions templates/my.cnf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ skip-external-locking

<% if bind_address %>
bind-address = <%= bind_address %>
<% end %>
<% end %>

key_buffer = 16M
max_allowed_packet = 16M
max_allowed_packet = <%= max_allowed_packet %>
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
Expand Down