Re: MySQL and OpenBSD 2.8/9

2001-09-05 Thread Derek Sivers


I'm running OpenBSD 2.8 and MySQL 3.22.32 (recent cvs port).
After time ( 1day) the cpu load for the mysqld process goes up to 98%..
There is a known problem in 2.8 thread library. I do not know
when will they fix it. You can ask them , though ..
I've seen that this has been addressed in the FAQ, does anyone know if
the fix for the pthread problem has been applied to 2.8-stable.  Is this
the case?  Or am I wasting my time and should just upgrade to 2.9?


I'm using OpenBSD 2.9-stable port of mysql-3.23.41, and the problem is 
still happening in the default install.

On a low-traffic server, it's not a problem.

But with LOTS of MySQL traffic  (20,000 unique users a day on a 100% 
MySQL-driven website) - yes the mysqld process goes up to 99% and freezes 
the server until I reboot.

I've tried the newest pth threads.  I've tried all optimizing both MySQL 
install and the OpenBSD kernel.  No luck.  Still flies out of control.

I know it's not the hardware itself because I had this *exact same server* 
running our website on Debian Linux, same amount of traffic, and it worked 
fine.  No stress.   But as soon as I switched it to OpenBSD 2.9, MySQL 
freaked out.

I'd *LOVE* if someone would ever solve this.  Hell - I'd *pay* for a solution!

But as of now, nope.  The MySQL / OpenBSD / pthread problem isn't fixed yet.

(My short-term solution was to move MySQL to its own dedicated server with 
a 1.4 mHz processor, and 1 gig of RAM.  Even then MySQLd is still at 50% 
CPU most of the time!  There's got to be something wrong here Even if 
the problem is just my devotion to OpenBSD.)

If someone wants to use my high-traffic site as a guinea-pig, that's 
fine.   Contact me at [EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




NEW MAKE BUG? sigcontext.h

2001-04-02 Thread Derek Sivers

Doing a "make" on the newest MySQL stable 3.23.36 source tarball - on a 
stock Cobalt RaQ3 (Linux 386) which I've installed MySQL on many times before.

Got this strange error:


gcc -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -I./../include -I./.. -I..-O6 
-DDBUG_OFF   -c readline.c

In file included from /usr/include/signal.h:300,
  from readline.c:50:

/usr/include/bits/sigcontext.h:28: asm/sigcontext.h: No such file or directory



Anyone know what it means?  How would you debug this?


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




MySQL problems on OpenBSD?

2001-01-28 Thread Derek Sivers

Running the standard (brand-new) OpenBSD install of MySQL from 
/usr/ports/databases/mysql/
Version 3.23.32 - the port that Brad made just a few days ago.  No 
options.  Just "make install".

It works fine exceptI keep getting this error:
ERROR 2006: MySQL server has gone away

It comes back immediately (1 second later), but still it worries me.

Before I put this OpenBSD/MySQL server live to our high-traffic site, I 
thought I should ask the OpenBSD and MySQL lists:

Ever heard of this error?
Know what might cause it, or fix it?
Is it *BSD-specific?
(The only mention of it I see in old old MySQL list archives always seems 
to be on a *BSD server.)


I'm on the newest OpenBSD 2.8 with all current patches, freshly installed 
this week.
Nothing but the newest Apache, MySQL, and PHP on the server.
Though we can't blame Apache or PHP, because I was getting this error in 
MySQL command-line mode.


[If I need to report a bug, let me know.  A "bug-reporting URL" would be 
nice, since I'm a kinda-newbie and never reported a bug before.]

Thanks!



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




PROJECT (for perl/sed/regex person)

2001-01-25 Thread Derek Sivers

I've got a quickie project here, that's over my head, that I could pay a little 
something for:


Can you set up a script that will take flat text files, (one file per record, many 
files per directory) - and do some sed/regex conditional replace, and turn it into 
MySQL statements?

I've done one, below, but don't know how to automate the process.

TIMELINE:  by this weekend, January 27
PAYPOINT:  $100  (done as a perl, shell, or PHP script that can scan a set directory 
for incoming text files, run your process on each one, then feed each one into MySQL.)

- INCOMING FILE: 

name=John Jacob Schmidt
addr=1313 Willamena Way
username=asdfhjkl
artistname=The Beatles
albumname=Can't Get Enough
description:
One of the best albums they ever made.
Really one of the finest.
Oh yes i mean it truly.
@END@
price=15
songs:
track=1
title=Michelle
track=2
title=Taxman
track=3
title=Tomorrow Never Knows
@END@

- OUTGOING FILE: 
insert into clientinfo (
name='John Jacob Schmidt',
addr='1313 Willamena Way',
username='asdfhjkl');

insert into albuminfo (
albumcode=concat('username', now()),
artistname='The Beatles',
albumname='Can\'t Get Enough',
description='One of the best albums they ever made.
Really one of the finest.
Oh yes i mean it truly.',
price='15');

insert into songs (
albumcode='$albumcode',   // the auto-generated one
track='1',
title='Michelle')
insert into songs (
albumcode='$albumcode',
track='2',
title='Taxman');
insert into songs (
albumcode='$albumcode',
track='3',
title='Tomorrow Never Knows');


NOTE:  Most fields are only one line, so the carriage return is the stopping point.  
But as you see there are just a few that have carriage returns, so on those we do 
"fieldname:" instead of "fieldname=" - then end it with "@END@"





-- 
Derek Sivers, CD Baby
[EMAIL PROTECTED]  (503)595-3000
www.cdbaby.com | www.cdbaby.net

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




PROJECT: for perl/sed/regex type...

2001-01-25 Thread Derek Sivers

I've got a quickie project here, that's over my head, that I could pay a little 
something for:


Can you set up a script that will take flat text files, (one file per record, many 
files per directory) - and do some sed/regex conditional replace, and turn it into 
MySQL statements?

I've done one, below, but don't know how to automate the process.

TIMELINE: by this weekend, January 27
PAYPOINT: $100 (done as a perl, shell, or PHP script that can scan a set directory 
for incoming text files, run your process on each one, then feed each one into MySQL.)

- INCOMING FILE: 

name=John Jacob Schmidt
addr=1313 Willamena Way
username=asdfhjkl
artistname=The Beatles
albumname=Can't Get Enough
description:
One of the best albums they ever made.
Really one of the finest.
Oh yes i mean it truly.
@END@END@
price=15
songs:
track=1
title=Michelle
track=2
title=Taxman
track=3
title=Tomorrow Never Knows
@END@END@

- OUTGOING FILE: 
insert into clientinfo (
name='John Jacob Schmidt',
addr='1313 Willamena Way',
username='asdfhjkl');

insert into albuminfo (
albumcode=concat('username', now()),
artistname='The Beatles',
albumname='Can\'t Get Enough',
description='One of the best albums they ever made.
Really one of the finest.
Oh yes i mean it truly.',
price='15');

insert into songs (
albumcode='$albumcode',  // the auto-generated one we used in the previous table
track='1',
title='Michelle')
insert into songs (
albumcode='$albumcode',
track='2',
title='Taxman');
insert into songs (
albumcode='$albumcode',
track='3',
title='Tomorrow Never Knows');


NOTE: Most fields are only one line, so the carriage return is the stopping point. 
But as you see there are just a few that have carriage returns, so on those we do 
"fieldname:" instead of "fieldname=" - then end it with "@END@END@"

More details if you're interested, but that's about it.  The actual file is twice as 
big, but with no other surprises.  (That's an actual example, above, just with some 
lines taken out.).
Please reply by email, not to the whole list.
Thanks!

-- 
Derek Sivers
[EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Troubles installing MySQL-3.22.32

2001-01-24 Thread Derek Sivers

At 09:58 PM 1/23/01 , Manuel Leos wrote:
Hi everybody, I'm trying to install the RPM on a RH
7.0 everything looks normal but the server dies
sending this message
mysqld: Can't find file: 'host.ISM' (errno: 2)


It's part of the first database/table that MySQL sets up for you.
I get this error sometimes if my permissions are set wrong.
If the data directory is readable, for example.
Give that a try.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: INSTALLATION QUESTION on Cobalt Raq3

2001-01-23 Thread Derek Sivers

Don't use RPM.
The RPMs for the Cobalt RaQ3 suck.

I have 8 different Cobalt RaQ3's and here's the way I've used to install:
I've installed it this way successfully each time.
Sounds like a bit of a pain, but puts you in much better control of MySQL.


 INSTALLATION INSTRUCTIONS

#1 - download the newest MySQL *source* tarball from mysql.com or its mirrors.

Do all the following stuff as "root" user:


##  UNTAR IT
tar -xvfz mysql-#.#.tar.gz


## - FIRST: TO MAKE A USER NAME 'mysql' GROUP NAME 'mysql' TO SAFELY RUN 
MYSQL UNDER
/usr/sbin/groupadd mysql
/usr/sbin/useradd mysql -g mysql


./configure  --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-lz
make
make install


## - SET THE DATA DIRECTORY TO BE /VAR/DB - MAKE A SYMLINK FOR IT HERE IN 
THE MYSQL FOLDER
cd mysql
ln -s /var/db var


## - INSTALL THE BASIC DATABASE NEEDED TO RUN
bin/mysql_install_db
## - if there's a problem, do the next step then come back and do this step 
again.


## - GO SET PERMISSIONS FOR THE DATA DIRECTORY
cd /var
chown mysql:mysql -R db
chmod 700 -R db


## - COPY THE STARTUP/INIT/CONFIG FILES TO THE RIGHT PLACE
cd share/mysql
cp mysql.server /etc/rc.d/init.d/
cp my-small.cnf /var/db/my.cnf

## - PUT STARTUP FILES IN EVERY STARTUP FOLDER - so if they reboot the 
server, MySQL starts!
cd /etc/rc.d/init.d/
chmod 755 mysql.server
cd ../rc3.d
ln -s ../init.d/mysql.server S88mysql
cd ../rc4.d
ln -s ../init.d/mysql.server S88mysql
cd ../rc6.d
ln -s ../init.d/mysql.server K18mysql
cd ../rc0.d
ln -s ../init.d/mysql.server K18mysql


## - SYMLINK THE COMMANDS INTO THE PATH SO WE CAN JUST TYPE "mysql" FROM 
ANYWHERE
cd /usr/bin
ln -s /usr/local/mysql/bin/* ./
cd /usr/sbin
ln -s /usr/local/mysql/bin/* ./


## - START IT!
safe_mysqld 
mysqladmin -u root -p password 'somesecretpassword'
mysql -u root -p
use mysql;
delete from user where user='';
exit;

from now on, connect to mysql with 'mysql -u root -p' then type the magic 
password afterwards.

Voila!


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




keeping MySQL on a SEPARATE SERVER - lag time?

2001-01-16 Thread Derek Sivers

Has anyone done testing to show the difference between:

#1 - having MySQL on the same server as Apache/PHP

vs.

#2 - having MySQL on its own dedicated computer, TCP/IP connected to the 
main Apache box


NOTE:  We use lots of little MySQL lookups in our PHP scripts.  Nothing 
that intensive.  But our site is getting pretty MySQL-intensive and often 
MySQL takes up 30% of the CPU power.


Advice?  Opinion?  URLs to read?


Thanks!


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php