Re: Update Column in table only if variable is Not NULL

2013-10-28 Thread Andy Wallace
nly update the FieldName2 field if the value of MyVariable is NOT NULL ? Thanks Neil -- Andy Wallace iHOUSEweb, Inc. awall...@ihouseweb.com (866) 645-7700 ext 219 -- "Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debugging Monday's code.&quo

Re: Performance hiccoughs..

2013-08-14 Thread Andy Wallace
On 8/14/13 10:46 AM, Manuel Arostegui wrote: 2013/8/14 Andy Wallace mailto:awall...@ihouseweb.com>> Hey all - We have been focusing on performance in our systems a lot lately, and have made some pretty good progress. Upgrading the mySQL engine from 5.1 to 5.5 was eye-o

Performance hiccoughs..

2013-08-14 Thread Andy Wallace
of buffer pool size innodb_log_file_size=100M innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 innodb_lock_wait_timeout=50 innodb=on -- Andy Wallace iHOUSEweb, Inc. awall...@ihouseweb.com (866) 645-7700 ext 219 -- "Sometimes it pays to stay in bed on Monday,

database perfomance worries

2013-07-03 Thread Andy Wallace
`parent_acnt` varchar(20) DEFAULT NULL, `number_of_agentlinks` int(11) DEFAULT NULL, `number_of_emails` int(11) DEFAULT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, <> PRIMARY KEY (`acnt`), KEY `parent_acnt` (`parent_acnt`), KEY `status` (`status`), KEY

Re: database perfomance worries

2013-07-02 Thread Andy Wallace
2/13 3:50 PM, Reindl Harald wrote: Am 02.07.2013 23:28, schrieb Andy Wallace: mysql> update agent set number_of_emails = 5 where acnt = 'AR287416'; Query OK, 1 row affected (36.35 sec) Rows matched: 1 Changed: 1 Warnings: 0 36 seconds to update one table? The primary

Re: NOW() is stuck...

2013-06-28 Thread Andy Wallace
ec) mysql> show global variables like 'timestamp'; +---++ | Variable_name | Value | +---++ | timestamp | 1372404371 | +---++ 1 row in set (0.00 sec) re, wh Am 27.06.2013 20:19, schrieb Andy Wallace: Be

Re: NOW() is stuck...

2013-06-27 Thread Andy Wallace
it N. -- Andy Wallace iHOUSEweb, Inc. awall...@ihouseweb.com (866) 645-7700 ext 219 -- "Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debugging Monday's code." - Christopher Thompson -- MySQL General Mailing List For list

Re: NOW() is stuck...

2013-06-27 Thread Andy Wallace
13 12:22 PM, Claudio Nanni wrote: Hi, On 06/27/2013 08:19 PM, Andy Wallace wrote: Benjamin - Unfortunately: mysql> show global variables like 'timestamp'; +---++ | Variable_name | Value | +---++ | timestam

Re: NOW() is stuck...

2013-06-27 Thread Andy Wallace
de to include NOW() in an existing query, and the value returned to my PHP code is also the "bad" value. Thanks for looking, andy On 6/27/13 11:10 AM, Stillman, Benjamin wrote: It persists across sessions? Does this return anything: show global variables like 'timestamp'; Ho

Re: NOW() is stuck...

2013-06-27 Thread Andy Wallace
eturn anything? On Thu, Jun 27, 2013 at 11:19 AM, Andy Wallace wrote: Benjamin - Unfortunately: mysql> show global variables like 'timestamp'; +---++ | Variable_name | Value | +---++ | timestamp | 1372238834 | +---+-

Re: NOW() is stuck...

2013-06-27 Thread Andy Wallace
| sysdate() | +-+-+ | 2013-06-27 13:21:34 | 2013-06-27 13:21:34 | +-+-+ 1 row in set (0.00 sec) Cliff's notes: set timestamp = 0; On 6/26/13 6:10 PM, "Andy Wallace" wrote: We've been having some issues with one of ou

Re: NOW() is stuck...

2013-06-27 Thread Andy Wallace
here was a miscommunication, and that will have to wait for tonight. Once suggestion I got was to explicitly set the global timezone value, but can't do that because we didn't load the timezone tables. Guess we have to wait for tonight. thanks, guys Andy On 6/26/13 6:34 PM, Eric B

NOW() is stuck...

2013-06-26 Thread Andy Wallace
em time on the machine is correct: $ date Wed Jun 26 15:08:56 PDT 2013 This is MySQL 5.1.46 running on solaris2.10. Any ideas short of restarting the MySQL engine? I'm willing to do that, but would much rather wait and not do it in the middle of the day. Thanks, Andy -- Andy Wallace iHOUSEweb,

Re: Understanding Slow Query Log

2012-09-05 Thread Andy Wallace
Thanks, Rick - definitely something to think about. I've been troubled by the pagination stuff in our code. This looks like something I can definitely use! andy On 9/5/12 2:40 PM, Rick James wrote: Remember where you "left off". Your "Next" button now says something

Re: Understanding Slow Query Log

2012-09-05 Thread Andy Wallace
Ok, this raises a question for me - what's a better way to do pagination? On 9/5/12 2:02 PM, Rick James wrote: * LIMIT 0, 50 -- are you doing "pagination" via OFFSET? Bad idea. -- Andy Wallace iHOUSEweb, Inc. awall...@ihouseweb.com (866) 645-7700 ext 219 -- "Sometime

Re: strange select/join/group by with rollup issue....

2012-02-08 Thread Andy Wallace
-02-08' " and see what you get. HTH, Arthur -- Andy Wallace iHOUSEweb, Inc. awall...@ihouseweb.com (866) 645-7700 ext 219 -- There are two ways to build software: Make it so simple that there are obviously no bugs, or make it so complex that there are no obvious bugs. -- MySQL General M

strange select/join/group by with rollup issue....

2012-02-07 Thread Andy Wallace
f I get rid of the group by (and the count(*)), there are rows with all 7 dates. I have tried changing the "to" date from '2012-02-07' to '2012-02-08', in case this was a "less than" issue, but that doesn't change. Why is the group by dropping the la

Re: why does basic MySQLdump on db table fail with "Permission denied", or else it creates a zero KB file

2011-12-29 Thread Andy Wallace
in my knowledge. .. but I would appreciate any help ;-) [1] http://stackoverflow.com/questions/8663454/why-does-basic-mysqldump-on-db-table-fail-with-permission-denied Thanks -Govinda -- Andy Wallace iHOUSEweb, Inc. awall...@ihouseweb.com (866) 645-7700 ext 219 -- There are two ways to b

Re: Deleting Records in Big tables

2011-11-04 Thread Andy Wallace
to increase the id value: DELETE FROM my_big_table WHERE id> 5000; DELETE FROM my_big_table WHERE id> 4000; etc -- Derek On Nov 4, 2011, at 12:47 PM, Andy Wallace wrote: I've had some luck in the past under similar restrictions deleting in chunks: delete from my_big_table where id&

Re: Deleting Records in Big tables

2011-11-04 Thread Andy Wallace
oo takes time. Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=anan...@gmail.com -- Andy Wallace iHOUSEweb, Inc. awall...@ihouseweb.com (866) 645-7700 ext 219 -- There are two ways to build software:

Re: Help with slow query

2011-03-10 Thread Andy Wallace
ne is varchar, the other int) This last one can be HUGE. I tracked a big performance issue to this exact problem - the columns used in the join had the same name, but different data types. Correcting to be the same type (both ints) made a terrific performance increase. -- Andy Wallace iHOUSEweb,

Re: Question about database value checking

2011-02-04 Thread Andy Wallace
Thanks Peter, exactly what I was hoping for! andy On 2/4/11 3:11 PM, Peter He wrote: Are you using the strict SQL mode? Check your my.cnf file. Peter Date: Fri, 4 Feb 2011 14:08:01 -0800 From: awall...@ihouseweb.com To: mysql@lists.mysql.com Subject: Question about database value checking

Question about database value checking

2011-02-04 Thread Andy Wallace
RSET=utf8 Lets you insert: INSERT INTO tester_table2 (acnt, required) VALUES ('A123456', 'THIS IS NOT REAL'); Though it just puts an empty string into the "required" column. Is there a setting for mysql to return errors in these cases? It seems silly to set up an

Re: Table/select problem...

2011-02-04 Thread Andy Wallace
le). thanks! And thanks Steve, as well. I don't think that the periodic import of events from a file will work for us, we need relatively timely reporting from the table. We don't have a lot of hits for the event reports, but when we do get them, they want the data up-to-date... andy

Table/select problem...

2011-02-04 Thread Andy Wallace
Might the table itself be corrupt in some way? Any thoughts? thanks, andy EXPLAIN SELECT EL.event_log_id, EL.event_time, DATE_FORMAT(EL.event_time, '%c-%d-%Y %H:%i:%s') as 'time_formatted', ET.event_type_id, ET.description, EL.c

Re: MySQL Parallel Inserts

2010-12-16 Thread Andy
Shawn/Krishna, Thank you. I will try this. -Andy On Tue, Dec 14, 2010 at 8:13 AM, Krishna Chandra Prajapati < prajapat...@gmail.com> wrote: > Hi Andy, > > I agree, prefer LOAD DATA INFILE... command for bulk loading. It is 30% > faster than normal inserts. > > Kris

MySQL Parallel Inserts

2010-12-13 Thread Andy
not find any information on doing this. Does MySQL not support parallel reads/writes? Thanks in advance. Andy

Re: question about restoring...

2010-11-12 Thread Andy Wallace
f the INNODB files for these two tables - is there a way to extract the table contents from these files short of a full import? I have to agree, that's quite ambiguous. Andy, is it a copy of the innoDB datafiles, or a database dump that you have ? In the latter case, it's reaso

question about restoring...

2010-11-09 Thread Andy Wallace
, ansdy -- Andy Wallace iHOUSEweb, Inc. awall...@ihouseweb.com (866) 645-7700 ext 219 -- There are two ways to build software: Make it so simple that there are obviously no bugs, or make it so complex that there are no obvious bugs. -- MySQL General Mailing List For list archives: http

Update query problem

2010-09-16 Thread Andy Wallace
M.domain = IF( (!M.domain AND A.domain != ''), A.domain, M.domain) Any thoughts? THanks, andy -- Andy Wallace iHOUSEweb, Inc. awall...@ihouseweb.com (866) 645-7700 ext 219 -- There are two ways to build software: Make it so simple that there are obviously no bugs, or make it so complex

Re: Possible tricks to ALTER on huge tables?

2010-08-06 Thread Andy Wallace
YMMV andu Jigal van Hemert wrote: Daevid Vincent wrote: We currently have some tables that are approaching 1 BILLION rows (real Billion, with nine zeros, not that silly six zero version). Trying to do an "ALTER" on them to add a column can sometimes take hours. -- Andy Wallace i

Re: IS NULL returns Empty set, but I have empty items

2010-07-29 Thread Andy Wallace
blank is not null... I'll bet if you did SELECT url FROM product WHERE url = ''; you'll get a row or three. If the field was NULL, your product_id select would look like: +--+ | url | +--+ |NULL | +--+ andy Norman Khine wrote: Hello, I don't know

Re: MySQL For Huge Collections

2010-06-11 Thread Andy
mmunity, I will need to be able to provide fulltext (or chapter-wise) search also to the users, among other things. Please let me know if you have additional comments. Andy On Thu, Jun 10, 2010 at 9:05 PM, Peter Chacko wrote: > Usually, you better use a NAS for such purpose. Database is des

MySQL For Huge Collections

2010-06-10 Thread Andy
the chapter titled "ABC" from e-book number XYZ (or e-book titled "XYZ")). Can MySQL handle these types of queries well on data of this size? (4) What are the benefits/drawbacks of using MySQL compared to using XML databases? I look forward to help on this topic. Many thanks in advance. Andy

Re: Connecting Remotely to MySQL Server

2010-06-07 Thread Andy
denied for user 'andy'@'frontend.internal' (using password: YES)". Does it have something to do with the fact that 'andy' in the mysql user tables is only authorized to connect from 'localhost'? How do I fix this problem. Thank you very much. Andy On Mo

Re: logging of BAD queries

2010-02-09 Thread andy knasinski
Unfortunately, I'm using a commercial application and trying to debug as to why some data does and does not get updated properly. On Feb 9, 2010, at 2:57 PM, mos wrote: I do something like that in my compiled application. All SQL queries are sent to a single procedures and executed there.

logging of BAD queries

2010-02-09 Thread andy knasinski
query log. Does the general log include invalid SQL? I've also tried to use the driver logging, but on Windows it overwrites with the last SQL command so I cannot get a good capture as requests are sent to the DB. DB is MySQL 5.0.x Thanks andy -- MySQL General Mailing List For list

Re: Join on a where clause.

2009-12-10 Thread Andy Wallace
t.src_ip between mappings.start_ip and mappings.end_ip WHERE event.timestamp BETWEEN '2009-12-06 20:00' and '2009-12-07 20:00:00' GROUP BY event.src_ip ORDER BY count DESC LIMIT 20; That'll give you some more information on what mysql is d

Re: inserting csv - solved, but more to the puzzle

2009-10-16 Thread Andy Wallace
I've run into similar situations w/regard to Mac vs PC CSV files, it usually has to do with the EOL character sequence. Macs use LF (chr(10)), while PCs use CRLF (chr(13)chr(10)). andy Patrice Olivier-Wilson wrote: In case anyone might find this of the least interest, probably not, b

Re: Where the hell did 5.4 come from?

2009-04-30 Thread Andy Shellam
t out without anyone even being aware that it existed! Hell, 6.0 is on its tenth release and it's still in alpha. Like you say, it'd be interesting to see which blackhole 5.2 and 5.3 fell into...! Andy Daevid Vincent wrote: Have I been in a coma or something? WTF happened to 5.

Re: Start MySQL with --intit-file?

2009-04-29 Thread Andy Smith
the last line , thanks Andy. Quoting Jason Todd Slack-Moehrle : Hi, I am trying: [r...@server1 ~]# /etc/init.d/mysqld restart --init-file=cloudsql.sql Stopping MySQL:[ OK ] Starting MySQL:[ OK ] t

Re: Mysql on Ultrasparc T2 and floating point performance

2009-04-23 Thread Andy Smith
some other nice bits like on board Gig Ethernet and support for 2 socket servers, plus any bump in the clock speed over the older boxes obviously. thanks Andy. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Oracle , what else ?

2009-04-21 Thread Andy Shellam
Hi, To see what will happen to MySQL take a look at how Oracle handled InnoDb. How many updates have they released since they purchased it? I really don't know so someone will need to check. Is Oracle is too big to make MySQL updates any kind of priority? It seems that the larger the company

Re: Sun bought by Oracle

2009-04-20 Thread Andy Smith
or non-free solutions etc... However that was from the internet press so its all just rumours and supositions ;) cheers Andy. Quoting Krishna Chandra Prajapati : Whats the future of 'MySQL' under Oracle ? -- MySQL General Mailing List For list archives: http://lists.mysql.co

Sun bought by Oracle

2009-04-20 Thread Andy Shellam
I've just been made aware by a client that Oracle have purchased Sun Microsystems. The article below on Sun's website mentions that Oracle are committed to Linux and "other open platforms" and mentions the fact that Java touches practically every business system around. http://www.sun.com/thi

Re: Need help with mysql prob

2009-04-20 Thread Andy Shellam
Hi Alugo, abdulazeez alugo wrote: Hi Andy, Thank you very much you have been really very helpful. All those mistakes you pointed at in the script about the apostrophe and others, are simple mistakes I just made in the rush of typing the message; and yes $conn is the result from

Re: Need help with mysql prob

2009-04-20 Thread Andy Shellam
Hi, abdulazeez alugo wrote: Date: Sun, 19 Apr 2009 23:19:56 +0100 From: andy-li...@networkmail.eu To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: Need help with mysql prob Hi Alugo, Hi Andy, Thanks for your prompt response. However, since tbl1_id has an

Re: Need help with mysql prob

2009-04-19 Thread Andy Shellam
Hi Alugo, Hi Andy, Thanks for your prompt response. However, since tbl1_id has an auto_increment value in tbl1, mysql is actually generating the values for it automatically. Ah, I see your point. I'm guessing by your code you're using PHP? If so call mysql_insert_id() af

Re: Need help with mysql prob

2009-04-19 Thread Andy Shellam
INSERT'ing a value into tbl2 that doesn't exist in tbl1_id and MySQL will throw an error and the insert will fail. Thanks, Andy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: MySQL runs on 16-cores server

2009-04-11 Thread Andy Smith
single threaded performance I wouldnt expect it to be slower in almost any cases with something like a mutliprocess database system, thanks Andy. Quoting mos : Using more cores with MySQL doesn't mean it will run faster. In fact, it could slow it down. Make sure you have done benchma

Re: db is bring dropped, binlog help

2009-04-09 Thread Andy Shellam
it for it to happen again! I've just had a quick glance in my server's log and it appears that a connection is given an ID (which is where you see which user it was) then that ID is used throughout the log to indicate which queries have been executed from that connection. Hope you g

displaying a specific row within a "group by"

2009-04-09 Thread Andy Sy
Consider the ff. table: ++--+--+ | game | rank | date | ++--+--+ | GTA| 11 | 20081001 | ++--+--+ | SPORE | 1 | 20081103 | ++--+--+ | SPORE | 2 | 20091001 | ++--+--+ | SINSOL |

Re: Data structure for matching for company data

2009-03-31 Thread Andy Shellam
You can use this structure with MyISAM tables. It will work fine except you won't have the advantage of database-level enforcement of foreign key constraints--do it with code. Or use InnoDB tables (enable/load the innobase plugin.) -- MySQL General Mailing List For list archives: http://li

Re: SSL Connections

2009-03-30 Thread Andy Shellam
local one doesn't, that would explain it. What are your MySQL versions on both your server and remote client? What errors do you get on your client? Regards, Andy Stefano Elmopi wrote: Hi, I'm trying to make connections ssl. I followed the MySQL guide and I've configur

Re: Need a Brief Overview - SSL Connections

2009-03-29 Thread Andy Shellam
certificate file.) Hope this helps some! I do agree it wasn't the clearest of things to get my head around. Andy Seth Willits wrote: Howdy, I've read through all of the MySQL docs on SSL and I just need a brief overview of a few things to understand some things that aren'

Re: Multiple batch files

2009-03-19 Thread Andy Shellam
Hi David, Why not use a FOR loop in a batch file? This post seems to be doing the same thing, using MS SQL Server: http://bytes.com/topic/windows/answers/647680-xp-batch-file-loop-help Andy David Scott wrote: Thanks for responding Gary I get: --- Volume in

Re: avoiding use of Nulls

2009-03-13 Thread Andy Wallace
ggghh mich...@j3ksolutions.com wrote: On Fri, 13 Mar 2009, mich...@j3ksolutions.com wrote: Explanation(5): The more you understand how the database is to be used, and the more complexity and thought you put into your database design, the less co

Re: Replica questions

2009-03-12 Thread Andy Smith
BTW there is a list specially dedicated to replication configurations: http://lists.mysql.com/replication -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Replica questions

2009-03-12 Thread Andy Smith
that might be. Post some more info and someone on the list can probably help, thanks Andy. Quoting Bryan Irvine : The information is there and the replica can connect on a reboot but only if that information has not changed correct? e.g. I reboot the slave, and on the master just run "re

Re: Upgrading

2009-03-09 Thread Andy Shellam
py of 5.1 and run it alongside 4.0 (ie on different port numbers) then you can migrate your databases/systems across one-by-one. Andy Matthew Stuart wrote: Hi all, I am on... wait for it... version 4.0.25 and I want to upgrade to MySQL 5.x Is there anything special I should do in order to up

Re: whoa!

2009-03-01 Thread Andy Shellam
t ball game and you're right - mysql_store_result would do nothing for you (PHP wouldn't even recognise it as a function.) If you are using PHP, you'd be better off looking at the PHP manual instead - http://uk3.php.net/mysql. Hope this helps, Andy PJ wrote: Hi Andy, I stil

Re: whoa!

2009-02-28 Thread Andy Shellam
use, although I agree an example of a simple client/query would have been useful. Regards, Andy PJ wrote: What is this supposed to mean from the manual: The use of |mysql_num_rows()| <http://dev.mysql.com/doc/refman/5.0/en/mysql-num-rows.html> depends on whether you use |mysql_store_resul

Re: Best RAID for a DB + LVM?

2009-02-23 Thread Andy Smith
What RAID level to use, whether to use SCSI or SATA etc are all pretty much "how long is a piece of string?" questions. If you have a really high end hardware array RAID 5 may be faster than RAID1+0 is on a cheaper system. Basically RAID 5 = slower SATA = slower RAID 1+0 = faster SCSI = fa

Re: mysql full tutorial download or any book

2009-02-14 Thread Andy Shellam
l.com/docs/refman-5.1-en.pdf Tutorial (English): http://dev.mysql.com/doc/refman/5.1/en/tutorial.html Substitute 5.1 with whatever version you're running. HTH, Andy muzaffar hussain wrote: hi all where can i can download full mysql tutorial . thanks regards muzaffar

Re: Install problem: log file issue

2009-02-12 Thread Andy Smith
It could be that your my.cnf isn't being read (permissions or in the wrong directory), or that you have multiple my.cnf files. Quoting "csego...@gmail.com" : That is intentional. I want to write the log to a non-standard location. --

What happened to the 5.1.31 release announcement?

2009-02-07 Thread Andy Shellam
pha. Did anyone else receive an announcement for the release of 5.1.31? Was it actually made? Thanks, Andy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Instance scale-out

2009-02-05 Thread Andy Smith
l "network interface" hence I think this is badly worded in the text. thanks Andy. This message was sent using IMP, the Internet Messaging Program. -- MySQL General Mailing List For list archives: http://lists.mysql.com

Re: Instance scale-out

2009-02-05 Thread Andy Smith
nless specified as otherwise. Maybe the MySQL community has a differenet opinion :P ;) cheers Andy. This message was sent using IMP, the Internet Messaging Program. -- MySQL General Mailing List For list archives: http://

Re: Algorithm for resolving foreign key dependencies?

2009-02-03 Thread Andy Shellam
FROM Manufacturer... query, MySQL would delete the associated records from all 3 tables automatically. The only time you'd have to manually issue all 3 DELETE statements were if your foreign keys didn't have the ON DELETE CASCADE option set. Andy Philip Pemberton wrote: Hi, First of all,

Re: Mysqld fails to start

2009-01-27 Thread Andy Shellam
lly MySQL.) Make sure this is done, then MySQL will start, then you can run mysql_upgrade. HTH, Andy JD wrote: Hello List, mysqld fails to start, and emits the following error messages in /var/log/mysqld.log 090127 10:00:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/m

Re: high-availability loadbalanced mysql server farm

2009-01-16 Thread Andy Shellam
erver B. This could also help in replication situations - connect an application to the MySQL Proxy which talks to all master and slave servers. If the query is an UPDATE, INSERT or DELETE, direct it at the master only. Andy -- MySQL General Mailing List For list archives: http://lists.mys

frequent issues restoring mysqldump file

2009-01-14 Thread Andy Smith
and many Unixs and open source bits and pieces and Im usually quite good at making them do what I need ;) cheers Andy. This message was sent using IMP, the Internet Messaging Program. -- MySQL General Mailing List For list arch

Re: On fighting with master-slave replication lag

2008-12-25 Thread Andy Shellam
221.130.195.83." is not a valid IP address anyway, but MX records must also be the hostname of an existing A record, not an IP address. Regards, Andy Andy Shellam wrote: > Hi Xu, > > The check_mysql plugin is part of the standard plugins package (see the > downloads page a

Re: On fighting with master-slave replication lag

2008-12-25 Thread Andy Shellam
g you to set a threshold on how long is a warning, and how long is a failure (error.) I would hazard a guess that it uses the output of "show slave status;" to gather its information. Andy xufeng wrote: > Hi All > On > http://www.nagiosexchange.org/cgi-bin/search.cgi?d=1&

Re: On fighting with master-slave replication lag

2008-12-23 Thread Andy Shellam
arger than a given threshold (e.g. 600 seconds.) We had an issue last week where the slave's SQL thread died following a server failure - Nagios caught it and let us know immediately. www.nagios.org. Regards, Andy -- MySQL General Mailing List For list archives: http://lists.mysql.co

Re: Average Rating, like Netflix

2008-12-22 Thread Andy Shellam
SELECT movies.*, average(ratings.rating) AS rating FROM movies LEFT JOIN ratings ON movies.movie_id=ratings.movie_id GROUP BY movies.movie_id ) result Andy Brent Baisley wrote: The ratings field would be NULL. You could also add a count in your query to tell how many ratings there were. If co

Re: How many users access MySQL

2008-12-22 Thread Andy Shellam
log and require highest performance, you should log to files and not to tables." Hopefully this performance difference will be resolved in future releases of 5.1. Andy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: installation nightmare

2008-12-18 Thread Andy Shellam
un mysql_upgrade to correct it, but this requires an up-and-running system in the first place.) Your second issue is that InnoDB does not have permissions to create files in this directory. Check the owner/group MySQL is trying to run as has access to /var/db/mysql. Regards, Andy PJ wrote: Or

Re: need help with query...

2008-12-17 Thread Andy Shellam
Hi, Hi Andy, the reason I can't use this because fields (columns) in select statement (p.first_name, p.last_name,...) are actually dynamically created. In my project different client will select different fields to be shown. 99% will select first_name, and last_name, but some don&#x

Re: need help with query...

2008-12-17 Thread Andy Shellam
Jerry Schwartz wrote: -Original Message- From: Andy Shellam [mailto:andy-li...@networkmail.eu] Sent: Wednesday, December 17, 2008 3:29 PM To: Lamp Lists Cc: mysql@lists.mysql.com Subject: Re: need help with query... Hi Afan Why not prefix your field names with the table name? select

Re: need help with query...

2008-12-17 Thread Andy Shellam
it[1]] = $value; // Now you should be able to access the person's first name using $result['person']['first_name'] } } This code may not be perfect as I've just typed it out from memory so it may take a bit of tweaking. Thanks, Andy Jason Pruim wrote: O

Re: captured percentage values not inserting properly into table

2008-12-06 Thread Andy Shellam
Hello Hagen, Hagen Finley wrote: Should I be using a different datatype for these kind of numerical values? Yes. INT is by definition a whole number (0, 1, 2 etc.) You will want to change the fmarg column to DOUBLE or DECIMAL. Regards, Andy -- MySQL General Mailing List For list

Re: Trying to Create a Trigger

2008-12-05 Thread Andy Shellam
tual table in MSSQL. Going back to the OP's problem - the original issue I believe was he was using "old" instead of "OLD" (case-sensitive) - now that's sorted, MySQL is complaining about a syntax error toward the end of the function declaration. Andy -- My

Re: Trying to Create a Trigger

2008-12-05 Thread Andy Shellam
use near 'end // delimiter' at line 1 Query = end // delimiter I'm guessing it's the first semi-colon in your IF statement. Does this work...? if @counted >= 1 then SET dummy = 'Cannot delete this record' end if; Just a guess! Andy. -- MySQL General Mailing List F

Re: Maintaining sort order with 'GROUP BY' and 'HAVING'

2008-12-04 Thread Andy Shellam
system you could even consider going to 5.1.30. Andy Nishikant Kapoor wrote: Its been a while since I posted this. Would like to check again with the folks on this list if they know why the results of query (b) are all blank on MySQL 5.0.22. It works fine with 5.0.51a. If it is a bug in 5.0.22, c

Re: create single resultset from multiple sets

2008-12-02 Thread Andy Shellam
Hi Bryan, My gut reaction would be to use a temporary table - create the temporary table at the start of proc1, run multiple inserts into the temp table for the results of proc2, then just before proc1 ends, select from the temp table and drop it. Andy Cantwell, Bryan wrote: I have a

Re: Result ordering

2008-11-30 Thread Andy Shellam
T 5; Regards, Andy Morten wrote: Hi, I'm retrieving the name of some records where either one of two criteria are satisfied: SELECT name FROM foo WHERE bar = 34 OR baz > 100 ORDER BY baz DESC LIMIT 5; I would like to sort that result set, such that the records matching bar = 34 o

Re: Maintaining sort order with 'GROUP BY' and 'HAVING'

2008-11-27 Thread Andy Shellam
possibly even the newly-released 5.1.30, depending on how many applications you have that are dependent on that box. Regards, Andy Nishikant Kapoor wrote: CREATE TABLE t ( id TINYINT, title VARCHAR(10) ); INSERT INTO t (id, title) VALUES (1, 'aaa'), (2, 'bbb'), (3, 'ccc

Re: Logging all Access

2008-11-27 Thread Andy Shellam
ct, and it logs each SQL statement received from clients ..." Regards, Andy Darvin Denmian wrote: I wonder if there is the possibility of registering the users' access to the server Mysql. Something similar to the command "last" of Unix-like systems. Thanks. -- MySQL

Re: linq with mysql

2008-11-27 Thread Andy Shellam
brackets are the issue here. A colleague of mine has a similar issue with the ASP.NET designer - when creating SQL statements in ASP.NET's front-end tools (e.g. data-grids) it automatically encloses the table names in [...] instead of `...` Whether the MySQL .NET Connector people have alre

Re: replacing a timestamped row

2008-11-25 Thread Andy Shellam
e all existing records, make server_id your primary key (and not null-able) and retry your script. Regards, Andy David Halik wrote: Hi everyone, I'm fairly new to MySQL and I have a procedure that writes some status info to a table. The problem is, I just want the values and row to be

Re: [Fwd: Re: Is it a bug or my mistake in server configuration?]

2008-11-10 Thread Andy Shellam
This mailing list has a stupid configuration. Pressing the answer button, the message goes to the sender not to the list :-( Hint - use Reply to All - it's not specific to this mailing list. :-) Regards, Andy -- MySQL General Mailing List For list archives: http://lists.mysql.com/

RE: mysql dump problems, no data dumped

2008-11-04 Thread Andy Smith
This is a known bug, Ive installed MySQL 4 client binaries as a work around... _ From: Andy Smith [mailto:[EMAIL PROTECTED] Sent: 2008-10-30 18:26 To: 'mysql@lists.mysql.com' Subject: mysql dump problems, no data dumped Im having an issue using mysqldump to dump a DB from

RE: mysql dump problems, no data dumped

2008-10-31 Thread Andy Smith
AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; mysqldump: Got error: 1017: Can't find file: './OpManagerDB/WANIntfTypes.frm' (errno: 24) when using LOCK TABLES This file mentioned does exist in the location where all the datafiles for the OpManager

mysql dump problems, no data dumped

2008-10-30 Thread Andy Smith
yone help me? I need to work out why no data is written, thanks Andy.

Re: Rotate regular log file only

2008-10-23 Thread Andy Shellam
6 Notice the last write time of sql-m2-bin.25 and the new file sql-m2-bin.26. Note this was on my slave server which was why the logs never get written to past 00:56 each morning! Also my backup script substitutes the date as appropriate into the dump file. Regards, Andy Olaf Stein wr

Re: Rotate regular log file only

2008-10-23 Thread Andy Shellam
ves respond to the change without an issue. Andy Olaf Stein wrote: Thanks all... Rotating actually does not affect the slaves, they adjust to the new binlog just fine, I guess I should have tried that first. I will nevertheless take a closer look at logrotate... Olaf On 10/23/08 12:13

Re: Down list

2008-10-21 Thread Andy Shellam
You might like to try here: http://lists.mysql.com/, then click on Unsubscribe underneath the "General Discussion" list. Vidal Garza wrote: Please let me down of the list. I resigns from my job. Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscr

Re: Access Rights ?

2008-10-06 Thread Andy Shellam
s like 5.1 greatly improves on the functionality you're looking for, including the native ability to write the logs to a database table, however it's currently more efficient to write to a file than it is to a table. See http://dev.mysql.com/doc/refman/5.1/en/log-tables.html for more

Re: Access Rights ?

2008-10-06 Thread Andy Shellam
hours and a few cups of coffee will allow you to write a simple PHP script (or C program for the hard-core developers) to read this file and write the details of each record to a database table. Regards, Andy Sachin Gaikwad wrote: Hi all, I am newbie using MySQL. I want to log each client

  1   2   3   4   5   6   7   >