Thanks Tom,

OK I tried this, I must be doing something wrong, I entered in:   SET GLOBAL
key_buffer_size = 64 * 1024 *1024;

and got the error:  "You have an error in your SQL syntax near
'key_buffer_size = 64 * 1024 *1024' at line 1"

I must be doing something wrong.  I tried both 64M and just 64.  Should I
also enter tick marks?  I tried that too.

BD

-----Original Message-----
From: Tom Crimmins [mailto:[EMAIL PROTECTED]
Sent: Friday, January 07, 2005 11:20 AM
To: BD
Cc: mysql@lists.mysql.com
Subject: RE: Slow queries, need advice on how to improve; key_buffer?


[snip]
I tried to improve MySQL speed/performance by adding key_buffer=50M to my
my.cnf file for [mysqld].  When I restarted MySQL, I'm getting a "0
DB_ERROR_NOT_CONNECTED" error when visiting my php-MySQL web application via
http.  When I removed above and then restarted MySQL the error goes away.
[/snip]

You can set it without stopping mysql using the following:

'SET GLOBAL key_buffer_size = [size] * 1024 * 1024'

where [size] is the size in Mb you want the key_buffer_size to be. You'll
need to add it to your my.cnf if you want this setting to hold on a restart.
Try adding 'set-variable = key_buffer = 64M' to your my.cnf.

---
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa

-----Original Message-----
From: BD
Sent: Friday, January 07, 2005 9:07 AM
To: mysql@lists.mysql.com
Subject: Slow queries, need advice on how to improve; key_buffer?

Hi,

I'm having a problem with slow query and parse times with a MySQL - PHP
ecommerce application I am testing out.  Also getting an error message with
the key_buffer variable.

I tried to improve MySQL speed/performance by adding key_buffer=50M to my
my.cnf file for [mysqld].  When I restarted MySQL, I'm getting a "0
DB_ERROR_NOT_CONNECTED" error when visiting my php-MySQL web application via
http.  When I removed above and then restarted MySQL the error goes away.

I read in my Widenius - MySQL book that I should use the command
"set_variable=key_buffer=64M" (or some other memory limit - I have 1.2 gig
of ram on server).  I also tried this instead of adding the above to my.cnf.
However upon logging on as root in mySQL and running the command, I'm,
getting a command not found error.

Can anyone tell me what I'm doing wrong with the above two attempts?  Or
give any advice as to how to improve speed of accessing the mySQL database
for my web application?  I'm running MySQL 3.23.56 on a linux box.

Thanks anyone,

BD





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to