Browse Source

cleanup package and make sure it binds to 127.0.0.1 by default

master
parent
commit
10ddd12803
  1. 44
      mysql/my.cnf
  2. 11
      mysql/mysql-defaults.patch
  3. 11
      mysql/mysql.patch
  4. 6
      mysql/mysql.spec
  5. 8
      mysql/rc.mysql

44
mysql/my.cnf

@ -1,3 +1,7 @@
##
## my.cnf -- MySQL configuration
##
[client]
socket = @l_prefix@/var/mysql/mysql.sock
port = 3306
@ -6,19 +10,20 @@ port = 3306
datadir = @l_prefix@/var/mysql
socket = @l_prefix@/var/mysql/mysql.sock
set-variable = pid_file=@l_prefix@/var/mysql/mysqld.pid
host = 127.0.0.1
port = 3306
user = @l_rusr@
basedir = @l_prefix@
# Logfile destinations - you must update rc.mysql accordingly
# logfile destinations (update rc.mysql accordingly)
log = @l_prefix@/var/mysql/common.log
log-update = @l_prefix@/var/mysql/update.log
# these are the most important tuning parameters for mysqld
# most important tuning parameters for mysqld
set-variable = key_buffer_size=16M
set-variable = table_cache=64
# change these parameters if special problems occur
# less important tuning paramaters (change if special problems occur)
set-variable = join_buffer_size=1M
set-variable = max_connections=1000
set-variable = max_connect_errors=10
@ -32,42 +37,19 @@ set-variable = sort_buffer=2M
set-variable = key_buffer=1M
set-variable = tmp_table_size=32M
#
# BERKELEY DB
#
# memory parameters - set these to values <> 0 if bdb
# tables are used
# Berkeley DB
set-variable = bdb_cache_size=@mysql_bdb_cache_size@
set-variable = bdb_log_buffer_size=@mysql_bdb_log_buffer_size@
set-variable = bdb_max_lock=@mysql_bdb_max_lock@
#
# INNOBASE
#
# The common part of the directory path for all InnoDB datafiles.
# default is the mysql data directory
#innodb_data_home_dir =
# Tablespaces
# specify a list of pathtodatafile:sizespecification separated
# by semicolon. The last datafile can have options
# - :autoextend increment datafile in 8M chunks
# - :max:sizespecification max size of the datafile
#innodb_data_file_path=@innodb_data_file_path@
# Tunings
# Set buffer pool size to 50 -80 % of your computer's memory
# Set the log file size to about 25 % of the buffer pool size
# Set ..flush_log_at_trx_commit to 0 if you can afford losing
# some last transactions
# Set innodb_lock_wait_timeout to bail out of external deadlocks
# Innobase
#set-variable = innodb_buffer_pool_size=70M
#set-variable = innodb_additional_mem_pool_size=2M
#set-variable = innodb_log_files_in_group=3
#set-variable = innodb_log_file_size=20M
#set-variable = innodb_log_buffer_size=8M
#innodb_flush_log_at_trx_commit=1
#set-variable = innodb_lock_wait_timeout=50
#innodb_data_home_dir =
#innodb_data_file_path = @innodb_data_file_path@
#innodb_flush_log_at_trx_commit = 1

11
mysql/mysql-defaults.patch

@ -1,11 +0,0 @@
--- mysys/default.c.dist Fri Jan 10 11:42:15 2003
+++ mysys/default.c Fri Jan 10 11:42:31 2003
@@ -48,7 +48,7 @@
#ifdef __WIN__
"C:/",
#else
-"/etc/",
+"@l_prefix@/etc/mysql/",
#endif
#ifdef DATADIR
DATADIR,

11
mysql/mysql.patch

@ -81,3 +81,14 @@
echo
fi
echo "Please report any problems with the @scriptdir@/mysqlbug script!"
--- mysys/default.c.dist Fri Jan 10 11:42:15 2003
+++ mysys/default.c Fri Jan 10 11:42:31 2003
@@ -48,7 +48,7 @@
#ifdef __WIN__
"C:/",
#else
-"/etc/",
+"@l_prefix@/etc/mysql/",
#endif
#ifdef DATADIR
DATADIR,

6
mysql/mysql.spec

@ -37,7 +37,7 @@ Distribution: OpenPKG [BASE]
Group: Database
License: GPL
Version: %{V_major}.%{V_minor}
Release: 20030110
Release: 20030116
# package options
%option with_berkeleydb yes
@ -66,7 +66,6 @@ Source1: my.cnf
Source2: my.pwd
Source3: rc.mysql
Patch0: mysql.patch
Patch1: mysql-defaults.patch
# build information
Prefix: %{l_prefix}
@ -86,8 +85,7 @@ AutoReqProv: no
%prep
%setup -q
%patch0 -p0
%patch1 -p0
%patch -p0
%build
# patch file search path

8
mysql/rc.mysql

@ -12,8 +12,9 @@
mysql_log_numfiles="10"
mysql_log_minsize="1M"
mysql_log_complevel="9"
#
# same files as in my.cnf
%common
# same paths as in my.cnf
mysql_pid_file=@l_prefix@/var/mysql/mysqld.pid
mysql_log_err=@l_prefix@/var/mysql/mysqld.err
mysql_log_common=@l_prefix@/var/mysql/common.log
@ -52,7 +53,8 @@
-P "${mysql_log_prolog}" \
-E "@l_prefix@/bin/mysqladmin \
--defaults-extra-file=${mysql_pwd_file} \
flush-logs ; ${mysql_log_epilog}" \
flush-logs; ${mysql_log_epilog}" \
${mysql_log_common} \
${mysql_log_update} \
${mysql_log_err}

Loading…
Cancel
Save