MySQL Cluster
Hi, I would be setting up a mysql cluster, i'm researching what's the minimum number of machine to make sure i have fault tolerant and data backups. I found this: Q: What are the minimum system requirements for MySQL Cluster? A: A minimum of three computers is required to run a viable cluster. However, the minimum recommended number of computers in a MySQL Cluster is four: one each to run the management and SQL nodes, and two computers to serve as data nodes: OS:Linux (RedHat, SUSE), Solaris, AIX, HP-UX, Mac OS X CPU:Intel/AMD x86 Memory:512MB RAM HDD:3GB Network:1+ nodes (Standard Ethernet - TCP/IP) To add to this question, can i add 2 more machines so i have a hot standby for both the management and SQL nodes? Also, how can i load balanced, in such a way my web applications will split the to the 2 SQL nodes? Do i need a 2rd party setup for this like ldirectord? TIA Regards, nhadie -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: No Data on table
Hi Christian, Thanks for the reply. I got the table repaired and deleted some data on it. What combination can i use to overcome the 4GB limit? TIA Regards, Nhadie Christian Hammers wrote: Hello On 2007-02-18 Nhadie wrote: I had an error that my database is already full, when i do a select there is always no result even select * from tablename. but when i look at it on /var/lib/mysql i can see the size of the file is still huge, -rw-rw 1 mysql mysql 9174 Feb 18 11:46 tablename.frm -rw-rw 1 mysql mysql 4294967092 Feb 18 11:49 tablename.MYD -rw-rw 1 mysql mysql 782402560 Feb 18 11:52 tablename.MYI which might mean that the data should still be in there somewhere, but how can i retrieve it? It seems that you are using a combination of MySQL + Kernel + Filesystem + Unix Distribution that is not capable of writing files larger than 4GB. That was a known limitations until some years ago. If you can, then copy those tables to a "recent" computer and execute a "REPAIR TABLE" on them. If they end up with >4GB then delete as much as necessary and they will be usable on your old computer again. HTH, -christian- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
No Data on table
Hi All, Hope you can help me with this problem: I had an error that my database is already full, when i do a select there is always no result even select * from tablename. but when i look at it on /var/lib/mysql i can see the size of the file is still huge, -rw-rw 1 mysql mysql 9174 Feb 18 11:46 tablename.frm -rw-rw 1 mysql mysql 4294967092 Feb 18 11:49 tablename.MYD -rw-rw 1 mysql mysql 782402560 Feb 18 11:52 tablename.MYI which might mean that the data should still be in there somewhere, but how can i retrieve it? TIA Regards nhadie Message sent using UebiMiau 2.7 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Comparing to a part of a string
Hi All, Is there a faster way of doing this query SELECT t1.to_uri as to_uri, t1.from_uri as from_uri, t1.sip_from as sip_from, t1.username as username, DATE(t1.time) as startdate, t1.time as start, t2.time as stop, TIMEDIFF(t2.time,t1.time) as timediff FROM acc AS t1 INNER JOIN acc AS t2 ON t1.sip_callid = t2.sip_callid AND ((t1.fromtag = t2.fromtag AND t1.totag = t2.totag) OR (t1.fromtag = t2.totag AND t1.totag = t2.fromtag)) LEFT JOIN acc AS t3 ON t1.sip_callid = t3.sip_callid AND ((t1.fromtag = t2.fromtag AND t1.totag = t2.totag) OR (t1.fromtag = t2.totag AND t1.totag = t2.fromtag)) AND t3.sip_method='INVITE' AND t1.time > t3.time WHERE t1.sip_method='INVITE' AND t2.sip_method='BYE' AND t3.sip_method IS NULL AND ((t1.sip_status ='200' and t2.sip_status='200') AND (YEAR(t1.time) = '2006' AND MONTH(t1.time)='9' AND SUBSTRING_INDEX(t1.sip_callid,'@',-1)='210.1.71.51')) order by t1.time what i really want to do is get the IP address part of t1.sip_callid, is there a faster way of extracting it? here is a sample string in t1.sip_callid [EMAIL PROTECTED] TIA Regards, Nhadie -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
help on join query
Hi All, Given this table: +-+-+++- |sip_status | sip_method | sip_callid | username | fromtag| totag | time| timestamp | +-+-+++- |200| INVITE | [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:27:39 | 2006-06-19 05:27:39 | |200| ACK| [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:27:39 | 2006-06-19 05:27:39 | |200| INVITE | [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:27:59 | 2006-06-19 05:27:59 | |200| ACK| [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:28:00 | 2006-06-19 05:28:00 | |200| INVITE | [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:28:15 | 2006-06-19 05:28:15 | |200| ACK| [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:28:15 | 2006-06-19 05:28:15 | |200| INVITE | [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:28:16 | 2006-06-19 05:28:16 | |200| ACK| [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:28:16 | 2006-06-19 05:28:16 | |200| INVITE | [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:29:16 | 2006-06-19 05:29:16 | |200| ACK| [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:29:17 | 2006-06-19 05:29:17 | |406| REFER | [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:29:19 | 2006-06-19 05:29:19 | |200| BYE| [EMAIL PROTECTED] | 0061396962022 |3359683324-99483 | e8936439e4bdfb0co0 | 2006-06-19 13:29:19 | 2006-06-19 05:29:19 | |481| BYE| [EMAIL PROTECTED] | 5743 |e8936439e4bdfb0co0 | 3359683324-99483 | 2006-06-19 13:29:19 | 2006-06-19 05:29:19 | |200| INVITE | [EMAIL PROTECTED] | 5093 | 73af10c095f4a93do1 | 3359711691-612956 | 2006-06-19 21:20:25 | 2006-06-19 13:20:25 | |200| ACK| [EMAIL PROTECTED] | 5093 | 73af10c095f4a93do1 | 3359711691-612956 | 2006-06-19 21:20:25 | 2006-06-19 13:20:25 | |481| BYE| [EMAIL PROTECTED] | 5093 | 73af10c095f4a93do1 | 3359711691-612956 | 2006-06-19 21:22:11 | 2006-06-19 13:22:11 | |481| BYE| [EMAIL PROTECTED] | 0027164306000 | 3359711691-612956 | 73af10c095f4a93do1 | 2006-06-19 21:22:14 | 2006-06-19 13:22:14 | +--+--+++--- I tried this query: SELECT t1.sip_callid as callid, t1.username as username, t1.sip_method as t1meth, t2.sip_method as t2meth, t3.sip_method as t3meth, t1.time as start, t2.time as stop, TIMEDIFF(t2.time,t1.time) as timediff FROM acc AS t1 INNER JOIN acc AS t2 ON t1.sip_callid = t2.sip_callid AND ((t1.fromtag = t2.fromtag AND t1.totag = t2.totag) OR (t1.fromtag = t2.totag AND t1.totag = t2.fromtag)) LEFT JOIN acc AS t3 ON t1.sip_callid = t3.sip_callid AND ((t1.fromtag = t2.fromtag AND t1.totag = t2.totag) OR (t1.fromtag = t2.totag AND t1.totag = t2.fromtag)) AND t3.sip_method='INVITE' AND t1.time > t3.time WHERE t1.sip_method='INVITE' AND t2.sip_method='BYE' AND t3.sip_method IS NULL; but i still get this result +--+--++++-+-+--+ | callid | username | t1meth | t2meth | t3meth | start | stop| timediff | +--+--++++-+-+--+ | [EMAIL PROTECTED] | 5093 | INVITE | BYE| NULL | 2006-06-19 21:20:25 | 2006-06-19 21:22:11 | 00:01:46 | | [EMAIL PROTECTED] | 5093 | INVITE | BYE| NULL | 2006-06-19 21:20:25 | 2006-06-19 21:22:14 | 00:01:49 | | [EMAIL PROTECTED] | 5743 | INVITE | BYE| NULL | 2006-06-19 13:27:39 | 2006-06-19 13:29:19 | 00:01:40 | | [EMAIL PROTECTED] | 5743 | INVITE | BYE| NULL | 2006-06-19 13:27:39 | 2006-06-19 13:29:19 | 00:01:40 | +--+--++++-+-+--+ What query should I use to make it look like these: +--+--
help on SQL JOIN
Hi All, I have this test table +--+--+--+--++--+ | username | key1 | key2 | key3 | method | timer| +--+--+--+--++--+ | nhadie | aaa | bbb | ccc | INVITE | 00:00:10 | | nhadie | aaa | bbb | ccc | ACK| 00:00:14 | | nhadie | aaa | bbb | ccc | INVITE | 00:00:16 | | nhadie | aaa | bbb | ccc | ACK| 00:00:20 | | nhadie | aaa | bbb | ccc | INVITE | 00:00:22 | | nhadie | aaa | bbb | ccc | ACK| 00:00:26 | | nhadie | aaa | bbb | ccc | BYE| 00:00:42 | | nhadie | ddd | fff | eee | INVITE | 00:00:20 | | nhadie | ddd | fff | eee | ACK| 00:00:24 | | nhadie | ddd | fff | eee | INVITE | 00:00:26 | | nhadie | ddd | fff | eee | ACK| 00:00:30 | | nhadie | ddd | fff | eee | INVITE | 00:00:32 | | nhadie | ddd | fff | eee | ACK| 00:00:36 | | nhadie | ddd | fff | eee | BYE| 00:00:52 | +--+--+--+--++--+ I tried this query: select t1.username as username, t1.method as t1method, t2.method as t2method, t1.timer as start, t2.timer as stop, unix_timestamp(t2.timer)-unix_timestamp(t1.timer) as timediff from test t1,test t2 where (t1.method = 'INVITE' and t2.method = 'BYE') and ((t1.key1 = t2.key1) and (t1.key2 = t2.key2) and (t1.key3 = t2.key3)); and this is the result: +--+--+--+--+--+--+ | username | t1method | t2method | start| stop | timediff | +--+--+--+--+--+--+ | nhadie | INVITE | BYE | 00:00:10 | 00:00:42 | 00:00:32 | | nhadie | INVITE | BYE | 00:00:16 | 00:00:42 | 00:00:26 | | nhadie | INVITE | BYE | 00:00:22 | 00:00:42 | 00:00:20 | | nhadie | INVITE | BYE | 00:00:20 | 00:00:52 | 00:00:32 | | nhadie | INVITE | BYE | 00:00:26 | 00:00:52 | 00:00:26 | | nhadie | INVITE | BYE | 00:00:32 | 00:00:52 | 00:00:20 | +--+--+--+--+--+--+ but what i want to actually achieve is to get only the time of the first INVITE and then it's corresponding BYE so it should look like this +--+--+--+--+--+--+ | username | t1method | t2method | start| stop | timediff | +--+--+--+--+--+--+ | nhadie | INVITE | BYE | 00:00:10 | 00:00:42 | 00:00:32 | | nhadie | INVITE | BYE | 00:00:20 | 00:00:52 | 00:00:32 | --- Is that possible? What else can I do to have this output? Thank You in Advanced. Regards, Nhadie Message sent using UebiMiau 2.7 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]