Skip to content
Browse files

Add my-joyent.cnf and make it the default.

  • Loading branch information...
1 parent b751dea commit e767ab680e3999983e746ed210831f917b40e321 @jperkin jperkin committed
Showing with 137 additions and 0 deletions.
  1. +11 −0 percona55-server/Makefile
  2. +1 −0 percona55-server/PLIST
  3. +125 −0 percona55-server/files/my-joyent.cnf.sh
View
11 percona55-server/Makefile
@@ -43,6 +43,13 @@ MESSAGE_SUBST+= MYSQL_DATADIR=${MYSQL_DATADIR}
MESSAGE_SUBST+= MYSQL_USER=${MYSQL_USER} MYSQL_GROUP=${MYSQL_GROUP}
BUILD_DEFS+= MYSQL_DATADIR
+CNFSUBST= -e 's,@MYSQL_DATADIR@,${MYSQL_DATADIR},g'
+CNFSUBST+= -e 's,@PREFIX@,${PREFIX},g'
+CNFSUBST+= -e 's,@VARBASE@,${VARBASE},g'
+
+CONF_FILES= ${PREFIX}/share/mysql/my-joyent.cnf \
+ ${PKG_SYSCONFDIR}/my.cnf
+
REPLACE_PERL+= mysql-test/lib/My/SafeProcess/safe_process.pl
REPLACE_PERL+= mysql-test/lib/v1/mysql-test-run.pl
REPLACE_PERL+= mysql-test/mysql-stress-test.pl
@@ -65,5 +72,9 @@ CXXFLAGS+= -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
post-extract:
${MV} ${WRKDIR}/${SPHINX}/mysqlse ${WRKSRC}/storage/sphinx
+post-install:
+ ${SED} ${CNFSUBST} < ${FILESDIR}/my-joyent.cnf.sh \
+ > ${DESTDIR}${PREFIX}/share/mysql/my-joyent.cnf
+
.include "../../joyent/percona55-client/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
View
1 percona55-server/PLIST
@@ -81,6 +81,7 @@ share/mysql/korean/errmsg.sys
share/mysql/magic
share/mysql/my-huge.cnf
share/mysql/my-innodb-heavy-4G.cnf
+share/mysql/my-joyent.cnf
share/mysql/my-large.cnf
share/mysql/my-medium.cnf
share/mysql/my-small.cnf
View
125 percona55-server/files/my-joyent.cnf.sh
@@ -0,0 +1,125 @@
+#
+# Joyent Percona configuration, based on my-large.cnf
+#
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = /tmp/mysql.sock
+default-character-set = utf8
+
+# The MySQL server
+[mysqld]
+user = mysql
+port = 3306
+basedir = @PREFIX@
+datadir = @MYSQL_DATADIR@
+socket = /tmp/mysql.sock
+bind-address = 127.0.0.1
+default-storage-engine = innodb
+character-set-server = utf8
+skip-external-locking
+log_warnings
+skip_name_resolv
+
+server-id = 1
+
+# MyISAM settings
+key_buffer_size = 16M
+sort_buffer_size = 1M
+read_buffer_size = 1M
+read_rnd_buffer_size = 4M
+myisam_sort_buffer_size = 64M
+
+# InnoDB settings
+innodb_data_home_dir = @MYSQL_DATADIR@
+innodb_log_group_home_dir = @MYSQL_DATADIR@
+innodb_data_file_path = ibdata1:100M:autoextend
+innodb_buffer_pool_size = 256M
+innodb_additional_mem_pool_size = 20M
+innodb_log_file_size = 400M
+innodb_log_buffer_size = 8M
+innodb_flush_log_at_trx_commit = 2
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+innodb_doublewrite = 0
+innodb_io_capacity = 1500
+innodb_read_io_threads = 8
+innodb_write_io_threads = 8
+innodb_buffer_pool_restore_at_startup = 500
+
+# Slow query log settings
+# The default logs all full table scans,tmp tables,filesorts on disk queries
+#use_global_long_query_time = 1
+#long_query_time = 0.5
+slow_query_log_file = @VARBASE@/log/mysql/slowquery.log
+slow_query_log = 1
+log_slow_filter = "full_scan,tmp_table_on_disk,filesort_on_disk"
+log_slow_verbosity = "full"
+
+# Other general MySQL settings
+table_cache = 512
+thread_cache_size = 1000
+#query_cache_size = 16M
+#query_cache_strip_comments
+query_cache_type = 0
+back_log = 64
+thread_concurrency = 32
+tmpdir = /tmp
+max_connections = 1000
+max_allowed_packet = 24M
+max_join_size = 4294967295
+net_buffer_length = 2K
+thread_stack = 128K
+tmp_table_size = 64M
+max_heap_table_size = 64M
+
+# Replication settings (master to slave)
+# This is not enabled by default. There are more steps
+# to this besides uncommenting the lines below.
+# See: http://wiki.joyent.com/wiki/display/jpc2/Replication
+#
+binlog_format=mixed
+log-bin = @VARBASE@/log/mysql/bin.log
+#log-bin-index = @VARBASE@/log/mysql/log-bin.index
+log-error = @VARBASE@/log/mysql/error.log
+#report-host = percona
+#relay_log_purge = 1
+expire_logs_days = 7
+#slave-skip-errors = 1062
+#binlog-ignore-db = mysql
+
+# Handlersocket settings
+# See: https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL
+#
+# The port number to bind to (for read requests)
+#loose_handlersocket_port = 9998
+# The port number to bind to (for write requests)
+#loose_handlersocket_port_wr = 9999
+# The number of worker threads (for read requests)
+#loose_handlersocket_threads = 16
+# The number of worker threads (for write requests)
+#loose_handlersocket_threads_wr = 1
+# To allow handlersocket accept many concurrent
+# connections, make open_files_limit as large as
+# possible.
+#open_files_limit = 65535
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+no-auto-rehash
+# Remove the next comment character if you are not familiar with SQL
+#safe-updates
+
+[myisamchk]
+key_buffer_size = 128M
+sort_buffer_size = 128M
+read_buffer = 2M
+write_buffer = 2M
+
+[mysqlhotcopy]
+interactive-timeout

0 comments on commit e767ab6

Please sign in to comment.
Something went wrong with that request. Please try again.