Re: Mysterious 'Lost connection' errors

2007-05-09 Thread Jon Ribbens
On Wed, May 09, 2007 at 10:07:41PM -0400, Mathieu Bruneau wrote: > We found a similar issue because we were using persistent connection in > php and had a firewall between the mysql and the webserver. The problem > is that our persistent connection were setup for lasting up to something > like 8 ho

Re: Mysterious 'Lost connection' errors

2007-05-09 Thread Mathieu Bruneau
Jon Ribbens a écrit : > We are using MySQL 5.0.27 on RedHat Enterprise Linux ES release 4, > and the MySQL-python-1.2.1_p2 connector. > > We are getting intermittent mysterious errors as follows: > > OperationalError: > (2013, 'Lost connection to MySQL server during query') > > when attemp

Databases are used to store data,

2007-05-09 Thread John Kebbel
"Databases are used to store data" This line spoke the loudest to me. Over the years I had become very proficient with FileMaker Pro's built in scripting language. I had even gotten FileMaker to construct the web pages that would be used to connect to FileMaker (including writing the page's Javasc

Re: Replace, Substitute, Delete

2007-05-09 Thread Scott Haneda
> Instead of individual replacements, as in ... > > SELECT REPLACE('De Long', ' ', ''); > > would this global approach work? > > SELECT REPLACE(imgName,' ','') FROM staff WHERE imgName REGEXP ' '; I just used that as an example. What you are doing is fine, you put the field name in the first ar

Re: Replace, Substitute, Delete

2007-05-09 Thread Scott Haneda
> (1) I thought it might be quicker than Perl or PHP. Correct me if I'm wrong. > > (2) I have read a short description of Triggers, and I thought these > three lines of code might be an excellent AFTER INSERT trigger. (I > don't know enough about Triggers yet to know if they'll even take multiple

Re: Replace, Substitute, Delete

2007-05-09 Thread John Kebbel
Instead of individual replacements, as in ... SELECT REPLACE('De Long', ' ', ''); would this global approach work? SELECT REPLACE(imgName,' ','') FROM staff WHERE imgName REGEXP ' '; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Replace, Substitute, Delete

2007-05-09 Thread John Kebbel
John Meyer wrote ... "you may want to do a perl script to find and replace the spaces." Scott Haneda wrote ... "I would move your html and string parse logic into php," If I'm doing data entry for individuals via a web page, Javascript is a third option.

Re: Which is a better design?

2007-05-09 Thread John Meyer
James Tu wrote: > The database server and the web server are on separate machines. > Table A contains a record for each user. > Let's say Table B contains 'relationship' information. They can be of > type 'friend' or 'family'. > If a user knows another user, this relationship would be kept in this

tracing the source of a query

2007-05-09 Thread Ofer Inbar
A certain query happened on our server today, that we'd like to find the source of. I can see the query in our binary long... mysqlbinlog shows: # at 114047594 #070509 15:29:21 server id 2 end_log_pos 114047722 Query thread_id=1041159 exec_time=0 error_code=0 SET TIMESTA

RE: How do I find products when a user types freeform strings like 'Sony 20" TV' or '20" Sony TV'?

2007-05-09 Thread Daevid Vincent
> -Original Message- > From: Iain Alexander [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 09, 2007 3:11 PM > To: mysql@lists.mysql.com > Subject: Re: How do I find products when a user types > freeform strings like 'Sony 20" TV' or '20" Sony TV'? > > On 4 May 2007 at 1:21, Daevid Vinc

Re: How do I find products when a user types freeform strings like 'Sony 20" TV' or '20" Sony TV'?

2007-05-09 Thread Iain Alexander
On 4 May 2007 at 1:21, Daevid Vincent wrote: > I'm having trouble figuring out the logic/query I want. > I know that all those "OR"s are not right. [snip] > WHERE products.enabled = 1 > AND( > (products.model LIKE 'sony%' OR products.model LIKE '20%' OR > products.model LIKE

Which is a better design?

2007-05-09 Thread James Tu
The database server and the web server are on separate machines. Table A contains a record for each user. Let's say Table B contains 'relationship' information. They can be of type 'friend' or 'family'. If a user knows another user, this relationship would be kept in this table, along with th

Re: Replace, Substitute, Delete

2007-05-09 Thread John Meyer
John Kebbel wrote: > For years, I've been using FileMaker Pro to generate a staff photo > gallery and staff phone directory from the same table of staff > information. I'm switching to PHP/MySQL for the year ahead. In STEP 1 > below, I concatenate a name for the teacher/staff person image and

Re: Replace, Substitute, Delete

2007-05-09 Thread Scott Haneda
> > STEP 1: Create the root of the image name > update staff set imgName = Lower(CONCAT(Left(last,6),Left(first,2))); > > STEP 2: > How do I delete spaces in the imgName? > > STEP 3: > update staff set webLine = CONCAT(" width='100' height='125'>",first," ",last,""); > > Thanks in advance for

Replace, Substitute, Delete

2007-05-09 Thread John Kebbel
For years, I've been using FileMaker Pro to generate a staff photo gallery and staff phone directory from the same table of staff information. I'm switching to PHP/MySQL for the year ahead. In STEP 1 below, I concatenate a name for the teacher/staff person image and in STEP 3 I concatenate

Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

2007-05-09 Thread Cassj
Thibaud... If you have already set your MySQL root password, then you need to login to mysql like this: > mysql -u root -p You should be prompted for the mysql root password. If you haven't set your mysql root password, then you need to do this: > mysqladmin -u root password 'new-password' You m

Re: NOT NULL = Not Working?

2007-05-09 Thread Scott Baker
I knew it was an option somewhere... Perfect! Thanks JamesDR wrote: > JamesDR wrote: >> Scott Baker wrote: >>> If I create the following table, and then try and insert the following >>> data both inserts work. It looks like the second one works (it shouldn't >>> because Last is NULL) because it a

RE: Trigger OLD question

2007-05-09 Thread emierzwa
You might try: INSERT INTO table_track select OLD.*; -Original Message- From: Olaf Stein [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 09, 2007 2:59 PM To: MySql Subject: Trigger OLD question Hi All, I have a table with 205 columns. When an update statement updates a row in this tab

Re: Trigger OLD question

2007-05-09 Thread Paul DuBois
At 4:59 PM -0400 5/9/07, Olaf Stein wrote: Hi All, I have a table with 205 columns. When an update statement updates a row in this table I want a trigger that creates a record of the old row in a separate table. The following works fine when not too many columns need to be written into the other

Trigger OLD question

2007-05-09 Thread Olaf Stein
Hi All, I have a table with 205 columns. When an update statement updates a row in this table I want a trigger that creates a record of the old row in a separate table. The following works fine when not too many columns need to be written into the other table CREATE TRIGGER track_table BEFORE UPD

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

2007-05-09 Thread Thibaud Hulin
Hi, I installed mysql 4.1.22 for Debian testing. I launched the manual installation. However, when I do : mysql -u root I get : ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) I tried to reinstall it, but it fails. Thanks for help, Thibaud. -- MySQL Genera

Re: NOT NULL = Not Working?

2007-05-09 Thread JamesDR
JamesDR wrote: > Scott Baker wrote: >> If I create the following table, and then try and insert the following >> data both inserts work. It looks like the second one works (it shouldn't >> because Last is NULL) because it assumes Last = ''. Is there a way I can >> make it NOT assume that? If Last i

Re: NOT NULL = Not Working?

2007-05-09 Thread Ricardo Conrado Serafim
Scott Baker escreveu: If I create the following table, and then try and insert the following data both inserts work. It looks like the second one works (it shouldn't because Last is NULL) because it assumes Last = ''. Is there a way I can make it NOT assume that? If Last is not specified it shoul

Re: --xml or --html output to file

2007-05-09 Thread Kebbel, John
Dan and Paul, I develop at home on Ubuntu Linux and deploy at work over FreeBSD Unix (an iMac running OS 10.4). The command line tip you suggested worked fine on Linux, so I'm assuming that I can get it to run here at work as well when I get the time to try it. Thanks again. John "Another Brick

Re: NOT NULL = Not Working?

2007-05-09 Thread JamesDR
Scott Baker wrote: > If I create the following table, and then try and insert the following > data both inserts work. It looks like the second one works (it shouldn't > because Last is NULL) because it assumes Last = ''. Is there a way I can > make it NOT assume that? If Last is not specified it sh

NOT NULL = Not Working?

2007-05-09 Thread Scott Baker
If I create the following table, and then try and insert the following data both inserts work. It looks like the second one works (it shouldn't because Last is NULL) because it assumes Last = ''. Is there a way I can make it NOT assume that? If Last is not specified it should reject that command. I

Re: Query problem

2007-05-09 Thread Martijn Tonies
> how do I return a single row per property even if it has 3 or 4 images > attached to it. Please reply to the list instead of directly to me. You could do a: select p.from properties p where exists (select i.* from images i where i.property_id = p.property_id) > > >I have a table of propert

Re: help on loading the world.sql(script and data) onto world database

2007-05-09 Thread Juan Eduardo Moreno
Kebede, Send some example of WORLD contains. Regards Juan On 5/9/07, kebede teferi <[EMAIL PROTECTED]> wrote: hi, it's my first time trying my hand in inputting data in batches to mysql database and it drives me crazy, please help. *I've created the WORLD database. *I've downloaded WORLD

Re: Query problem

2007-05-09 Thread ross
No I want all the properties only one regardless of how many images are attached to them. Think I need a distinct in there somewhere, - Original Message - From: "Jon Ribbens" <[EMAIL PROTECTED]> To: Sent: Wednesday, May 09, 2007 6:56 PM Subject: Re: Query problem On Wed, May 09, 2007

Re: Query problem

2007-05-09 Thread Jon Ribbens
On Wed, May 09, 2007 at 07:14:38PM +0200, Martijn Tonies wrote: > >I have a table of properties that is linked to a table f images with a one > property to many images relationship. I >have manged this with nested > queries but want to try and do it on one line. My current query > > > >$query = "S

help on loading the world.sql(script and data) onto world database

2007-05-09 Thread kebede teferi
hi, it's my first time trying my hand in inputting data in batches to mysql database and it drives me crazy, please help. *I've created the WORLD database. *I've downloaded WORLD.SQL and unzipped the file. *When I open it in notepad I see the instructions to create the three tables and

Re: Query problem

2007-05-09 Thread Martijn Tonies
>I have a table of properties that is linked to a table f images with a one property to many images relationship. I >have manged this with nested queries but want to try and do it on one line. My current query > >$query = "SELECT * FROM images, properties WHERE images.property_id = properties.prop

Re: Installing 2nd instance on windows.

2007-05-09 Thread C K
Thanks to all for so good responce. Now I will experiment with it and reply earliest. Thanks CPK -- Keep your Environment clean and green.

Query problem

2007-05-09 Thread ross
I have a table of properties that is linked to a table f images with a one property to many images relationship. I have manged this with nested queries but want to try and do it on one line. My current query $query = "SELECT * FROM images, properties WHERE images.property_id = properties.prope

Re: Mysterious 'Lost connection' errors

2007-05-09 Thread Jon Ribbens
On Wed, May 09, 2007 at 11:17:59AM -0400, Michael Dykman wrote: > When we first examined our server logs, we saw the same.. in our case > (again) it was only when we slowed down and examined the timestamps on > the start/stop messages that we realized that the server was > restarting at unexpected

Re: Mysterious 'Lost connection' errors

2007-05-09 Thread mos
We also have random lost connections on simple queries, but we are running MySQL v5.024a on Windows XP. We've checked the logs and nothing abnormal has turned up and we're using only MyISAM tables with InnoDb disabled. The only thing that I could suggest is to look for other copies of libmysql

Re: Mysterious 'Lost connection' errors

2007-05-09 Thread Michael Dykman
When we first examined our server logs, we saw the same.. in our case (again) it was only when we slowed down and examined the timestamps on the start/stop messages that we realized that the server was restarting at unexpected intervals. Over the course of our development, we came across this is

RE: --xml or --html output to file

2007-05-09 Thread Price, Randall
Hello John, This works for me as well only I couldn't get the ~/test_file.html syntax to work so I changed it to C:\test_file.html and it worked. Thanks, Randall Price -Original Message- From: Dan Buettner [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 6:20 PM To: [EMAIL PROTEC

Re: Mysterious 'Lost connection' errors

2007-05-09 Thread Jon Ribbens
On Wed, May 09, 2007 at 09:22:34AM -0400, Michael Dykman wrote: > I realize that's quite unlikely that you have performed a similar > sloppy import but there is likely some edge condition on your server > (wierd permissions in the data directory, corruoted tables, etc.) > but I still recommend that

Is MySQL IPv6 Compliant ?

2007-05-09 Thread Xavier Jeannin
Hello Sorry to ask a question already posted, but answers appear not clear and I do not find any information in the documentation. There is a patch for IPv6 at http://www.ngn.euro6ix.org/IPv6/mysql/ fot the 4.0.18 version. Does anyone use this patch with success in her/his company ? Does a

Re: Frequently MyISAM TABLE corruption.....Pls help

2007-05-09 Thread Gerald L. Clark
Nilnandan wrote: Hello all, I have one server which has mysql 5.0.27 installed. There is one table named table1. that table has 122000 records..It has 114 fields and 22 indexes. Now this table always been corrupt. I have try to found the solution but i couldn't. Pls help me ASAP. I have used

Re: Mysterious 'Lost connection' errors

2007-05-09 Thread Michael Dykman
we ran into a similar condition using 5.0.27 in a PHP application.. in our case it had nothing to do with the version. check your server logs for evidence of a restart. What we had done was naively imported innodb extents from a v.4 datbase which seemed to work fine at first but in fact setup an

Frequently MyISAM TABLE corruption.....Pls help

2007-05-09 Thread Nilnandan
Hello all, I have one server which has mysql 5.0.27 installed. There is one table named table1. that table has 122000 records..It has 114 fields and 22 indexes. Now this table always been corrupt. I have try to found the solution but i couldn't. Pls help me ASAP. I have used CHECK and REPAIR o

Re: duplicating a replicated slave environment

2007-05-09 Thread Baron Schwartz
Hi Hank, (CCing the list again so others can see...) Hank wrote: Thanks for your reply. Two things -- I start/stop the sql-thread once daily as a backup strategy. This slave has no application readers or writers. If anything should go wrong with the master, I have one full day to either co

Mysterious 'Lost connection' errors

2007-05-09 Thread Jon Ribbens
We are using MySQL 5.0.27 on RedHat Enterprise Linux ES release 4, and the MySQL-python-1.2.1_p2 connector. We are getting intermittent mysterious errors as follows: OperationalError: (2013, 'Lost connection to MySQL server during query') when attempting to connect to the MySQL server (not