Best my.cnf config

Best my.cnf config

by Eric Hagley -
Number of replies: 6
Picture of Particularly helpful Moodlers

I'm in the process of updating my server.
I have put centOS 5.5 on it with Apache 2.2.17, PHP 5.3.6, mySQL 5.5.10-1.linux2.6.i386.

I'm having problems starting the mysql and think it is because of the my.cnf file.

I'm very new to this - am a teacher not a tech person!

My .cnf file looks like this at the moment

(at the top there is a lot of intro stuff)

# The following options will be passed to all MySQL clients

[client]

#password       = your_password (here - a simple question, should I take away the #and include the mysql password I set? Sorry for the silly question!)

port                 = 3306

socket             = /var/lib/mysql/mysql.sock

default-character-set=utf8

 

[mysqld]

port               =3306

socket             = /var/lib/mysql/mysql.sock

skip-external-locking

key_buffer_size = 384M

max_allowed_packet = 1M

table_open_cache = 512

sort_buffer_size = 2M

read_buffer_size = 2M

read_rnd_buffer_size =8M

myisam_sort_buffer_size = 64M

thread_cache_size = 8

query_cache_size = 32M

 

thread_concurrency = 8

default-character-set=utf8

skip-character-set-client-handshake

 

log-bin=mysql-bin

 

server-id          = 1

 

[mysqldump]

quick

max_allowed_packet = 16M

 

[mysql]

no-auto-rehash

 

[myisamchk]

key_buffer_size = 256M

sort_buffer_size = 256M

read_buffer = 2M

wirte_buffer = 2M

 

[mysqlhotcopy]

interactive-timeout

 

There are other things there but all after #keys so not active. I have a Dell poweredge 2900 with 4GB and intel quad-core processor 2.33GHz 2X6MB L2 Cache, 1333MHz.

Firstly, if someone could be so kind as to tell me what here is stopping mysql starting (I get the following error when I try to start mysql "The server quit without updating PID file (/var/lib/mysql/....pid" but can start it if I take the my.cnf file out.)

Secondly, with the server specs and setup I have, are there any variables in the .cnf file that could be varied to improve performance.

Also, is the utf8 info I have included here correct? I have read on the net that the latest (5.5) mysql doesn't like the "default-character-set=utf8" setting.

I have looked at the docs but they don't seem to include the variables listed here.

Any assistance would be greatly appreciated.

Kind regards,
Eric Hagley

Average of ratings: -
In reply to Eric Hagley

Re: Best my.cnf config

by Eric Hagley -
Picture of Particularly helpful Moodlers

I changed

default-character-set=utf8

skip-character-set-client-handshake

to

character-set-server=utf8

collation-server=utf8_bin

and put it under [mysql]

as per this thread and mysql started.

I would still be interested in your thoughts regarding the best config for my.cnf though.

In particular I don't have innodb but wonder if I should.

Again, many thanks in advance for your assistance.

Kind regards,

Eric

In reply to Eric Hagley

Re: Best my.cnf config

by Frankie Kam -
Picture of Plugin developers

Hi Eric.

You can take a peek at my VPS Settings. I'm running a 512Mb RAM Centos Server with an maximum load of 30 students at any time. I'm also using gzip compression and PHP-accelerator (eAccelerator).

Go here to read my settings:
http://scm.moodleace.com/course/view.php?id=52

Just login as Guest.

Frankie

In reply to Frankie Kam

Re: Best my.cnf config

by Eric Hagley -
Picture of Particularly helpful Moodlers

Many thanks Frankie for the offer. Unfortunately it seems you have the "don't allow guests" option on as I can't see the "login as guest" button. I have 4GB RAM, PHP-eAccelerator, max 100 students doing quizzes at any time. If you had those specs would you change anything in the file? Hopefully I'll be able to see your settings. Should I make an account?

Thanks again,
Eric

In reply to Eric Hagley

Re: Best my.cnf config

by Frankie Kam -
Picture of Plugin developers

Hi Eric. Oops. Forgot about that. Okay, here you go, use:

Username: student
Password: moodle

My specs are a humble 512Mb RAM. With 4Gb RAM and PHP-eAccelerator, you've got it made.

BTW, is gzip enabled on your site? I assume it is, since it really HELPS to have mod_gzip enabled for your Apache server as data is compressed enroute to your browser.

Frankie

In reply to Frankie Kam

Re: Best my.cnf config

by Eric Hagley -
Picture of Particularly helpful Moodlers

Many many thanks for that Frankie! I will look into this soon.

Remembering that these forums are open to Google, I'm not sure you want to keep that username / password combination open for too long. Could cause you some problems! Hopefully I will be able to give you something back regarding this after I have a look. Again, many thanks.

Eric

In reply to Eric Hagley

Re: Best my.cnf config

by Frankie Kam -
Picture of Plugin developers

No problem. Thanks for the heads-up on Google and my username and password being revealed to all and sundry. BTW, who are those two cutey-pies on eother side of you?