Re: *very* strange...

2004-03-19 Thread Nitin Mehta
Hi, - Original Message - From: "Chris Knipe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 20, 2004 12:33 PM Subject: *very* strange... > Lo everyone, > > I'm *baffled* completely I've never seen something like this before. > : I tried this exact query f

Re: *very* strange...

2004-03-19 Thread Andy Bakun
On Sat, 2004-03-20 at 01:03, Chris Knipe wrote: > Lo everyone, > > I'm *baffled* completely I've never seen something like this before. > : I tried this exact query from PHP, Perl, as well as the MySQL > thingy... They ALL give the same result - it must therefore be my table > ...

Re: *very* strange...

2004-03-19 Thread Chris Knipe
> insert into table (username, password) values ('username', 'password') > > Skip out the "username=" and "password=" part. What you are ending up > doing here is that the values portion of the insert statement, these two You may kick my ass... Royally. Sorry, I feel like a phrick to say the le

*very* strange...

2004-03-19 Thread Chris Knipe
Lo everyone, I'm *baffled* completely I've never seen something like this before. : I tried this exact query from PHP, Perl, as well as the MySQL thingy... They ALL give the same result - it must therefore be my table mysql> SELECT VERSION(); ++ | VERSION() | +-

memory usage probs

2004-03-19 Thread Matthew Hodgson
Hi, I've been having problems with segfaults under mod_auth_mysql in Apache 1.3, which I think i've narrowed down to the MYSQL connection structure getting corrupted on my particular mysql installation - specifically manifesting itself with strange values of the free_me field, which results in the

PHP MYSQL DWMX04 can't link tables

2004-03-19 Thread sgannon60
Hello, and I hope to god someone in here can answer my question as I am at my wits end. System, Mysql 4xx, php 4.3x, DWMX 2004, phpMyadmin 2.5, WinXP Pro, IIS Will be uploading to a unix server THE PLAN to register users in a LOGIN table, if successful take them to the login page where they log

Patch for mysqlbinlog

2004-03-19 Thread Sasha Pachev
Hello, everyone: I recently had to recover some deleted data that was important enough to dig through the binlogs for and fish it out. To make my job easier, I fixed up mysqlbinlog to do a couple of extra tricks: * show only entries in a given timestamp range * exclude queries containing a

Re: master cannot find replication slave privilege

2004-03-19 Thread Paul DuBois
At 19:57 -0600 3/19/04, Peter Brawley wrote: On logging in as user repl, current_user()[EMAIL PROTECTED] The user table row for user=repl has host=% as specified. There are no other rows for user=repl. Is the manual incorrect in recommending this? No. But it does mean you have an anonymous-user

InnoDB Hot Backup problems with O_DIRECT (ibbackup)

2004-03-19 Thread queritor
I'm having the following problem while trying to run ibbackup when the database is using innodb_flush_method=O_DIRECT This is on Redhat Enterprise 3.0. As you can see, it's reporting an error code of 0, which supposedly means 'success' Is there a way around this or will I have to use another file

Re: retrieving last record for all distinct users

2004-03-19 Thread Michael Stassen
First, since you group by LOGIN, you don't need DISTINCT. The problem is that GROUP BY is designed for use with aggregate functions, not individual rows. So which values of SESSION_ID, IP, and TIMESTAMP you should get is undefined. The manual gives 3 solutions to this problem:

Re: master cannot find replication slave privilege

2004-03-19 Thread Paul DuBois
At 15:19 -0600 3/19/04, Peter Brawley wrote: How is this possible? On the master (v5.0.0, port 3306), we have +--+ | Grants for [EMAIL PROTECTED]| +--+ | GRANT REPLICATION SLAVE ON *

Re: Spatial data at InnoDB tables

2004-03-19 Thread Paul DuBois
At 15:38 -0300 3/19/04, Alex Martins Daher wrote: According to MySQL Manual: "MySQL 4.1 introduces spatial extensions to allow the generation, storage, and analysis of geographic features. Currently, these features are available for MyISAM tables only." This means that I can not have transaction

retrieving last record for all distinct users

2004-03-19 Thread motorpsychkill
I have a table SESSIONS with the following fields: SESSION_ID LOGIN IP TIMESTAMP I am trying to select the last login record for all distinct users. The closest I can get to is: select distinct LOGIN, TIMESTAMP, IP from SESSIONS group by LOGIN order by TIMES

Re: newbie: increment an existing record

2004-03-19 Thread Brad Eacker
Jim <[EMAIL PROTECTED]> writes: >> It's likely he would prefer to update a particular record via >> >> update t1 set f = f + 1 where id = 1234; >> >> Which will update only the record matching the id of 1234. > >That is indeed what I ended up doing, and it worked. Thanks. Jim, It's good t

RE: AddressBook CMS

2004-03-19 Thread Phil
Yeah, I realize that asking any of you guide me through this kind of project would be asking way too much. That's why I said "point me in the right direction". I'd just like some recommendations as to what is required to setup something like this. The last thing I want is to slave over a setup for

RE: SQL wrapper for MySQL

2004-03-19 Thread Mike Brando
> > Is there a program/project/software suite out there that traps/wraps MS SQL > commands (or database calls/commands/etc) and wraps that into MySQL > commands? I'd like to "trick" a program that requires SQL (MSDE). I'm not > just talking about porting the data, but a run-time solution... I s

Re: AddressBook CMS

2004-03-19 Thread Rhino
Let me ask a few more questions before making any attempt to say anything else. Once I understand your requirements better, I may not be able to say anything useful but hopefully others on this list will jump in and help I'm not clear on whether this is a single one-time only conversion or wh

SQL wrapper for MySQL

2004-03-19 Thread Paul Rigor
Hi, Is there a program/project/software suite out there that traps/wraps MS SQL commands (or database calls/commands/etc) and wraps that into MySQL commands? I'd like to "trick" a program that requires SQL (MSDE). I'm not just talking about porting the data, but a run-time solution... Thanks

Re: Key Buffer Size

2004-03-19 Thread Eric B.
Hi Terence, key_buffer_size is the amount of memory that is used to cache your index tables. If you are using 100% of it most of the time, you may benefit from an increase in it if you can afford to. You can also look at show status and look at key_reads and key_writes to give you an idea of how

master cannot find replication slave privilege

2004-03-19 Thread Peter Brawley
How is this possible? On the master (v5.0.0, port 3306), we have +--+ | Grants for [EMAIL PROTECTED]| +--+ | GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%' | +-

Comparing and writing out BLOBS

2004-03-19 Thread John Ling
I had posted the following code in the plusplus mailing list but it was suggested I post this question in this list instead. I've been writing a test program using the MySQL C API to test the reading and writing of BLOB data in and out of the database. The file I read into the database is a sm

Re: newbie: increment an existing record

2004-03-19 Thread miasmo
Brad That is indeed what I ended up doing, and it worked. Thanks. Jim On Friday, March 19, 2004, at 02:07 PM, [EMAIL PROTECTED] wrote: Is there a mysql command that will increment the value of a field in an existing row? I would think this would be pretty basic, but I can't seem to find anyth

Re: server backups

2004-03-19 Thread Keith Keller
On Fri, Mar 19, 2004 at 11:50:43AM -0500, Charles Hauser wrote: > > I'm interested in writing a cron job to backup mysql that will: > - Backup all the global information first (users and groups, typically) This information is in the mysql database; unlike postgres, there's no concept of ''global

Re: alter table tt union=(t1,t2,t3);

2004-03-19 Thread Egor Egorov
Shane Nelson <[EMAIL PROTECTED]> wrote: > > Any idea what this would do? > > alter table tt union=(t1,t2,t3); With this statement you specify that MERGE table tt will union tables t1, t2, t3 and they will used as one: http://www.mysql.com/doc/en/MERGE.html > > The four tables are all

Re: newbie: increment an existing record

2004-03-19 Thread beacker
>> Is there a mysql command that will increment the value of a field in an >> existing row? I would think this would be pretty basic, but I can't seem >> to find anything in the online documentation. > >update t1 set f = f + 1 Unfortunately that will update all the records in the database.

RE: Guru's advice needed ........[Security: SQL injection]

2004-03-19 Thread Matt Chatterley
This reply has two purposes. Firstly, a small suggestion (modest compared to the others which will follow, no doubt!) - check out mysql_escape_string() - this may be useful to you. Secondly, a further question: In addition to protecting against SQL Injection, has anyone here experimented with de

Spatial data at InnoDB tables

2004-03-19 Thread Alex Martins Daher
According to MySQL Manual: "MySQL 4.1 introduces spatial extensions to allow the generation, storage, and analysis of geographic features. Currently, these features are available for MyISAM tables only." This means that I can not have transactional processing in a table with spatial data, right

JVM unable to access MySQL intermittently?

2004-03-19 Thread Eric B.
Hi, I'm running into a strange problem with my JVM and MySQL. I'm using Macromedia JRun 4 as my JVM and everytime I restart the Jrun service, my application runs smoothly. However, after an indeterminate amount of time (seemingly random - sometimes a couple of hours, sometimes 12-15 hours), my s

alter table tt union=(t1,t2,t3);

2004-03-19 Thread Shane Nelson
Any idea what this would do? alter table tt union=(t1,t2,t3); The four tables are all the same and all contain data. I posted the details (schema, contents) of the tables here: http://nopaste.php.cd/10918 I'm running mysql Ver 11.18 Distrib 3.23.58, Shane -- MySQL General Mailing List For

Re: newbie: increment an existing record

2004-03-19 Thread Sasha Pachev
[EMAIL PROTECTED] wrote: Is there a mysql command that will increment the value of a field in an existing row? I would think this would be pretty basic, but I can't seem to find anything in the online documentation. update t1 set f = f + 1 -- Sasha Pachev Create online surveys at http://www.su

Re: Can't access mysql after kernel upgrade

2004-03-19 Thread Sasha Pachev
James Packham wrote: Hi all. I've just upgraded the kernel on my server from v. 2.4.21 to 2.4.25 (The original had some problems), but now I can't access my database :( If I revert back to the old kernel then MySQL works fine again. Here's some errors and stuff: # /etc/init.d/mysqld status mysq

RE: AddressBook CMS

2004-03-19 Thread Erich Beyrent
> Hi Everyone, > > Fisrtoff, I know nothing about databases and even less about web design. > What I do know is that I want to move my Outlook contacts (~10,000) to a > real database :) > I've looked at FileMaker Pro and MyGroupWare and the likes but I just want > something simple where I can exp

Re: just the list please!

2004-03-19 Thread Sasha Pachev
Michael T. Babcock wrote: Daniel Kasak wrote: When someone has a MySQL problem, it is often urgent. While most of my posts to the list seem to appear withing a few minutes, I can remember many occasions when they took more than a few hours. Its also not that difficult to notice duplicates; onl

server backups

2004-03-19 Thread Charles Hauser
All, I'm new to mysql. I'm interested in writing a cron job to backup mysql that will: - Backup all the global information first (users and groups, typically) - Backup each database independently (not dumpall) For postgres I can dump: - globals pg_dumpall -U $PG_ADMIN -g > $PG_BACK

newbie: increment an existing record

2004-03-19 Thread miasmo
Is there a mysql command that will increment the value of a field in an existing row? I would think this would be pretty basic, but I can't seem to find anything in the online documentation. Thanks, Jim -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: problems compiling a mysql tool

2004-03-19 Thread Sasha Pachev
Jason Unrein wrote: Before I start, this is a compile problem (or so I think) and from what little I read in this forum, it looks ok to post. If not and you know the proper place to post, please let me know. Now for the good stuff I'm attempting to write a simple tool in C that needs to be comp

Can't access mysql after kernel upgrade

2004-03-19 Thread James Packham
Hi all. I've just upgraded the kernel on my server from v. 2.4.21 to 2.4.25 (The original had some problems), but now I can't access my database :( If I revert back to the old kernel then MySQL works fine again. Here's some errors and stuff: # /etc/init.d/mysqld status mysqld (pid 1153 1124) is

Re: Problems with 4.0.18 and mysqldump

2004-03-19 Thread Sasha Pachev
Jochen Kaechelin wrote: /usr/bin/mysqldump: Got error: 2003: Can't connect to MySQL server on '212.87.142.236' (111) when trying to connect Permissions are ok and I can modify the complete db with my php scripts. where's the error? Check - that MySQL server is running - that you use correct TCP/IP

Re: --replicate-do-table usage example

2004-03-19 Thread Sasha Pachev
Andrew Pasetti wrote: I'm a bit new to mysql replication. Can someone please explain how to implement the --replicate-do-table start up option? Replication is up and running, but I would like to limit the replication to just two specific tables in one database only. Using mysql v4.0.18 Linux/x86 Y

AddressBook CMS

2004-03-19 Thread Philippe LeCavalier
Hi Everyone, Fisrtoff, I know nothing about databases and even less about web design. What I do know is that I want to move my Outlook contacts (~10,000) to a real database :) I've looked at FileMaker Pro and MyGroupWare and the likes but I just want something simple where I can export my contact

RE: Going from 3.23 to 4 - sql statement errors

2004-03-19 Thread Mike R
Thanks for responding! :) "UPDATE sites SET start_date = '$MySQLDate', domain = '$host_edit', host_plan = '$host_plan_edit', ssl = '$ssl_edit', fp_ext = '$fp_ext_edit', username = '$username_edit', password = '$password_edit', fp_password = '$fp_password_edit', cust_comments = '$cust_comments_ed

Key Buffer Size

2004-03-19 Thread Vicky
Hi, huge-my.cnf specifies that total memory usage be less than 2 G. What is meant by total memory usage ? Is it some of key_buffer + innodb_buffer_pool_size + record_buffer or does the total memory usage not include innodb_bbufer_size. How are these buffers used ? Are they obtained using malloc in

Re: Select Performance

2004-03-19 Thread Michael Stassen
Yes, you need to change your query for optimal speed. Prior to 5.0.0, mysql chooses the best index to use, one per table. Your indexes don't help for this query, because no one index does the job. Why? Because you are selecting on one column OR another column. If you are using at least mysq

Re: How can I upload dumped data

2004-03-19 Thread Andre MATOS
I tried it, but it didn't work. ERROR 1217 at line 3483: Cannot delete or update a parent row: a foreign key constraint fails I am using InnoDB... that's my problem... Thanks. Andre On Fri, 19 Mar 2004, Egor Egorov wrote: > Andre MATOS <[EMAIL PROTECTED]> wrote: > > Hi List, > > > > Once

Re: How can I upload dumped data

2004-03-19 Thread Egor Egorov
Andre MATOS <[EMAIL PROTECTED]> wrote: > Hi List, > > Once I have dumped my database using mysqldump how can I upload the data > again using the mysql command line (MySQL in ansi mode)? > mysql -u user_name -p database_name < dump_file.sql -- For technical support contracts, goto ht

How can I upload dumped data (fwd)

2004-03-19 Thread Andre MATOS
Hi List, Once I have dumped my database using mysqldump how can I upload the data again using the mysql command line (MySQL in ansi mode)? Thanks. -- Andre Matos [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://list

How can I upload dumped data

2004-03-19 Thread Andre MATOS
Hi List, Once I have dumped my database using mysqldump how can I upload the data again using the mysql command line (MySQL in ansi mode)? Thanks. -- Andre Matos [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.

Re: SQL To Change Last Approvers

2004-03-19 Thread RChrismon
>You could use a temporary table for that: >CREATE TEMPORARY TABLE tmp ( > deptID INT NOT NULL, > appSeq INT NOT NULL >) AS >SELECT deptID, max(appSeq) AS appSeq >FROM approvers >GROUP BY deptID; > >UPDATE approvers, tmp >SET approvers.appName = 'Sting Ray' >WHERE approvers.appName = 'Joe Bass'

Re: Innodb logfiles timestamp question

2004-03-19 Thread John Thorpe
Yes that makes sense, thanks Heikki. I monitored the ib_logfiles some more and see the cycling between pairs logfile0+logfile1 and logfile0+logfile2. Heikki Tuuri wrote: John, - Original Message - From: "John Thorpe" <[EMAIL PROTECTED]> I am running 4.0.4 using innodb tables on a linux bo

RE: Load data + odbc ?

2004-03-19 Thread Stan Sebastian
I'm soryy for the delay, but i've tried to resolve this on my own. Not a chance. > h = SqlConnect("transfer") > r=sqlexec(h,vQuery) > if r<0 > ? aError( laErrors ) > _cliptext = laErrors[1,2] > endif > > Paste the result here. The error i get on the BoxB, is OF COURSE!! : "Connectivity error

Re: install mysql & create databases

2004-03-19 Thread Victoria Reznichenko
zeineb sellami <[EMAIL PROTECTED]> wrote: > > we are faced to a problem where creating databases > the installation is succeded but we can't create the databases correctly > the instruction ./scripts/mysql_install_db shows > prepare installing database inspite of creating db table > > what is the

Re: Going from 3.23 to 4 - sql statement errors

2004-03-19 Thread Victoria Reznichenko
"Mike R" <[EMAIL PROTECTED]> wrote: > > Sorry if I posted this twice - I had some email issues yesterday, and I > didn't know if this made it to the list: > > > I am using php with mysql, and after moving my tables to a new server, I am > suddenly getting this error: > > Query failed: You have

Re: Select Performance

2004-03-19 Thread Jigal van Hemert
> Thanks, but this is not what we expected. This means > to change the SQL command in the application. Our > understanding from the manual and other relational DBs > is that, it's suffice for existence of an index on the > field in the criteria (where clause) to run at optimal > speed. You'll pr

install issues

2004-03-19 Thread Jonas Lindén
Hello people, I made a mistake and installed mysql5 under /usr/local :(. Now I want to remove the files installed by "make install" how can I do that? regards /Jonas

Re: Select Performance

2004-03-19 Thread A Z
Thanks, but this is not what we expected. This means to change the SQL command in the application. Our understanding from the manual and other relational DBs is that, it's suffice for existence of an index on the field in the criteria (where clause) to run at optimal speed. regards --- Harald

Select Performance

2004-03-19 Thread A Z
A table (Table1) with the relevant indices (e.g. Field1Idx, Field2Idx) exists. Running a query like: Select * from table1 where Field1Idx Like 'Value%' returns result in expected timing scale, so does the query: Select * from table1 where Field2Idx Like 'Value%' The problem (very slow) occurs wh

RE: Key Buffer Size

2004-03-19 Thread Al Caponi
i did: http://www.mysql.com/doc/en/Server_system_variables.html -Original Message- From: Terence [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 3:11 PM To: [EMAIL PROTECTED] Subject: Key Buffer Size Hi, Can somebody tell me whether this is good or bad: Our mysql server has key_b

Re: writing queries to get distinct results

2004-03-19 Thread Victoria Reznichenko
"Casey Sheridan" <[EMAIL PROTECTED]> wrote: > I have a table that has employee names, pay rates, and unique IDs. I want > to select all of the distinct employee names, and if there are two employees > with the same name, I want to be able to choose only one; the one with the > highest pay rate. I

Key Buffer Size

2004-03-19 Thread Terence
Hi, Can somebody tell me whether this is good or bad: Our mysql server has key_buffer_size = 402,653,184 (without the commas) The MySQL administrator tool indicates a 100% usage most of the time, and 362,324,992 as current usage within 24 hours which builds up very fast. Are there memory leaks fo

Re: Count all rows if limit by?

2004-03-19 Thread Egor Egorov
Victor Sp?ng Arthursson <[EMAIL PROTECTED]> wrote: > Hi all! > > Is there a simple way to get the total number of rows a result _should_ > have had if no where-clause where present? Without doing a second > query? > If you want to get total number of rows in the table (without WHERE and withou

Re: Count all rows if limit by?

2004-03-19 Thread Jigal van Hemert
From: "Victor Spång Arthursson" <[EMAIL PROTECTED]> > Is there a simple way to get the total number of rows a result _should_ > have had if no where-clause where present? Without doing a second > query? Example from http://www.mysql.com/doc/en/Information_functions.html : mysql> SELECT SQL_CALC_F

Re: Guru's advice needed ........[Security: SQL injection]

2004-03-19 Thread Martijn Tonies
Hi Jigal, others, > > Can someone shed some light on how "SQL injection" attack occurs when > > *magic_quotes_gpc *is"ON" and how it prevents when its "OFF". To my > > understanding apostrophise are escaped automatically in POST/GET/COOKIE > > when its ON, so how it tends towards SQL Injection.

Count all rows if limit by?

2004-03-19 Thread Victor Spång Arthursson
Hi all! Is there a simple way to get the total number of rows a result _should_ have had if no where-clause where present? Without doing a second query? Sincerely Victor -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EM

Re: Guru's advice needed ........[Security: SQL injection]

2004-03-19 Thread Jigal van Hemert
From: "Tariq Murtaza" <[EMAIL PROTECTED]> > Can someone shed some light on how "SQL injection" attack occurs when > *magic_quotes_gpc *is"ON" and how it prevents when its "OFF". To my > understanding apostrophise are escaped automatically in POST/GET/COOKIE > when its ON, so how it tends towards

Re: Sum for time

2004-03-19 Thread Nitin Mehta
i dont think its possible. you can do it by using time_to_sec() function of mysql and then sec_to_time after addition Hope that helps Nitin - Original Message - From: "Elly Wisata" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 19, 2004 10:08 AM Subject: Sum for time >