Using MySQL to store/archive code/html etc?

2005-05-27 Thread zzapper
time going thru CD backups etc than it would take to start again. I've postulated using MySql as a store for such pages. but is a database suitable for storing, searching for and retrieving such information.??? Your eminent opinions and experiences desired!! -- zzapper vim -c :%s%s*%Cyrnfr

Re: Using MySQL to store/archive code/html etc?

2005-05-27 Thread SGreen
developed a piece of HTML,PHP,Perl,Javascript for and I spend more time going thru CD backups etc than it would take to start again. I've postulated using MySql as a store for such pages. but is a database suitable for storing, searching for and retrieving such information.??? Your eminent

Re: Using MySQL to store/archive code/html etc?

2005-05-27 Thread Frank Bax
,Javascript for and I spend more time going thru CD backups etc than it would take to start again. I've postulated using MySql as a store for such pages. but is a database suitable for storing, searching for and retrieving such information.??? No. Store all the files on a hard disk and use

substituting a certain word in all the tinytext rows in a table using SQL command

2005-05-19 Thread symbulos
Dear friend, Is it possible to substitute, using SQL command, a certain word with another word in all the field in all the rows (tinytext) within a certain table? Thanks in advance -- symbulos - ethical services for your organisation website www.symbulos.com -- MySQL General Mailing List

Re: substituting a certain word in all the tinytext rows in a table using SQL command

2005-05-19 Thread Ian Sales (DBA)
symbulos wrote: Is it possible to substitute, using SQL command, a certain word with another word in all the field in all the rows (tinytext) within a certain table? - see REPLACE here: http://dev.mysql.com/doc/mysql/en/string-functions.html - ian

Re: Lost connection to Mysql server during query using a group by clause and sub query

2005-05-19 Thread Ware Adams
On May 19, 2005, at 12:51 AM, Dan Rossi wrote: Hi there, I am having issues with this funny error message. I am trying to do a sub query and then a group by clause on a date. However i keep getting this annoying message for some reason. Happens via terminal aswell as my sql gui. Here is the

Re: substituting a certain word in all the tinytext rows in a table using SQL command

2005-05-19 Thread Philippe Poelvoorde
symbulos wrote: Dear friend, Is it possible to substitute, using SQL command, a certain word with another word in all the field in all the rows (tinytext) within a certain table? Thanks in advance look for REPLACE : http://dev.mysql.com/doc/mysql/en/string-functions.html UPDATE . FROM

Using AVG

2005-05-18 Thread Mike Blezien
Hello, when using the AVG function like this: SELECT AVG((5+8+10)/3) AS rate; it returns NULL?? the AVG can be used to do a literal math calculation ?? TIA -- Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work

Re: Using AVG

2005-05-18 Thread Simon Garner
Mike Blezien wrote: Hello, when using the AVG function like this: SELECT AVG((5+8+10)/3) AS rate; it returns NULL?? the AVG can be used to do a literal math calculation ?? TIA That doesn't make any sense... AVG is a GROUP BY function. If you have 3 rows with values 5, 8 and 10 then surely

Re: Using AVG

2005-05-18 Thread Mike Blezien
Simon Garner wrote: Mike Blezien wrote: Hello, when using the AVG function like this: SELECT AVG((5+8+10)/3) AS rate; it returns NULL?? the AVG can be used to do a literal math calculation ?? TIA That doesn't make any sense... AVG is a GROUP BY function. If you have 3 rows with values 5, 8 and 10

Re: Using AVG

2005-05-18 Thread Dominicus Donny
Try this: SELECT AVG((5+8+10)/3) AS rate FROM an_existing_table_name; - Original Message - From: Mike Blezien [EMAIL PROTECTED] To: MySQL List mysql@lists.mysql.com Sent: Thursday, May 19, 2005 9:24 AM Subject: Using AVG Hello, when using the AVG function like this: SELECT AVG((5+8+10

Lost connection to Mysql server during query using a group by clause and sub query

2005-05-18 Thread Dan Rossi
Hi there, I am having issues with this funny error message. I am trying to do a sub query and then a group by clause on a date. However i keep getting this annoying message for some reason. Happens via terminal aswell as my sql gui. Here is the query I am trying to do select (select

re: using OR seems faster than using IN

2005-05-17 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a query where I am fetching, in my test 68, rows. Using OR was faster by about 1.5 times, than the same query using IN. Should this be expected, using mysql 5.0.4, on Solaris 8, java 1.5. SELECT name, id FROM table WHERE idx=? OR idx

Site search using MySQL fulltext index

2005-05-10 Thread Zooman Jee
Hi, I've implemented my site search using MySQL db fulltext index. I understand that fulltext index currently doesn't support stemming of words. However I want to implement my search such that a query containing words in singular tense matches records of words in plural tense and vice versa

Re: MySQL not using optimum disk throughput.

2005-05-09 Thread Kevin Burton
Greg Whalin wrote: I suspect this is an OS issue. Our Opteron's were completing large data update queries aprox 2-3 times slower than our Xeons when running under 2.6. After a switch to 2.4, Opteron's are faster than the Xeons. I mentioned NPTL being shut off (LD_ASSUME_KERNEL=2.4.19 in

Re: MySQL not using optimum disk throughput.

2005-05-09 Thread Greg Whalin
Kevin Burton wrote: Greg Whalin wrote: I suspect this is an OS issue. Our Opteron's were completing large data update queries aprox 2-3 times slower than our Xeons when running under 2.6. After a switch to 2.4, Opteron's are faster than the Xeons. I mentioned NPTL being shut off

Re: MySQL not using optimum disk throughput.

2005-05-09 Thread Kevin Burton
Greg Whalin wrote: We are currently running 2.3.2 (Fedora Core 1) on our Opterons. When we were still running linux 2.6, we were on 2.3.3 (Fedora Core 2). Yeah... we were being bitten by 2.3.2's NPTL implementation for MONTHs before I heard a rumor that the Internet Archive moved to 2.3.4.

Re: MySQL not using optimum disk throughput.

2005-05-09 Thread Greg Whalin
Kevin Burton wrote: Greg Whalin wrote: We are currently running 2.3.2 (Fedora Core 1) on our Opterons. When we were still running linux 2.6, we were on 2.3.3 (Fedora Core 2). Yeah... we were being bitten by 2.3.2's NPTL implementation for MONTHs before I heard a rumor that the Internet Archive

Re: MySQL not using optimum disk throughput.

2005-05-09 Thread Kevin Burton
Greg Whalin wrote: Curious, were you seeing deadlocks in Suns JVM w/ Tomcat? Never with Tomcat but we might have a different number of threads. But it *was* with Java... We were forced to run Tomcat w/ NPTL off due to deadlocks under glibc 2.3.2+NPTL. Yup.. thats the problem we had. But we

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Peter Zaitsev
On Fri, 2005-05-06 at 22:16, John David Duncan wrote: And no performance diff. Note that you're benchmarks only show a 20M addition overhead. We're about 60x too slow for these drives so I'm not sure what could be going on here :-/ I know of a site that encountered a similar

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Peter Zaitsev
On Fri, 2005-05-06 at 19:01, Greg Whalin wrote: What drives are you using? For SCSI RAID, you definitly want deadline scheduler. That said, even after the switch to deadline, we saw our Opteron's running way slow (compared to older slower Xeons). Whatever the problem is, we fought

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Greg Whalin
, Greg Whalin wrote: What drives are you using? For SCSI RAID, you definitly want deadline scheduler. That said, even after the switch to deadline, we saw our Opteron's running way slow (compared to older slower Xeons). Whatever the problem is, we fought it for quite a while (though difficult

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Atle Veka
On Fri, 6 May 2005, Kevin Burton wrote: For the record... no a loaded system what type of IO do you guys see? Anywhere near full disk capacity? I'm curious to see what type of IO people are seeing on a production/loaded mysql box. Mostly Linux in this thread so far, so I figured I'd throw

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Kevin Burton
Atle Veka wrote: On Fri, 6 May 2005, Kevin Burton wrote: For the record... no a loaded system what type of IO do you guys see? Anywhere near full disk capacity? I'm curious to see what type of IO people are seeing on a production/loaded mysql box. Mostly Linux in this thread so far, so I

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Atle Veka
On Sat, 7 May 2005, Kevin Burton wrote: It looks like you're saying here that a single disk is FASTER than your RAID 10 setup. Correct? Which is interesting. I'm wondering if this is a RAID config issue. It just seems to make a LOT more sense that RAID 1 or 10 would be faster than a

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Dan Nelson
In the last episode (May 07), Atle Veka said: On Fri, 6 May 2005, Kevin Burton wrote: For the record... no a loaded system what type of IO do you guys see? Anywhere near full disk capacity? I'm curious to see what type of IO people are seeing on a production/loaded mysql box. Mostly

C API : Problem using multi-statements

2005-05-06 Thread ganjineh
Hello, I have some problems using multiple queries in a databased driven project, therefore I wrote a little testprogram which causes the same problems. I am using the C-API of MySQL 4.1.11 on a Gentoo Linux 3.3.2-r5, propolice-3.3-7 with 2.4.27 kernel. I connect to the server (on localhost

Re: C API : Problem using multi-statements

2005-05-06 Thread Jeremiah Gowdy
Answer is simple. Can't do that. - Original Message - From: [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, May 06, 2005 5:40 AM Subject: C API : Problem using multi-statements Hello, I have some problems using multiple queries in a databased driven project, therefore I wrote

RE: C API : Problem using multi-statements

2005-05-06 Thread Reggie Burnett
Jeremiah I don't use the client library in my work but this should work from 4.1 on. -Reggie -Original Message- From: Jeremiah Gowdy [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 11:19 AM To: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: Re: C API : Problem using

RE: C API : Problem using multi-statements

2005-05-06 Thread Javier Diaz
: Re: C API : Problem using multi-statements Answer is simple. Can't do that. - Original Message - From: [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, May 06, 2005 5:40 AM Subject: C API : Problem using multi-statements Hello, I have some problems using multiple queries

Re: C API : Problem using multi-statements

2005-05-06 Thread Jeremiah Gowdy
doh! need another redbull. :) - Original Message - From: Reggie Burnett [EMAIL PROTECTED] To: 'Jeremiah Gowdy' [EMAIL PROTECTED]; [EMAIL PROTECTED]; mysql@lists.mysql.com Sent: Friday, May 06, 2005 9:31 AM Subject: RE: C API : Problem using multi-statements Jeremiah I don't use

MySQL not using optimum disk throughput.

2005-05-06 Thread Kevin Burton
We have a few of DBs which aren't using disk IO to optimum capacity. They're running at a load of 1.5 or so with a high workload of pending queries. When I do iostat I'm not noticing much IO : Device:rrqm/s wrqm/s r/s w/s rsec/s wsec/srkB/swkB/s avgrq-sz avgqu-sz await

RE: MySQL not using optimum disk throughput.

2005-05-06 Thread Dathan Pattishall
- From: Kevin Burton [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 1:58 PM To: mysql@lists.mysql.com Subject: MySQL not using optimum disk throughput. We have a few of DBs which aren't using disk IO to optimum capacity. They're running at a load of 1.5 or so with a high workload

Re: MySQL not using optimum disk throughput.

2005-05-06 Thread Greg Whalin
: MySQL not using optimum disk throughput. We have a few of DBs which aren't using disk IO to optimum capacity. They're running at a load of 1.5 or so with a high workload of pending queries. When I do iostat I'm not noticing much IO : Device:rrqm/s wrqm/s r/s w/s rsec/s wsec/srkB/s

Re: MySQL not using optimum disk throughput.

2005-05-06 Thread Kevin Burton
Greg Whalin wrote: We have seen the exact same thing here. We used the deadline scheduler and saw an immediate improvement. However, we still saw much worse performance on our Opteron's (compared to our older Xeon boxes). We ended up rolling back to Fedora Core 1 2.4.22-1.2199.nptlsmp

Re: MySQL not using optimum disk throughput.

2005-05-06 Thread Greg Whalin
was much faster. Using sysbench: test: sysbench --num-threads=16 --test=fileio --file-total-size=20G --file-test-mode=rndrw run results: 2.6.10-1.14_FC2smp on dual Opteron 248s w/ 4GB RAM default scheduler (anticaptory): Operations performed: 6004 Read, 3996 Write, 12800 Other = 22800 Total Read

Re: MySQL not using optimum disk throughput.

2005-05-06 Thread Kevin Burton
Greg Whalin wrote: Deadline was much faster. Using sysbench: test: sysbench --num-threads=16 --test=fileio --file-total-size=20G --file-test-mode=rndrw run Wow... what version of sysbench are you running? Its giving me strange errors sysbench v0.3.4: multi-threaded system evaluation

Re: MySQL not using optimum disk throughput.

2005-05-06 Thread Kevin Burton
Kevin Burton wrote: Greg Whalin wrote: Deadline was much faster. Using sysbench: test: sysbench --num-threads=16 --test=fileio --file-total-size=20G --file-test-mode=rndrw run So... FYI. I rebooted with elevator=deadline as a kernel param. db2:~# cat /sys/block/sda/queue/scheduler noop

Re: MySQL not using optimum disk throughput.

2005-05-06 Thread Greg Whalin
What drives are you using? For SCSI RAID, you definitly want deadline scheduler. That said, even after the switch to deadline, we saw our Opteron's running way slow (compared to older slower Xeons). Whatever the problem is, we fought it for quite a while (though difficult to test too much w

Re: MySQL not using optimum disk throughput.

2005-05-06 Thread Kevin Burton
Greg Whalin wrote: What drives are you using? For SCSI RAID, you definitly want deadline scheduler. That said, even after the switch to deadline, we saw our Opteron's running way slow (compared to older slower Xeons). Whatever the problem is, we fought it for quite a while (though difficult

Re: MySQL not using optimum disk throughput.

2005-05-06 Thread Dan Nelson
In the last episode (May 06), Kevin Burton said: We have a few of DBs which aren't using disk IO to optimum capacity. They're running at a load of 1.5 or so with a high workload of pending queries. When I do iostat I'm not noticing much IO : Device:rrqm/s wrqm/s r/s w/s rsec/s

Re: MySQL not using optimum disk throughput.

2005-05-06 Thread John David Duncan
And no performance diff. Note that you're benchmarks only show a 20M addition overhead. We're about 60x too slow for these drives so I'm not sure what could be going on here :-/ I know of a site that encountered a similar performance issue: The OS was reading in a lot more data from the disk

radius account management using sql

2005-05-05 Thread Allan P. Magmanlac
Hello, We have radius server and using mysql. I would like to determine who are the users who have not login to our dialup server for over six months and then disable the account In the example below, I'm just using 10 days mysql SELECT distinct username,framedipaddress,acctstarttime

Re: radius account management using sql

2005-05-05 Thread Rhino
:53 PM Subject: radius account management using sql Hello, We have radius server and using mysql. I would like to determine who are the users who have not login to our dialup server for over six months and then disable the account In the example below, I'm just using 10 days mysql

INSERT DATE using USA Date Format

2005-05-04 Thread Michael J. Pawlowsky
I have some data where the date is already in USA format (MM-DD-). I would like to be able to insert this data without having to massage the date in the code. Is there a way to specify the Date Format for an INSERT statement? Something like: INSERT INTO tblMyTable(myDate)

Re: INSERT DATE using USA Date Format

2005-05-04 Thread Dan Nelson
In the last episode (May 04), Michael J. Pawlowsky said: I have some data where the date is already in USA format (MM-DD-). I would like to be able to insert this data without having to massage the date in the code. MySQL seems to think that USA format is MM.DD., which I've never seen

Re: INSERT DATE using USA Date Format SOLUTION

2005-05-04 Thread Michael J. Pawlowsky
Dan Nelson wrote: Is there a way to specify the Date Format for an INSERT statement? Something like: INSERT INTO tblMyTable(myDate) VALUES(DATE_FORMAT('USA', '12-31-2004'); Try the STR_TO_DATE function: SELECT STR_TO_DATE('12-31-2004','%m-%d-%Y'); 2004-12-31 Yup.. that works...

RE: perl/mysql issue...' (Using password: NO)'

2005-05-03 Thread bruce
the livejournal database. when i do the following 'mysql show slave status' i get the error '(Using password: NO)'. i can access the 'mysql' databases/tables ('use mysql') and then run 'show slave status' with no problem... (due to my not having setup any root passwd as of yet... so, how/what do i need

RE: using if in select statement

2005-04-29 Thread mathias fatene
@lists.mysql.com ' Subject: re: using if in select statement -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My boss and I were playing with using select statements, and we can actually execute subqueries as an option if the result is true or false. Is this expected behavior, or is it something that may be fixed

Date validation using mysql

2005-04-29 Thread Anoop kumar V
Is it possible to do a date field validation using an sql query. Its like we have an html field- its a free form text field and the end user should type in a valid date, of course in a predefined format only (MM/dd/yyy). I tried using javascript but either it works on some browsers

Re: Date validation using mysql

2005-04-29 Thread SGreen
Anoop kumar V [EMAIL PROTECTED] wrote on 04/29/2005 11:00:11 AM: Is it possible to do a date field validation using an sql query. Its like we have an html field- its a free form text field and the end user should type in a valid date, of course in a predefined format only (MM/dd/yyy). I

Re: Date validation using mysql

2005-04-29 Thread Anoop kumar V
So is there a function in mysql that I can call to validate dates?? Or do I need to build it? Thanks, Anoop On 4/29/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Anoop kumar V [EMAIL PROTECTED] wrote on 04/29/2005 11:00:11 AM: Is it possible to do a date field validation using an sql

Re: Date validation using mysql

2005-04-29 Thread Chris Ramsay
You could try checkdate()... chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Date validation using mysql

2005-04-29 Thread Brent Baisley
(i.e. PHP, Perl) you are using, to validate the data and format it properly. On Apr 29, 2005, at 11:00 AM, Anoop kumar V wrote: Is it possible to do a date field validation using an sql query. Its like we have an html field- its a free form text field and the end user should type in a valid date

Re: Date validation using mysql

2005-04-29 Thread Chris Ramsay
Anoop snip You could try checkdate()... /snip Apologies for erroneous advice - I am evidently suffering from list psychosis... Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Date validation using mysql

2005-04-29 Thread Anoop kumar V
No problem - I followed up and found out that this function is not available. THought probably you were referring to a later version of Mysql.. anyways... We use Java - and maybe I could use that - I was just wondering if I could help reinventing something already there. Thanks so much for

Re: Date validation using mysql

2005-04-29 Thread Mikhail Entaltsev
Hi Anoop, In order to validate a date I am using next query: select date_format(date_sub(date_add('yourdate', interval 1 day), interval 1 day),'%Y%m%d') = date_format('yourdate','%Y%m%d'); It will give you 1 if date is valid. Best regards, Mikhail. - Original Message - From: Anoop

Re: Date validation using mysql

2005-04-29 Thread Anoop kumar V
Woww - this is great - I think this is exactly what I wanted!! Thanks a Ton Mikhail. :-) Anoop On 4/29/05, Mikhail Entaltsev [EMAIL PROTECTED] wrote: Hi Anoop, In order to validate a date I am using next query: select date_format(date_sub(date_add('yourdate', interval 1 day

re: using if in select statement

2005-04-28 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My boss and I were playing with using select statements, and we can actually execute subqueries as an option if the result is true or false. Is this expected behavior, or is it something that may be fixed in a revision, before I begin to depend

Re: Using InnoDB on 2 OSes

2005-04-25 Thread Gleb Paharenko
Hello. I don't know if it is a good idea, but at least check that you have the same version of MySQL on Linux. On Windows, lower_case_table_names is set to 1 by default. See: http://dev.mysql.com/doc/mysql/en/moving.html Marcin Lewandowski [EMAIL PROTECTED] wrote: Hi, I've got

Re: Using InnoDB on 2 OSes

2005-04-24 Thread Heikki Tuuri
Marcin, - Original Message - From: Marcin Lewandowski [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Sunday, April 24, 2005 4:36 AM Subject: Using InnoDB on 2 OSes Hi, I've got Win2k on one FAT32 partition, and I use MySQL 4.0.23 there. I've got gentoo linux on second

Using InnoDB on 2 OSes

2005-04-23 Thread Marcin Lewandowski
Hi, I've got Win2k on one FAT32 partition, and I use MySQL 4.0.23 there. I've got gentoo linux on second partition, and I want to use the same databases on linux's MySQL. I've configured linux's mysql to use databases from FAT32 partition, but InnoDB tables don't work. phpmyadmin show them as

Re: Collecting the primary key using MAX during an insert

2005-04-21 Thread Dan Rossi
Thanks for your lengthy responses everyone. I ended up using sequences which are available with PEAR MDB2 and DB, so i get the currentID + 1 while inserting, but as you say another entry could have gone in during the process, but this happens during the insert stage. I might have to revert

Slow query: mysql not using correct indexes?

2005-04-21 Thread Scott Gifford
other performance problems I was having, but seems to have introduced this new one. I'm using Ver 11.16 Distrib 3.23.49, for pc-linux-gnu (i686) on an older copy of RedHat Linux 7.3 (kernel 2.4.25, libc6 2.2.5). I've simplified the problem as much as I can and still reproduce it; the actual tables

Re: Slow query: mysql not using correct indexes?

2005-04-21 Thread Dan Nelson
to join two of the tables. That fixed some other performance problems I was having, but seems to have introduced this new one. I'm using Ver 11.16 Distrib 3.23.49, for pc-linux-gnu (i686) on an older copy of RedHat Linux 7.3 (kernel 2.4.25, libc6 2.2.5). I get the correct EXPLAIN plan

Re: Using libmySQL with C/C++

2005-04-20 Thread Philippe Poelvoorde
Vicente wrote: Hello, Yesterday I asked for some help to create a program in C++ integrated with MySQL. Now I have installed MySQL 4.1.11 and I suppose I will need to include mysql.h in my code. But this header use 'libmysql.dll', where I have to define the path in Visual C++? Or where I have to

Collecting the primary key using MAX during an insert

2005-04-20 Thread Dan Rossi
Hi there, I was wondering how its possible to get the MAX of a primary key of a table during an insert. I basically want to create a ticket number, but use the primary key as part of the ticket number ie FAULT-001 or FAULT-0002 . I tried during a sub query on an insert but obviouslly

Re: Collecting the primary key using MAX during an insert

2005-04-20 Thread SGreen
Dan Rossi [EMAIL PROTECTED] wrote on 04/20/2005 12:55:45 AM: Hi there, I was wondering how its possible to get the MAX of a primary key of a table during an insert. I basically want to create a ticket number, but use the primary key as part of the ticket number ie FAULT-001 or

Re: Collecting the primary key using MAX during an insert

2005-04-20 Thread Michael Stassen
but obviouslly not working :| Let me know. Well, you can get the maximum id using the MAX() function, SELECT MAX(id) FROM yourtable; but you really don't want to do that, as it's not safe. There's no guarantee the max id is the row you just inserted, since someone else may have also inserted

Re: Collecting the primary key using MAX during an insert

2005-04-20 Thread Michael Stassen
Michael Stassen wrote: (correcting myself) snip I'm guessing that the prefix ('FAULT' in this case) varies according to the kind of incident, so you want to include it in your table. The best way to do that is to use a separate column (perhaps an ENUM column with the possible values). For

Re: Collecting the primary key using MAX during an insert

2005-04-20 Thread Harald Fuchs
this trick does what Dan wanted, I would not recommend using it. First of all, it's extremely unportable - even within MySQL (it works only with the MyISAM backend). Secondly, it's the same kind of mistake you do when you insist to assign consecutive numbers to your rows. This just won't work

Re: Access denied for user: 'apache@localhost' (Using password: NO)

2005-04-19 Thread Jorge Cambra Aused
message would be the one that I'm getting? Thanx in advance, Jorge From: Gleb Paharenko [EMAIL PROTECTED] To: mysql@lists.mysql.com Subject: Re: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) Date: Mon, 18 Apr 2005 18:38:54 +0300 Hello. It is strange that refusing message says

Using libmySQL with C/C++

2005-04-19 Thread Vicente
Hello, Yesterday I asked for some help to create a program in C++ integrated with MySQL. Now I have installed MySQL 4.1.11 and I suppose I will need to include mysql.h in my code. But this header use 'libmysql.dll', where I have to define the path in Visual C++? Or where I have to copy this

Re: Access denied for user: 'apache@localhost' (Using password: NO)

2005-04-19 Thread Gleb Paharenko
Hello. Could be that the connect command fails, then I start trying and trying, and then the server blocks because it receives too many connections? Then the error message would be the one that I'm getting? I also thought about this and therefore I gave you that advice. What is

Access denied for user: 'apache@localhost' (Using password: NO)

2005-04-18 Thread Jorge Cambra Aused
I have a web application running with Apache with PHP 4.1.2 (revision 7.2.6) and MySQL 3.23.58. The access from the PHP code to the MySQL server using the IP of the machine with MySQL, an username and a password, and it works fine. But sometimes we get the MySQL error: Access denied

Re: Access denied for user: 'apache@localhost' (Using password: NO)

2005-04-18 Thread Gleb Paharenko
Hello. It is strange that refusing message says you're not using passwords. Does the problem disappear after the FLUSH HOSTS statement, instead of restarting MySQL server? Jorge Cambra Aused [EMAIL PROTECTED] wrote: I have a web application running with Apache with PHP 4.1.2

Re: HELP WITH A DATE QUERY USING 4.0.17

2005-04-18 Thread John Thorpe
I'm not sure if there is a built-in, but what I usually do for similar things is to use general purpose table to force iteration. E.g. create a table called ITERATE with one column, x, and populate with values 0,1,2,3,4,... -- in your case up to 10 -- and index the column. Then it's easy - I only

using MyAdmin to build the MySql-Having trouble setting auto-increment for primary key

2005-04-14 Thread Dana Terrell
I am new to MySql and I am having troubles getting the primary keys to do what I want. Here is the situation. I am building a database where there are 2 types of users that can access and change information. Because each type of user will be accessing a different part of the database, I

Re: using MyAdmin to build the MySql-Having trouble setting auto-increment for primary key

2005-04-14 Thread gerald_clark
Dana Terrell wrote: I am new to MySql and I am having troubles getting the primary keys to do what I want. Here is the situation. I am building a database where there are 2 types of users that can access and change information. Because each type of user will be accessing a different part of the

Re: Newbie: Help with Match without using a subQuery

2005-04-14 Thread Graham Anderson
)], then the results get a bit screwed up :( If the first match statement finds something, then the query works fine What would be a better way to structure this...without using a subquery as I am on MYSQL 3.23 SELECT media.id, media.product AS product, media.name AS name, Concat_WS( ' ', artist.fname

Re: Newbie: Help with Match without using a subQuery

2005-04-14 Thread SGreen
works] If 'chris' does not exist in the first MATCH statement [AND MATCH (media.name, media.product)], then the results get a bit screwed up :( If the first match statement finds something, then the query works fine What would be a better way to structure this...without using

Newbie: Help with Match without using a subQuery

2005-04-13 Thread Graham Anderson
, then the query works fine What would be a better way to structure this...without using a subquery as I am on MYSQL 3.23 SELECT media.id, media.product AS product, media.name AS name, Concat_WS( ' ', artist.fname, artist.lname ) AS artist, mediaType.id AS mediatype, mediaType.name, media.product

Re: Newbie: Help with Match without using a subQuery

2005-04-13 Thread SGreen
screwed up :( If the first match statement finds something, then the query works fine What would be a better way to structure this...without using a subquery as I am on MYSQL 3.23 SELECT media.id, media.product AS product, media.name AS name, Concat_WS( ' ', artist.fname

HELP WITH A DATE QUERY USING 4.0.17

2005-04-08 Thread shaun thornburgh
Hi, I have a table called Bookings which holds start times and end times for appointments, these are held in Booking_Start_Date and Booking_End_Date. I have a page on my site that runs a query to produce a grid to show availiability per day for the next ten days for each user of the system.

TIME Difference Using 4.0.17

2005-04-07 Thread shaun thornburgh
Hi, I have a DATETIME COLUMN in my table and i need to be able to perform an update on all colmns that are 48 hours old as specified in that column. As I am using 4.0.17 I am unable to use the TIME() functions, is there another way to do this? Thanks for your help -- MySQL General Mailing

Re: TIME Difference Using 4.0.17

2005-04-07 Thread Philippe Poelvoorde
shaun thornburgh wrote: Hi, I have a DATETIME COLUMN in my table and i need to be able to perform an update on all colmns that are 48 hours old as specified in that column. As I am using 4.0.17 I am unable to use the TIME() functions, is there another way to do this? Thanks for your help try

Re: TIME Difference Using 4.0.17

2005-04-07 Thread Jigal van Hemert
From: shaun thornburgh I have a DATETIME COLUMN in my table and i need to be able to perform an update on all colmns that are 48 hours old as specified in that column. As I am using 4.0.17 I am unable to use the TIME() functions, is there another way to do this? I tend to use constructions

re: any performance increase from using prepared statements

2005-04-06 Thread James Black
would be best used? It seems that it may be an improvement if I am in a tight loop, using the same connection, but may not be as good as dynamically generated queries when using different database connections. Is there any good resources to explain when it is best to use a prepared statement

RE: any performance increase from using prepared statements

2005-04-06 Thread Kevin Cowley
(swithcboard) Tel: 0118 902 9099 (direct) Web: www.alchemetrics.co.uk Email: [EMAIL PROTECTED] -Original Message- From: James Black [mailto:[EMAIL PROTECTED] Sent: 06 April 2005 16:06 To: 'mysql@lists.mysql.com ' Subject: re: any performance increase from using prepared statements

Re: access-trouble using root

2005-04-05 Thread X y
, by typing: shell mysql -u root -p (then entering my password in the dialogue) - and I get the following error-message; ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES Any remedy for this? Thanks. On Mar 29, 2005 10:48 AM, Gleb Paharenko [EMAIL PROTECTED] wrote: Hello

Re: access-trouble using root

2005-04-05 Thread X y
/resetting-permissions.html I should now be able to login using my_new_password*, but this doesn't happen. What is the next step? Thank you. N.P. On Apr 5, 2005 6:11 PM, X y [EMAIL PROTECTED] wrote: I do the following; 1. I kill the mysqld-process on the server. 2. I start

Re: access-trouble using root

2005-04-05 Thread SGreen
Could it be that you are using a pre-4.1 client with a post-4.1 server? Do exactly what you did before except try this: UPDATE mysql.user SET Password=OLD_PASSWORD('my_new_password') WHERE User='root' You will need to FLUSH PRIVILEGES again. If this doesn't work at least we have eliminated

Re: access-trouble using root

2005-04-05 Thread X y
On Apr 5, 2005 9:06 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Could it be that you are using a pre-4.1 client with a post-4.1 server? Do exactly what you did before except try this: UPDATE mysql.user SET Password=OLD_PASSWORD('my_new_password') WHERE User='root' Did the above, put

Re: access-trouble using root

2005-04-05 Thread SGreen
X y [EMAIL PROTECTED] wrote on 04/05/2005 03:51:02 PM: On Apr 5, 2005 9:06 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Could it be that you are using a pre-4.1 client with a post-4.1 server? Do exactly what you did before except try this: UPDATE mysql.user SET Password

Re: access-trouble using root

2005-04-05 Thread X y
On Apr 5, 2005 10:49 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: X y [EMAIL PROTECTED] wrote on 04/05/2005 03:51:02 PM: On Apr 5, 2005 9:06 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Could it be that you are using a pre-4.1 client with a post-4.1 server? Do exactly

Re: access-trouble using root

2005-04-05 Thread X y
I wrote; mysql UPDATE mysql.user SET Password=OLD_PASSWORD('the_new_password') WHERE User='root'; mysql FLUSH PRIVILEGES; mysql \quit Then; shell mysql -u root -p Enter password: the_new_password ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) Is this 'cause I

subqueries *not* using indexes for IN clause

2005-04-04 Thread Kevin A. Burton
Extra: 2 rows in set (0.00 sec) Which is *great*. The join is using both of the PRIMARY indexes on the columns and only references one row. Can't get any better than that! Now lets rewrite the SELECT to use a subquery: mysql EXPLAIN SELECT * FROM FEED WHERE ID IN (SELECT ID

Re: subqueries *not* using indexes for IN clause

2005-04-04 Thread Greg Whalin
We have noticed this as well and it is really pretty shoddy. It seems that when using IN( SELECT ), they treat it as ANY() which does a full table scan. Only way we have found to get fast performance out of subqueries is to use the derived table format and join with the derived table

Re: subqueries *not* using indexes for IN clause

2005-04-04 Thread Kevin A. Burton
Greg Whalin wrote: We have noticed this as well and it is really pretty shoddy. It seems that when using IN( SELECT ), they treat it as ANY() which does a full table scan. Only way we have found to get fast performance out of subqueries is to use the derived table format and join

re: stored procedure slower than not using stored procedure?

2005-04-01 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am curious if this should be the norm, that the stored procedure took 879 ms when I called it 9 times, with slightly different values, and the non-stored procedure test took 512ms with also slightly different values. I am using jdk1.5 and mysql

<    5   6   7   8   9   10   11   12   13   14   >