Koozali.org: home of the SME Server

changing settings in MYSQL

Darren

changing settings in MYSQL
« on: March 05, 2002, 08:26:06 AM »
i am wanting to change the max connections from 100 to 200 so i found this code

/usr/libexec/mysqld -O max_connections=200 --skip-locking
how ever every time i run it i get the below resopnse

020305 15:24:34  Can't start server: Bind on TCP/IP port: Address already in use
020305 15:24:34  Do you already have another mysqld server running on port: 3306 ?
020305 15:24:34  Aborting

how do i make the change work


Thanks Darren

Rick

Re: changing settings in MYSQL
« Reply #1 on: March 05, 2002, 09:48:48 AM »
Maybe you should unload MySQL before running the command?

/etc/rc.d/init.d/mysqld stop

Remember: The next time you have to reboot your SME box MySQL starts with default settings.

Michael

Re: changing settings in MYSQL
« Reply #2 on: March 05, 2002, 11:06:32 AM »
Edit the template for /etc/my.cnf and do a "/etc/init.d/mysqld restart". This will prevent your server from being reset with the next reboot.

Darren

Re: changing settings in MYSQL
« Reply #3 on: March 05, 2002, 11:31:42 AM »
when i Stop the mysqld i get the error

/usr/libexec/mysqld -O max_connections=200 --skip-locking

Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

020305 12:14:14  Aborting

But I am logged in as root on the server running everything form the server



and how do i change my.cnf to make max_connections = 200


[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Michael

Re: changing settings in MYSQL
« Reply #4 on: March 05, 2002, 11:48:50 AM »
As I said before don't edit my.cnf directly. Create a file called eg. /etc/e-smith/templates-custom/etc/my.cnf/006myOptions and add the following lines to it:

max_connections=200
skip-locking

(for more details see the MySQL manual, "4.1 Configuring MySQL"). Create my.cnf using "/sbin/e-smith/expand-template /etc/my.cnf" and restart MySQL as mentioned before. (http://www.e-smith.org/custom/)

Darren

Re: changing settings in MYSQL Final
« Reply #5 on: March 07, 2002, 07:15:13 AM »
Just incase anyone looks at this thread
this is what has to be done

create a dir at  /etc/e-smith/templates-custom/etc/
called my.cnf

Enter  /etc/e-smith/templates-custom/etc/my.cnf/

create a file called 001All          (just a file with a number at the beginning and a name)

type the below code into the file using
pico  001All

##########code###############
datadir= /var/lib/mysql
socket= /var/lib/mysql/mysql.sock
# this increases the max connections to 500
set-variable = max_connections=500
# increases key buffer to 32mb
set-variable = key_buffer=32M
increases the table cache to 256
set-variable = table_cache=256
set-variable = sort_buffer=4M
set-variable = record_buffer=1M

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
###############################

then rebuild the template
/sbin/e-smith/expand-template /etc/my.cnf

then restart mysql with the new settings
/etc/init.d/mysqld restart

Thanks For all the help I received off Rick and Michael