RE: lost connection DURING query?

2005-03-15 Thread Crouch, Luke H.
this query is select * from ogcount which is a table containing 1 record, so 
probably not the packet size, though that's very good info to know. I'm going 
to see if I get the same error if I use a JDBC driver instead of ODBC.
 
-L
 

Luke Crouch 
918-461-5326 
[EMAIL PROTECTED] 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 8:08 AM
To: Crouch, Luke H.
Cc: mysql@lists.mysql.com
Subject: Re: lost connection DURING query?




Crouch, Luke H. [EMAIL PROTECTED] wrote on 03/14/2005 09:34:02 AM:

 This error message seems a bit different than others I have gotten. 
 it is from a ColdFusion server that uses an ODBC driver...
 ODBC Error Code = S1000 (General error) 
 
 
 [MySQL][ODBC 3.51 Driver][mysqld-4.0.20-log]Lost connection to MySQL
 server during query 
 
 that during part threw me, but it may just be the way ODBC states the error?
 
 mysql error log shows no errors for the time(s) that this happened, 
 other than a bunch of aborted connections - but that is because I 
 set wait_timeout pretty low to avoid connection problems we were 
 having with other clients. 
 
 does anyone know if this is the error ODBC gets when trying to use a
 connection that has been killed by the MySQL server? if that is so, 
 it may be that I just need to put the wait_timeout back up.
 
 any help would be great! thanks!
 
 -L
 
 Luke Crouch 
 918-461-5326 
 [EMAIL PROTECTED] 
 
  

I only see this error whenever I send a query that exceeds the server's 
max_allowed_packet. If you are doing a very large INSERT statement, that's 
probably what happened. Either split your INSERT into chunks smaller than 
max_allowed_packet or increase the server's limit until it lets your command 
through. 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine 




lost connection DURING query?

2005-03-14 Thread Crouch, Luke H.
This error message seems a bit different than others I have gotten. it is from 
a ColdFusion server that uses an ODBC driver...
ODBC Error Code = S1000 (General error) 


[MySQL][ODBC 3.51 Driver][mysqld-4.0.20-log]Lost connection to MySQL server 
during query 

that during part threw me, but it may just be the way ODBC states the error?

mysql error log shows no errors for the time(s) that this happened, other than 
a bunch of aborted connections - but that is because I set wait_timeout 
pretty low to avoid connection problems we were having with other clients. 

does anyone know if this is the error ODBC gets when trying to use a connection 
that has been killed by the MySQL server? if that is so, it may be that I just 
need to put the wait_timeout back up.

any help would be great! thanks!

-L

Luke Crouch 
918-461-5326 
[EMAIL PROTECTED] 

 


ulimit effects on mysql user?

2005-03-03 Thread Crouch, Luke H.
if I have changed my /etc/security/limits.conf file to include these lines:
 
mysqlsoft  nofile4096
mysqlhard nofile63536
 
and then done:
 
[EMAIL PROTECTED] root]# su mysql
[EMAIL PROTECTED] root]$ ulimit -n 8192
[EMAIL PROTECTED] root]$ ulimit -n
8192

does this new 8192 open file limit apply to the already-running mysqld process, 
which was started like so:
 
[EMAIL PROTECTED] root]# /usr/local/mysql/bin/mysqld_safe --user=mysql 
 
? or will I need to restart the mysql server and/or machine to have the new 
open files limit take effect for the mysql server? am I correct that the open 
files limit placed on the mysql user will be the limit faced by the mysqld 
process, since the process is started with the --user=mysql option?
 
thanks,
-L


extended insert limit?

2005-02-22 Thread Crouch, Luke H.
what is the limit to the number of records that can be inserted via an extended 
insert statement. I know mysqldump creates a new insert statement every X 
records, but I forgot what that number is, and I'm trying to duplicate the 
action.
 
thanks,
-L


RE: extended insert limit?

2005-02-22 Thread Crouch, Luke H.
thanks much. exactly what I needed.
 
-L

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 22, 2005 11:22 AM
To: Crouch, Luke H.
Cc: mysql@lists.mysql.com
Subject: Re: extended insert limit?




Crouch, Luke H. [EMAIL PROTECTED] wrote on 02/22/2005 12:18:51 PM:

 what is the limit to the number of records that can be inserted via 
 an extended insert statement. I know mysqldump creates a new insert 
 statement every X records, but I forgot what that number is, and I'm
 trying to duplicate the action.
  
 thanks,
 -L

The X you mention depends on the max_allowed_packet server setting. If adding 
another set of VALUES to an extended INSERT statement would cause the statement 
to exceed that value, mysqldump will end the current extended INSERT and start 
a new one. 

You will need to know the value of that variable for the server intended to 
execute the INSERT your are building in order to build INSERT statements that 
are as large as possible. Use SHOW VARIABLES LIKE 'max%' to see that value and 
several others. 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine 





strange user permissions error

2004-10-15 Thread Crouch, Luke H.
we had a power outtage and for some reason our user permissions didn't seem to come 
back? we had a record of granting a 'cfmysql'@'%.ourdomain.com' and it didn't seem to 
work at all until I did a flush privileges...and even after that, I had to go in and 
set up some explicit domains in addition to the wildcard.
 
anyone know what may have caused the user permissions to go flaky like that?
 
-L

Luke Crouch 
918-461-5326 
[EMAIL PROTECTED] 

 


log_slave_updates without restarting

2004-09-29 Thread Crouch, Luke H.
is there a way to turn on log_slave_updates on a server without having to restart it?
 
-L

Luke Crouch 
918-461-5326 
[EMAIL PROTECTED] 

 


replication vs. c-jdbc

2004-09-07 Thread Crouch, Luke H.
we currently have a series of machines set up with replication (1 master, 4 slaves) 
and we were looking for a way to load-balance the read queries across the slaves, and 
came upon c-jdbc. I was wondering if anyone else has experience running c-jdbc in 
front of MySQL, and if so, if they can summarize the pros and cons of using the 
standard MySQL replication or the 'mirror' configuration of c-jdbc? we may look at 
going with c-jdbc mirroring rather than MySQL replication if there are no significant 
drawbacks...
 
thanks,
-L

Luke Crouch 
918-461-5326 
[EMAIL PROTECTED] 

 


replication threads on different CPUs

2004-08-26 Thread Crouch, Luke H.
I'm a bit of a linux newbie and a newbie to replication, so I'll try to ask this 
question simply...
 
we're using mysql 4 to do replication, and I notice on the master I have this from 
using mytop:
 
  Id  User Host/IP DB  TimeCmd Query or State
  --   --- --  --- --
2670  root   localhost   rmps 0  Query show full processlist
2668  repl  rh-mysql-4  409 Binlog Has sent all binlog to 
slave; waiting for binlog to be updated
2666  repl  rh-mysql-2  411 Binlog Has sent all binlog to 
slave; waiting for binlog to be updated
2667  repl  rh-mysql-3  411 Binlog Has sent all binlog to 
slave; waiting for binlog to be updated

it looks like three seperate threads are running on the master here, one for each 
slave. in this particular machine, we have 2 HT processors, so 4 possible CPU threads. 
if it's not done automatically by Linux (RedHat 9) or MySQL, can I configure these 
threads to use their own CPU to maximize the performance? I assume MySQL or Linux will 
do this automatically.
 
we have the same machines in use for the slaves...so can I make the slave IO thread 
execute on one processor, and the slave SQL thread execute on another? does this 
happen automatically as well?
 
thanks,
-L

Luke Crouch 
918-461-5326 
[EMAIL PROTECTED] 

 


auotmate read queries for replication

2004-08-25 Thread Crouch, Luke H.
is there a simple way to automate read queries for replication above the application 
level? we have a huge amount of disparate systems with all their own queries, and we'd 
like to be able to set up the reads to go to our slaves, and the writes to go to our 
master without having to change every application's queries to different datasources 
by hand.
 
is there some kind of connection router than can filter the reads to one of the slaves 
and the writes to the master? if so, is the performance hit not worth it?
 
thanks,
-L

Luke Crouch 
918-461-5326 
[EMAIL PROTECTED] 

 


replication binary log files location

2004-08-24 Thread Crouch, Luke H.
I'm trying to move my binary log files onto a different drive than our main data drive 
to get a little performance boost.
 
the drives are set up like so:
drive 1 (sda):
swap
/boot
/usr
 
drive 2 (sdb):
/
 
mysql is installed in /usr/local/mysql and its data directory is /usr/local/mysql/var
I want to set the binary logs to go to the 2nd drive, sdb, so I made a new directory, 
/logging
I went into logging and changed its ownership and group to mysql...
chown -R mysql .
chgrp -R mysql .
[EMAIL PROTECTED] logging]# pwd
/logging
[EMAIL PROTECTED] logging]# ls -al
total 8
drwxr-xr-x2 mysqlmysql4096 Aug 24 04:26 .
drwxr-xr-x   23 root root 4096 Aug 24 04:53 ..
 
then went into my.cnf and put:
log-bin=/logging
 
but when I try to start mysql this way:
[EMAIL PROTECTED] mysql]# bin/mysqld_safe --user=mysql 

no logging, and I get this in the .err file
040824  5:46:53  Could not use /logging for logging (error 13). Turning logging off 
for the whole duration of the MySQL server process. To turn it on again: fix the 
cause, shutdown the MySQL server and restart it.

error 13 is typically a unix permissions error, right? but I changed the /logging 
directory to be owned by mysql (and am running mysqld_safe --user=mysql)
 
any ideas?
 
thanks,
-L

Luke Crouch 
918-461-5326 
[EMAIL PROTECTED] 

 


Re: replication binary log files location

2004-08-24 Thread Crouch, Luke H.
I found the solution to my own problem...
 
the log-bin option is a specific filename. so when you set:
log-bin=/logging
 
mysql must have ownership of the / folder, as it is trying to create /logging.001 and 
/logging.index
 
easily fixed by adding the file-name to the path...
 
log-bin=/logging/host-name
which will now create /logging/host-name-bin.001 and /logging/host-name-bin.index
and since mysql has ownership of the logging directory, this is okay...
 
-L

Luke Crouch 
918-461-5326 
[EMAIL PROTECTED] 

 


super-smack installation problem

2004-08-23 Thread Crouch, Luke H.
I'm trying to configure and install super-smack-1.2 and get a problem on configure.
 
it's looking for mysql_real_connect and can't find it...where would this be located? 
I'm assuming it is in libmysqlclient.so, and I have that file in my /usr/lib/mysql 
folder, among other places...but it doesn't find it...
 
the error it actually gives is this:
checking for libmysqlclient...
checking for mysql_real_connect in -lmysqlclient... no
configure: error: Could not find libmysqlclient in ' /usr/lib /usr/lib/mysql   
 /usr/local/lib /usr/local/lib/mysql/usr/local/mysql/lib'

and when I do a find:
[EMAIL PROTECTED] super-smack-1.2]# find / -name libmysqlclient*
/usr/lib/mysql/libmysqlclient.a
/usr/lib/mysql/libmysqlclient.la
/usr/lib/mysql/libmysqlclient_r.a
/usr/lib/mysql/libmysqlclient_r.la
/usr/lib/libmysqlclient.so.10
/usr/lib/libmysqlclient.so
/usr/lib/libmysqlclient.so.10.0.0
/usr/lib/libmysqlclient.so.12
/usr/lib/libmysqlclient.so.12.0.0
/usr/lib/libmysqlclient_r.so
/usr/lib/libmysqlclient_r.so.10
/usr/lib/libmysqlclient_r.so.10.0.0
/usr/lib/libmysqlclient_r.so.12
/usr/lib/libmysqlclient_r.so.12.0.0
/usr/local/mysql/lib/mysql/libmysqlclient.so.12.0.0
/usr/local/mysql/lib/mysql/libmysqlclient.so.12
/usr/local/mysql/lib/mysql/libmysqlclient.so
/usr/local/mysql/lib/mysql/libmysqlclient.la
/usr/local/mysql/lib/mysql/libmysqlclient.a
/mysqlsource/mysql-4.0.20/libmysql/.libs/libmysqlclient.so.12.0.0
/mysqlsource/mysql-4.0.20/libmysql/.libs/libmysqlclient.so.12
/mysqlsource/mysql-4.0.20/libmysql/.libs/libmysqlclient.so
/mysqlsource/mysql-4.0.20/libmysql/.libs/libmysqlclient.a
/mysqlsource/mysql-4.0.20/libmysql/.libs/libmysqlclient.lai
/mysqlsource/mysql-4.0.20/libmysql/.libs/libmysqlclient.la
/mysqlsource/mysql-4.0.20/libmysql/libmysqlclient.la

I have installed the MySQL-compat and the MySQL-devel for 4.0.20
 
any ideas?
 
thanks,
-L

Luke Crouch 
918-461-5326 
[EMAIL PROTECTED]