How to group records by using regular expression?

2005-04-01 Thread ON.KG
Hi Everybody I need to group records by regular expression Example: Table has column - names (just example) records are: idnames time 1 John, Max 12:15 2 Max, Jeff 15:55 3 Ken 20:45 I need to get grouped records by name Max in column names SELECT

RE: How to group records by using regular expression?

2005-04-01 Thread Tom Crimmins
On Saturday, April 02, 2005 01:51, ON.KG wrote: Hi Everybody I need to group records by regular expression Example: Table has column - names (just example) records are: idnames time 1 John, Max 12:15 2 Max, Jeff 15:55 3 Ken 20:45 I

Re[2]: How to group records by using regular expression?

2005-04-01 Thread ON.KG
Hi Everybody Thank you, Tom! I really trying to group the names But I think I found another way - I made PHP-script which groups results from database after selection And I suspect it will be a little complicated for MySQL to group all this data, 'cause variants in reg.exp. pattern is too large

Re: access-trouble using root

2005-03-29 Thread Gleb Paharenko
Hello. Add '[EMAIL PROTECTED]' account. I did this; 050328 16:20:57 7 Query GRANT ALL PRIVILEGES ON *.* TO root@'%' GRANT ALL PRIVILEGES ON *.* TO root@'%' Yet still I get 050328 16:21:08 8 Connect Access denied for user: '[EMAIL PROTECTED]' (Using

Re: using one query to save data in 4 tables

2005-03-28 Thread Gabriel PREDA
www.lgassociations.info - Original Message - From: James Black [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Saturday, March 26, 2005 12:14 AM Subject: re: using one query to save data in 4 tables -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am curious if this would be possible, and which

Re: access-trouble using root

2005-03-28 Thread Gleb Paharenko
mysql.user table. See: http://dev.mysql.com/doc/mysql/en/privilege-system.html http://dev.mysql.com/doc/mysql/en/query-log.html I can't login to mysql neither via the shell as root using mysql -u root -p (without the -p it works, but then I don't seem to be able to do anything), neither can I

access-trouble using root

2005-03-27 Thread X y
='root'; mysql FLUSH PRIVILEGES; Replace ``newpwd'' with the actual root password that you want to use. 4. You should be able to connect using the new password. I got the following result; mysql UPDATE mysql.user SET Password=PASSWORD('my_password') WHERE User='root'; Query OK, 0 rows affected (0.00

Re: using between

2005-03-26 Thread Jigal van Hemert
the real statement would be: Select countryOfOrigin From IPRangeTable where targetIP between FromIP and ToIP What about creating an index on both FromIP and ToIP and using a query like: SELECT `countryOfOrigin` FROM `IPRangeTable` WHERE `FromIp` = targetIP AND `ToIP` = targetIP; This way MySQL can

Re: using one query to save data in 4 tables

2005-03-26 Thread Jigal van Hemert
From: James Black Basically, I want to store a user in one table, then get the id for the user I just saved, and store three more rows, each in a different database, using the user's id in the insert statements. I don't think it can be done with a single statement, but you actually don't need

using between

2005-03-25 Thread Rob Brooks
Hello Is there a way when searching for a range of values for a particular field that mysql would not have to look at the entire table ... I'm guessing with some type of composite key or something? ... e.g. SELECT aField FROM aDatabase WHERE aVariable BETWEEN field1 AND field2; Field1 and

Re: using between

2005-03-25 Thread mos
using. Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: using between

2005-03-25 Thread Rob Brooks
Subject: Re: using between At 01:48 PM 3/25/2005, you wrote: Hello Is there a way when searching for a range of values for a particular field that mysql would not have to look at the entire table ... I'm guessing with some type of composite key or something? ... e.g. SELECT aField FROM aDatabase WHERE

re: using one query to save data in 4 tables

2005-03-25 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am curious if this would be possible, and which version of mysql would be needed. Basically, I want to store a user in one table, then get the id for the user I just saved, and store three more rows, each in a different database, using the user's

RE: using between

2005-03-25 Thread Matt Babineau
, 2005 1:05 PM To: 'mos'; 'MySQL list' Subject: RE: using between Well, we have this db with various ip address ranges and the country of origin associated with each ... the format is: countryOfOrigin FromIP ToIP --- -- US

Re: Using PHP to select MySQL record

2005-03-24 Thread Ludwig Pummer
if this is simple, but I'm a fairly new user and it's got me stumped. Using PHP and MySql; I want to look up a specific record from a table of people by using a select query to populate a PHP select /select statement. I can do it with one field, but I need to do it with more than one field since I

RE: updating date fields using sql

2005-03-24 Thread J.R. Bullington
fields using sql Hi, Dont know whats happening here i'm using the following SQL update policies set renewdate = '21/02/2006' where polnumber = 'WRIM01002'; but, when i update the databse, the date sets to the year 2021 ? i've prob done something daft.. please help if you can... MArk

Using PHP to select MySQL record

2005-03-23 Thread Martin Toombs
Sorry if this is simple, but I'm a fairly new user and it's got me stumped. Using PHP and MySql; I want to look up a specific record from a table of people by using a select query to populate a PHP select /select statement. I can do it with one field, but I need to do it with more than one

RE: Erroneus column using MAX() and GROUP BY

2005-03-18 Thread Elton Clark
You could probably use a subquerry to backtrack the clienthistory_id. SELECT v.clienthistory_id, (SELECT MAX(historyvlan_time), historyvlan_vlan FROM pe_historyvlan as v join pe_clienthistory using (clienthistory_id

copying of information into a table from another with conditions (using where)

2005-03-17 Thread Mahmoud Badreddine
Hello, I imported tow tables from an Access database to MySql. Call them table1 and table2. Both tables came with unique identifiers (ID1 for table1 and ID2 for table2)which were generated automatically as a regular integer index(0,1,2...N-1) for an N set of data. I would like to get rid this

Re: copying of information into a table from another with conditions (using where)

2005-03-17 Thread SGreen
Mahmoud Badreddine [EMAIL PROTECTED] wrote on 03/17/2005 03:16:47 PM: Hello, I imported tow tables from an Access database to MySql. Call them table1 and table2. Both tables came with unique identifiers (ID1 for table1 and ID2 for table2)which were generated automatically as a regular

Bug? Date insert comes out zero on Solaris using Python MySQLdb?

2005-03-17 Thread Nick Arnett
were on 4.0.18). I see some changes to datetime handling in the 4.1.x releases, but nothing that seems immediately obvious. I hope to fix this is by re-building MySQLdb based on the 4.1.10 libraries. Any other suggestions? I'm using MySQLdb.times to format the datetimes before inserting. Nick

Erroneus column using MAX() and GROUP BY

2005-03-16 Thread Daevid Vincent
I have this table: mysql select historyvlan_time, historyvlan_vlan, v.clienthistory_id from pe_historyvlan as v join pe_clienthistory using (clienthistory_id) order by historyvlan_vlan, historyvlan_time desc; +--+--+--+ | historyvlan_time

Re: Erroneus column using MAX() and GROUP BY

2005-03-16 Thread Michael Stassen
from pe_historyvlan as v join pe_clienthistory using (clienthistory_id) order by historyvlan_vlan, historyvlan_time desc; +--+--+--+ | historyvlan_time | historyvlan_vlan | clienthistory_id

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

2005-03-04 Thread Gleb Paharenko
Hello. mysqladmin:connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' ... shellsafe_mysqld --user=root --pid-file=/var/db/mysql/mysql.pid --skip-grand-tables [1] 28712 shell Starting

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

2005-03-03 Thread Deniss Hennesy
Hi, I have had to change mysql root passwd My procedure is just below shell mysql -u root -p mysql UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root'; mysql flush privileges; and I checked this password another consol I saw MySQL wasn't accepted new passwd else, it didnt old

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

2005-03-03 Thread Deniss Hennesy
Hi, I have had to change mysql root passwd My procedure is just below shell mysql -u root -p mysql UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root'; mysql flush privileges; and I checked this password another consol I saw MySQL wasn't accepted new passwd else, it

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

2005-03-03 Thread sam wun
Deniss Hennesy wrote: Hi, I have had to change mysql root passwd My procedure is just below shell mysql -u root -p mysql UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root'; mysql flush privileges; YOu may be need to execute command mysqladmin -u root password

how can I do instead of using subselects?

2005-02-28 Thread Joppe A
Hello everyone, I have a problem with a few sql-queries because I have written the questions with subselect statements and then will they not work on older MySQL DB:s. Can any one help me to say haw to solve it without subselect! Today looks the questions like this: SELECT (SELECT

Fwd: how can I do instead of using subselects?

2005-02-28 Thread Joppe A
Please help, this must be easy for experinced MySQL users but for me as a newbie isn't it. I have tried to find the answer on the things below in older MySQL manuals but without any success... I have a problem with a few sql-queries because I have written the questions with subselect

Re: how can I do instead of using subselects?

2005-02-28 Thread Peter Brawley
subs_d rows where new_id matches a row in subs and subs.new_id=1 then perhaps this is what you are looking for... SELECT COUNT(subs.new_id) + COUNT(subs_d.new_id) FROM subs LEFT JOIN subs_d USING(new_id) WHERE subs.new_id=1; SELECT (SELECT count(*) FROM SUBS) - (SELECT count(SUBS.S_ID) FROM SUB

Re: Fwd: how can I do instead of using subselects?

2005-02-28 Thread Peter Brawley
Joppe, Another question is how do I do when I want to compare two tables, normally is it no problem to get a list with rows that exist i both tables, but how do I do if I want to to have the diffrence listed instead, the rows that only appears in one of the tables? SELECT * FROM tblA LEFT JOIN

Using = in WHERE vs HAVING clause

2005-02-22 Thread Rene Churchill
Good evening folks, I'm seeing some odd behavior in MySQL 4.0.21 running on Mac OS X 10.3.7 I'm trying to compare two identical tables and find the rows that are new/modified. I can't use a timestamp column because the new table is constantly regenerated. So I'm using a large WHERE clause

Re: Using = in WHERE vs HAVING clause

2005-02-22 Thread SGreen
table is constantly regenerated. So I'm using a large WHERE clause and the = operator to detect changes. (BTW, it would be very nice if there was a NULL safe not equal operator) I get empty sets returned when I use = in the WHERE clause, which seems wrong to me. However if I switch

Re: Using = in WHERE vs HAVING clause

2005-02-22 Thread SGreen
Rene Churchill [EMAIL PROTECTED] wrote on 02/22/2005 04:23:47 PM: [EMAIL PROTECTED] wrote: Rene Churchill [EMAIL PROTECTED] wrote on 02/22/2005 03:39:05 PM: Hi Shawn, This is what I wound up going with: SELECT b.id, if(a.a = b.a, NULL, b.a), if(a.b

Re: Using = in WHERE vs HAVING clause

2005-02-22 Thread Rene Churchill
[EMAIL PROTECTED] wrote: This is what I wound up going with: SELECT b.id, if(a.a = b.a, NULL, b.a), if(a.b = b.b, NULL, b.b), if(a.c = b.c, NULL, b.c), (NOT (a.a = b.a) AND (a.b = b.b) AND (a.c =

Using = in WHERE vs HAVING clause

2005-02-21 Thread Rene Churchill
Good evening folks, I'm seeing some odd behavior in MySQL 4.0.21 running on Mac OS X 10.3.7 I'm trying to compare two identical tables and find the rows that are new/modified. I can't use a timestamp column because the new table is constantly regenerated. So I'm using a large WHERE clause

Re: Using Different Database Groups On the Same Computer

2005-02-17 Thread Hassan Schroeder
Hal Vaughan wrote: I've tried this by running 2 instances of mysqld, the first with no arguments, and the second like this: mysqld --port=3307 --datadir=/dbtest/mysql I have to run mysqld directly -- not through safe_mysqld (which /etc/init.d/mysql calls). If I run it through safe_mysqld, I

Re: Using Different Database Groups On the Same Computer

2005-02-17 Thread Hal Vaughan
instances of mysqld running at the same time, each using a different port and different data directory. Hal -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code

Re: Using Different Database Groups On the Same Computer

2005-02-17 Thread Hassan Schroeder
to switch data directories because another process started up :-) Sounds like something in the way you're invoking this is causing the first instance to be restarted, and then it's using the second set of parameters. My preference to do this is to create a complete new config file, say /etc/alt.cnf

Re: Using Different Database Groups On the Same Computer

2005-02-17 Thread Kristen G. Thorson
http://dev.mysql.com/doc/mysql/en/multiple-unix-servers.html There may be some helpful notes there. How are you determining which datadir mysqld is using when it's actually running? Are you logging in with mysql or mysqladmin? Make sure that if you are doing so, that you're actually logging

Re: Using Different Database Groups On the Same Computer

2005-02-17 Thread Hal Vaughan
in the way you're invoking this is causing the first instance to be restarted, and then it's using the second set of parameters. I do a ps-ax and get this (only mysqld tasks pasted in): 13391 pts/10 S 0:00 mysqld --port=3307 --datadir=/dbtest/mysql 13401 pts/10 S 0:00 mysqld --port=3307

Re: Using Different Database Groups On the Same Computer

2005-02-17 Thread Hassan Schroeder
Hal Vaughan wrote: mysqld --port=3307 --datadir=/dbtest/mysql mysqld --port=3306 --datadir=/var/lib/mysql mysql --port=3307 mysql --port=3306 When I do this, then do a show databases; in either new instance of mysql (both are open at the same time, in separate consoles), I get the databases in

Re: Using Different Database Groups On the Same Computer

2005-02-17 Thread Hal Vaughan
On Thursday 17 February 2005 11:48 am, Hassan Schroeder wrote: Hal Vaughan wrote: mysqld --port=3307 --datadir=/dbtest/mysql mysqld --port=3306 --datadir=/var/lib/mysql mysql --port=3307 mysql --port=3306 When I do this, then do a show databases; in either new instance of mysql

Using Different Database Groups On the Same Computer

2005-02-16 Thread Hal Vaughan
I'm not quite sure what search terms to use, otherwise I'm sure I could find this on Google. I have a working install of MySQL on an older computer, running the current version of my program. I am about to start developing a newer version of my program on a new computer. I'd like to have

RE: Using Different Database Groups On the Same Computer

2005-02-16 Thread Logan, David (SST - Adelaide)
Hi Hal, Do you mean using the same version but accessing 2 different sets of tables? I'm a little confused as to what your requirements are. You could install both versions and use aliases to ensure that you can access only one instance at a time by the method you described. You would have new

Re: Using Different Database Groups On the Same Computer

2005-02-16 Thread Hal Vaughan
On Wednesday 16 February 2005 09:04 pm, you wrote: Hi Hal, Do you mean using the same version but accessing 2 different sets of tables? I'm a little confused as to what your requirements are. Or databases.  Basically, I want it all on one system, but I don't want the current databases, which

RE: Using Different Database Groups On the Same Computer

2005-02-16 Thread Logan, David (SST - Adelaide)
. MySQL uses port 3306 by default but you can change this via the my.cnf. I also set up a different startup file in the rc3.d directory that starts the second server using different parameters passed via the command line. The docs do quite a good job on describing this. You can then specify

Re: Using Different Database Groups On the Same Computer

2005-02-16 Thread Hal Vaughan
or something) and then set up the my.cnf so that it listens on a different tcp port. MySQL uses port 3306 by default but you can change this via the my.cnf. I also set up a different startup file in the rc3.d directory that starts the second server using different parameters passed via the command

RE: Using Different Database Groups On the Same Computer

2005-02-16 Thread Logan, David (SST - Adelaide)
/en/using-mysql-programs.html before I give you a bum steer 8-) that has all the docs on how to set up the correct option files you will require Regards David Logan Database Administrator HP Managed Services 148 Frome Street, Adelaide 5000 Australia +61 8 8408 4273 - Work +61 417 268 665 - Mobile

Re: Using Different Database Groups On the Same Computer

2005-02-16 Thread Hal Vaughan
of /some/where/else/on/the/disk See chapter 4 of the manual http://dev.mysql.com/doc/mysql/en/using-mysql-programs.html before I give you a bum steer 8-) that has all the docs on how to set up the correct option files you will require Since you gave me this, I was able to find most of what I needed

Re: Using Different Database Groups On the Same Computer

2005-02-16 Thread Hal Vaughan
only one instance at a time, it will exit without running a new instance if it detects one already running. In all test cases, I've always run the plain version first, and the one using the 2nd port and new data dir last.  No matter what I do, it always uses the new data dir, whether I try mysql

LOAD DATA INFILE using 4.0.17

2005-02-15 Thread shaun thornburgh
Hi, I have a table with 26 fields, each row in this table must be unique. I can't define all of the fields to be primary keys as the limit is 16. Therefore before I insert data I have to check that each row is unique. Data is to be inserted into this table from files uploaded to the server -

Re: LOAD DATA INFILE using 4.0.17

2005-02-15 Thread SGreen
shaun thornburgh [EMAIL PROTECTED] wrote on 02/15/2005 04:53:54 PM: Hi, I have a table with 26 fields, each row in this table must be unique. I can't define all of the fields to be primary keys as the limit is 16. Therefore before I insert data I have to check that each row is unique.

Re: LOAD DATA INFILE using 4.0.17

2005-02-15 Thread shaun thornburgh
Hi, Thanks for your reply, but the problem I am facing is that there may be duplicate values in the uploaded file and I dont want these to appear in my table... From: Bastian Balthazar Bux [EMAIL PROTECTED] To: shaun thornburgh [EMAIL PROTECTED] Subject: Re: LOAD DATA INFILE using 4.0.17 Date

Re: LOAD DATA INFILE using 4.0.17

2005-02-15 Thread Robert Dunlop
: LOAD DATA INFILE using 4.0.17 Hi, Thanks for your reply, but the problem I am facing is that there may be duplicate values in the uploaded file and I dont want these to appear in my table... From: Bastian Balthazar Bux [EMAIL PROTECTED] To: shaun thornburgh [EMAIL PROTECTED] Subject: Re

Re: LOAD DATA INFILE using 4.0.17

2005-02-15 Thread Bastian Balthazar Bux
: Bastian Balthazar Bux [EMAIL PROTECTED] To: shaun thornburgh [EMAIL PROTECTED] Subject: Re: LOAD DATA INFILE using 4.0.17 Date: Tue, 15 Feb 2005 23:32:56 +0100 shaun thornburgh ha scritto: Hi, I have a table with 26 fields, each row in this table must be unique. I can't define all

Re: LOAD DATA INFILE using 4.0.17

2005-02-15 Thread shaun thornburgh
No just every row needs to be unique. Sorry for the confusion... From: Robert Dunlop [EMAIL PROTECTED] To: shaun thornburgh [EMAIL PROTECTED],mysql@lists.mysql.com Subject: Re: LOAD DATA INFILE using 4.0.17 Date: Tue, 15 Feb 2005 15:06:19 -0800 So what you meant was every field in each row must

Re: Upgrading from 3.23.57 to 4.1.9 using mysqldump

2005-02-11 Thread Gleb Paharenko
Hello. Try --complete-insert command line option for mysqldump. See: http://dev.mysql.com/doc/mysql/en/mysqldump.html [EMAIL PROTECTED] wrote: Hi, I just tried to upgrade from mysql 3.23.57 (SPARC/Solaris) to 4.1.9 (i386/Linux) using mysqldump but when importing the dump

Upgrading from 3.23.57 to 4.1.9 using mysqldump

2005-02-10 Thread user1dw43a
Hi, I just tried to upgrade from mysql 3.23.57 (SPARC/Solaris) to 4.1.9 (i386/Linux) using mysqldump but when importing the dump on the new machine mysql gives the error: ERROR 1136 (21S01) at line NNN: Column count doesn't match value count at row 1 and in line NNN you find INSERT INTO `db

RE: Upgrading from 3.23.57 to 4.1.9 using mysqldump

2005-02-10 Thread Kevin Cowley
://www.alchemetrics.co.uk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 10 February 2005 12:08 To: mysql@lists.mysql.com Subject: Upgrading from 3.23.57 to 4.1.9 using mysqldump Hi, I just tried to upgrade from mysql 3.23.57 (SPARC/Solaris) to 4.1.9 (i386

RE: Help with a query using multiple LEFT JOINS

2005-02-01 Thread Graham Cossey
with a query using multiple LEFT JOINS If you mean that you want to get a row even if tbl2 does not have a matching row for dcode, then move the conditions into the ON clause. Example based off of what you had: SELECT FROM tbl1 as d LEFT JOIN tbl2 as r ON (d.dcode=r.dcode AND r.mcode='AB

Re: Help with a query using multiple LEFT JOINS

2005-02-01 Thread Harald Fuchs
In article [EMAIL PROTECTED], Graham Cossey [EMAIL PROTECTED] writes: I'm hoping someone can help with a little problem I'm having with a query. In the query below I wish to return as least one row per tbl1, however I am only getting rows where there is at least an entry for tbl2 : SELECT

Help with a query using multiple LEFT JOINS

2005-01-31 Thread Graham Cossey
I'm hoping someone can help with a little problem I'm having with a query. In the query below I wish to return as least one row per tbl1, however I am only getting rows where there is at least an entry for tbl2 : SELECT ... FROM tbl1 as d LEFT JOIN tbl2 as r ON d.dcode=r.dcode LEFT JOIN tbl3 as

RE: Help with a query using multiple LEFT JOINS

2005-01-31 Thread Tom Crimmins
on the behavior you are looking for. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original Message- From: Graham Cossey Sent: Monday, January 31, 2005 5:48 PM To: mysql@lists.mysql.com Subject: Help with a query using multiple LEFT JOINS I'm hoping someone can help with a little

Authenticate MySQL-Users using PAM

2005-01-28 Thread Bernhard Fiser
Im currently setting up a LAMP server which will be accessed by (a lot of) students for various courses. To handle user accounts I use PAM to authenticate ftp-logins against an LDAP server. Additionally, I'm looking for a way to authenticate MySQL users against PAM (or LDAP directly) too, so I

Re: Out of tablespace when using innodb_file_per_table

2005-01-27 Thread Gleb Paharenko
] wrote: Hello, I'm using InnoDB with the innodb_file_per_table option on. But now my .MYD-file has reached the maximum filesize of my filesystem and i have to add a new tablespace. Can someone tell me how? Thanks in advance for your help Carsten -- For technical support

Out of tablespace when using innodb_file_per_table

2005-01-26 Thread Grumm, Carsten
Hello, I'm using InnoDB with the innodb_file_per_table option on. But now my .MYD-file has reached the maximum filesize of my filesystem and i have to add a new tablespace. Can someone tell me how? Thanks in advance for your help Carsten -- MySQL General Mailing List For list archives: http

Re: Out of tablespace when using innodb_file_per_table

2005-01-26 Thread Heikki Tuuri
Carsten, - Original Message - From: Grumm, Carsten [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Wednesday, January 26, 2005 4:22 PM Subject: Out of tablespace when using innodb_file_per_table Hello, I'm using InnoDB with the innodb_file_per_table option on. But now my

Program using MySQL C api crashes

2005-01-25 Thread Eric Lilja
Hello, I'm a newcomer to MySQL and to databases in general. I'm using MySQL 4.1.9 on a x86-system running Windows XP Pro SP2. I am trying to use the MySQL C api and I've made the following test program in C (hope the indentation isn't lost): #include mysql.h #include stdio.h #include stdlib.h

Re: Query cache confused when using different client protocols

2005-01-21 Thread Gleb Paharenko
Hello. Yes. See a long discussion at: http://bugs.mysql.com/bug.php?id=6511 Thomas van Gulick [EMAIL PROTECTED] wrote: Try this: Setup a database server, with MySQL 4.1, with query cache turned on Setup a client machine with MySQL 4.0 Setup a client machine with MySQL 4.1

Using a Load balancer with MySQL 4.1.7 and JDBC 3.1.7 (performance)...

2005-01-21 Thread Kevin A. Burton
I'm playing around with using a load balancer to balance our slaves. What I want to do is put a load balancer in front of our slaves and then reconnect each time via the JDBC driver. This way a slave can fail and I can just take it out of service. It also means that I can keep performance up

Query cache confused when using different client protocols

2005-01-20 Thread Thomas van Gulick
Try this: Setup a database server, with MySQL 4.1, with query cache turned on Setup a client machine with MySQL 4.0 Setup a client machine with MySQL 4.1 (libmysqlclient14) Create very simple table : CREATE TABLE woepwoep (CNT int NOT NULL); Insert single row : INSERT INTO woepwoep SET CNT=10;

SHOW COLUMNS Syntax Using 3.23.54 Please!

2005-01-18 Thread shaun thornburgh
Hi, I am trying to get all field names from my table that begin with letter X or Y, however the following statement and many variations I have tried produce an error: SHOW COLUMNS FROM TABLE LIKE X% OR LIKE Y% Any help here would be much appreciated :) -- MySQL General Mailing List For list

Re: SHOW COLUMNS Syntax Using 3.23.54 Please!

2005-01-18 Thread Roger Baklund
/SHOW_COLUMNS.html You didn't ask, but a shorter way to write this is using the DESCRIBE command, which can be abbreviated to DESC: DESC tbl_name X%; DESC tbl_name Y%; URL: http://dev.mysql.com/doc/mysql/en/DESCRIBE.html -- Roger -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

SHOW COLUMNS Syntax Using 3.23.54

2005-01-17 Thread shaun thornburgh
Hi, I am trying to get all field names from my table that begin with letter X or Y, however the following statement and many variations I have tried produce an error: SHOW COLUMNS FROM TABLE LIKE X% OR LIKE Y% Any help here would be much appreciated :) -- MySQL General Mailing List For list

Re: Getting started (using a mac)

2005-01-14 Thread Peter O'Brien
Hi I'm just getting started with PHP and MySQL. I'm confused about from where I can deliver commands etc. I'm working from a mac OS X, can I do it from the 'Terminal' utility? Or do I need to install something else, like PuTTY? I've a fair idea on how to use PHP but it's combination with MySQL

Re: Getting started (using a mac)

2005-01-14 Thread Scott Franks
Google is your friend...there are TONS of great sites and code snippets out there. I bought several books and found that the web and google always had better info/articles/etc. --s Scott Franks On Jan 14, 2005, at 11:21 AM, Peter O'Brien wrote: Hi I'm just getting started with PHP and MySQL.

Re: Getting started (using a mac)

2005-01-14 Thread Brent Baisley
Yes, you can deliver commands from the terminal, kind of. But you have to be in the mysql command line client program. PHP works through Apache and has commands to access MySQL and many other databases. You need to enable the PHP module in the Apache configuration file. But you should get at

Re: counting records in 2 tables using 1 query

2005-01-14 Thread 2wsxdr5
[EMAIL PROTECTED] wrote: There may be other ways to get at the information you want. What is the purpose of your query? Ok here are the details. I have a wish list/gift registry site (thewishzone.com). I have a table listing all the data on my users. I also have a table listing all the

Re: counting records in 2 tables using 1 query

2005-01-14 Thread SGreen
OK, then you were on the right track with your JOINS because you wanted to know how many of each type of item (gift or event) each user had. Off the top of my head, I think you need to perform an OUTER JOIN (not the implicit INNER JOIN you create by listing table names separated by commas)

counting records in 2 tables using 1 query

2005-01-13 Thread 2wsxdr5
I have these 2 queries. SELECT count(*) gifts FROM gift g WHERE g.this and g.that SELECT count(*) events FROM events e WHERE e.this and e.the other thing is there a way to put these into one query. SELECT count(g.*) gifts, count(e.*) FROM gift g, event e WHERE . . . . so far nothing seems

Re: counting records in 2 tables using 1 query

2005-01-13 Thread Peter Brawley
How about ... select @a:=count(*) from ... where ... union select @b:=count(*) from ... where ... union select @[EMAIL PROTECTED]; PB --- 2wsxdr5 wrote: I have these 2 queries. SELECT count(*) gifts FROM gift g WHERE g.this and g.that SELECT count(*) events FROM events e WHERE e.this and e.the

Re: counting records in 2 tables using 1 query

2005-01-13 Thread SGreen
There may be other ways to get at the information you want. What is the purpose of your query? Shawn Green Database Administrator Unimin Corporation - Spruce Pine 2wsxdr5 [EMAIL PROTECTED] wrote on 01/13/2005 01:57:31 PM: I have these 2 queries. SELECT count(*) gifts FROM gift g

not all rows returned when using order by and null values?

2005-01-04 Thread John McCaskey
avg FROM event_log_5minute_20050105 WHERE monitor_id=479139 AND monitor_server_id=1 AND timestamp = 2005010408 AND timestamp 2005010508) order by avg; Am I missing something and this is expected behavior and not a bug? I'm using 4.0.18, I haven't checked the changelogs yet, maybe its been

Re: not all rows returned when using order by and null values?

2005-01-04 Thread Rhino
- Original Message - From: John McCaskey [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, January 04, 2005 5:22 PM Subject: not all rows returned when using order by and null values? See below: mysql (SELECT avg FROM event_log_5minute_20050104 WHERE monitor_id=479139

Re: not all rows returned when using order by and null values?

2005-01-04 Thread John McCaskey
On Tue, 2005-01-04 at 17:43 -0500, Rhino wrote: - Original Message - From: John McCaskey [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, January 04, 2005 5:22 PM Subject: not all rows returned when using order by and null values? See below: mysql (SELECT avg FROM

Re: not all rows returned when using order by and null values?

2005-01-04 Thread John McCaskey
, 2005 5:22 PM Subject: not all rows returned when using order by and null values? See below: mysql (SELECT avg FROM event_log_5minute_20050104 WHERE monitor_id=479139 AND monitor_server_id=1 AND timestamp = 2005010408 AND timestamp 2005010508 order by avg

Re: not all rows returned when using order by and null values?

2005-01-04 Thread John McCaskey
: John McCaskey [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, January 04, 2005 5:22 PM Subject: not all rows returned when using order by and null values? See below: mysql (SELECT avg FROM event_log_5minute_20050104 WHERE monitor_id=479139 AND monitor_server_id

RE: not all rows returned when using order by and null values?

2005-01-04 Thread John McCaskey
: Re: not all rows returned when using order by and null values? Even more interesting...: mysql (SELECT avg FROM event_log_5minute_20050104 WHERE monitor_id=479139 AND monitor_server_id=1 AND timestamp = 2005010408 AND timestamp 2005010508) order by avg; +-+ | avg

Re: Newbie: Using SELECT to Get Table Status?

2004-12-28 Thread Gleb Paharenko
Hello. You may use count(*) for counting rows. Robinson, Eric [EMAIL PROTECTED] wrote: The mysqlSHOW TABLE STATUS command returns such things as the number or rows and time of the last update.=20 Is it possible to get the same information using a SELECT statement? FYI, I am

RE: Newbie: Using SELECT to Get Table Status?

2004-12-28 Thread Robinson, Eric
I knew about COUNT(*) but thanks. I was mostly looking for a way to get the time stamp of the last update or insert. I did find a way using an ADODB.Command object. I was able to send the command SHOW TABLE STATUS LIKE 'TABLENAME'; The results were returned as a recordset. Have a great day

Newbie: Using SELECT to Get Table Status?

2004-12-27 Thread Robinson, Eric
The mysqlSHOW TABLE STATUS command returns such things as the number or rows and time of the last update. Is it possible to get the same information using a SELECT statement? FYI, I am writing a script to monitor replication status by comparing this information between the master and slave

Re: 4.1.7 has --old-passwords set but mysqladmin client still using new hash

2004-12-21 Thread Gleb Paharenko
Hello. I've reported a bug: http://bugs.mysql.com/7451 Jason Joines [EMAIL PROTECTED] wrote: I've got a 4.1.7 server on Linux and I need to use the old-passwords option. It has taken effect as 'show variables' confirms. Also, if I set a user's password using 'set password

4.1.7 has --old-passwords set but mysqladmin client still using new hash

2004-12-20 Thread Jason Joines
I've got a 4.1.7 server on Linux and I need to use the old-passwords option. It has taken effect as 'show variables' confirms. Also, if I set a user's password using 'set password for user = password('apassword')' it honors the old-passwords option. However, if a user changes

Estimating disk-space usage using LENGTH(BLOB)

2004-12-16 Thread Mike Moran
I'm currently trying to write a short SQL expression that will give me a rough estimate of the disk-space usage of a particular bunch of rows in a table. For table 'example': CREATE TABLE `example` ( `id` int(11) NOT NULL auto_increment, `blah` varchar(255) NOT NULL default '', `blah2`

Re: Using Multiple Selects

2004-12-16 Thread Brent Baisley
also want to display the top 5 products in order of relevance.) At the moment, I am making 12 individual SELECT statements in the code and using the results to allocate a rank to each product found in that SELECT. e.g. the first select would be SELECT * from table where weight 100; and each

Using Multiple Selects

2004-12-15 Thread Shane McDonald
attribute, which is why one select may not give me the results I am after. (I also want to display the top 5 products in order of relevance.) At the moment, I am making 12 individual SELECT statements in the code and using the results to allocate a rank to each product found in that SELECT. e.g

Re: Problem using debug switch with mysqlimport

2004-12-13 Thread Gleb Paharenko
Hello. I've submitted a bug: http://bugs.mysql.com/7137 Sure enough... I just installed the latest 4.1 linux binaries, I didn't realize that the server itself had to be compiled with the debug enabled (although now that I realize that it makes complete sense). It would

Lost connection during query when using SSH tunneling

2004-12-10 Thread Karam Chand
Hello, I have a MySQL database hosted with my ISP. They provide direction as well as thru SSH tunneling. I can very well connect to it diredctly from any app but I prefer to use SSH tunneling. So I use Putty to create the SSH tunneler and then connecting to the local port. Now the problem, is

Re: Lost connection during query when using SSH tunneling

2004-12-10 Thread Rhino
- Original Message - From: Karam Chand [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 10, 2004 1:08 PM Subject: Lost connection during query when using SSH tunneling Hello, I have a MySQL database hosted with my ISP. They provide direction as well as thru SSH

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