Looking at the MySQL binlog and pulling the queries onto one line

2008-11-21 Thread Andrew Braithwaite
Hi, I can convert the binlogs to text using mysqlbinlog and that works fine. However; I have queries that span several lines e.g. : SELECT blah FROM t1 WHERE some condition ORDER BY something Does anyone know of any utilities to reformat binlogs so that the queries are all on a

Re: Virtualizing MySQL

2008-11-21 Thread Joerg Bruehe
Jay, that is interesting: Jay Blanchard wrote: [snip] Virtualization includes overhead. It is fine as long as your application can tolerate that, but if your performance demands grow there will be a point where a DB server in a virtual machine will cause trouble but the same HW as a real

Displaying information from table graphically

2008-11-21 Thread dzenan . causevic
I have a PHP application that accesses data from MySQL. There is table called rooms, and table called beds. There is another table called patients. Patients are being placed into beds, and beds are in the rooms. PHP application currently displays all information in textual mode via regular HTML

Re: How to determine if temporary table exists

2008-11-21 Thread mos
At 12:00 AM 11/21/2008, you wrote: In the last episode (Nov 20), mos said: At 08:02 PM 11/20/2008, you wrote: Try drop table if exists Tablex; Ahhh, I don't necessarily want to drop the table if it already exists. :) If the table already exists then I'll add new rows to it (and keep the

Re: Error on MySQL-5.0

2008-11-21 Thread Ronan Lucio
Moon's Moon's Father escreveu: You may execute mysql_fix_privileges_table script to upgrade all of your mysqld. I did it, but the problem persists... :-/ +-+---+--++

Re: Displaying information from table graphically

2008-11-21 Thread David Giragosian
On 11/21/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a PHP application that accesses data from MySQL. There is table called rooms, and table called beds. There is another table called patients. Patients are being placed into beds, and beds are in the rooms. PHP application

SELECT through many databases

2008-11-21 Thread Andre Matos
Hello, Let's suppose I have 5 database: db1, db2, db3, db4, and db5. They all have the same structure but different data. I would like perform this select SELECT TaskDoneOn, TaskDoneBy FROM {database} WHERE TaskDoneOn IS NOT NULL and collect the data from all 5 database. However, I would

Re: SELECT through many databases

2008-11-21 Thread Peter Brawley
Andre Matos wrote: Today I have 5, but tomorrow I can have 50 and I don't want to forget any database. Do it in an app language or as a PREPARED statement in an sproc. PB --- Andre Matos wrote: Hello, Let's suppose I have 5 database: db1, db2, db3, db4, and db5. They all have the same

Re: SELECT through many databases

2008-11-21 Thread Brent Baisley
On Fri, Nov 21, 2008 at 12:44 PM, Andre Matos [EMAIL PROTECTED] wrote: Hello, Let's suppose I have 5 database: db1, db2, db3, db4, and db5. They all have the same structure but different data. I would like perform this select SELECT TaskDoneOn, TaskDoneBy FROM {database} WHERE TaskDoneOn

Re: SELECT through many databases

2008-11-21 Thread Andre Matos
I was trying to avoid both since the SELECT statement is not fixed. Time to time, users want different information. Thanks, Andre On 21-Nov-08, at 12:59 PM, Peter Brawley wrote: Andre Matos wrote: Today I have 5, but tomorrow I can have 50 and I don't want to forget any database. Do

Re: SELECT through many databases

2008-11-21 Thread Andre Matos
Sounds interesting, but does the MERGER support complex SELECT statements and LEFT JOIN? Andre On 21-Nov-08, at 1:45 PM, Brent Baisley wrote: On Fri, Nov 21, 2008 at 12:44 PM, Andre Matos [EMAIL PROTECTED] wrote: Hello, Let's suppose I have 5 database: db1, db2, db3, db4, and db5. They

Re: SELECT through many databases

2008-11-21 Thread Brent Baisley
A MERGE table is just a virtual table that is made up of other tables. You treat it no differently than any other table, pretend it's a real table. You could even create multiple MERGE tables from different tables. A good example is Q1, Q2, Q3, Q4, LatestQ, for quarterly information. You just

RE: SELECT through many databases

2008-11-21 Thread Jerry Schwartz
Many MySQL APIs (such as PHP) allow you to treat the result returned from a SHOW statement as you would a result set from a SELECT; see Chapter 22, APIs and Libraries, or your API documentation for more information. In addition, you can work in SQL with results from queries on tables in the

Re: SELECT through many databases

2008-11-21 Thread Andre Matos
Thanks everyone for the help. I was trying to use any API (e.g. PHP, Java, etc). I just gave up because unfortunately the time fly and the user needs this asap. I am doing via script. Thanks! Andre On 21-Nov-08, at 2:34 PM, Jerry Schwartz wrote: Many MySQL APIs (such as PHP) allow you

Re: SELECT through many databases

2008-11-21 Thread Olexandr Melnyk
Hello Andre, I would recommend you to rethink your criteria (if there's any) for splitting data into multiple tables. Because now. the more tables you add, the more of a performance problem it may cause. -- Sincerely yours, Olexandr Melnyk http://omelnyk.net/ On Fri, Nov 21, 2008 at 9:58 PM,

Re: SELECT through many databases

2008-11-21 Thread Olexandr Melnyk
Unless that's disallowed too, you could use a couple of triggers which would update the stats table(s) on insert/delete/update to the main tables in each database. Sincerely yours, Olexandr Melnyk http://omelnyk.net/ On Fri, Nov 21, 2008 at 10:31 PM, Andre Matos [EMAIL PROTECTED]wrote: The

Re: SELECT through many databases

2008-11-21 Thread Claudio Nanni
I would define a view out of the union query, you will only have to change that view whenever you add a database to your instance. Seems a bit strange that you could not manage this scenario, do you have so many databases added? If you really do not want to put your hands on code any more the

Re: SELECT through many databases

2008-11-21 Thread Andre Matos
The reason for having many databases with the same structure but with different data is because for regulatory and compliance requirements. Each database belongs to a separate company: company specific database. The applications (some written in PHP4 and others in J2EE) are unique and they

RE: SELECT through many databases

2008-11-21 Thread Martin Gainty
as UNIONS may cause FTS you might want to look at using JOIN USING(ColumnWhichIsCommonForEveryTable) (then place unique Indexes on each of the Columns for all Tables) Martin __ Disclaimer and confidentiality note Everything in this e-mail and any

Table encryption

2008-11-21 Thread Zakai Kinan
I searched google and the archives of this list, but I am not cleared about the support of table encryption in mysql. Can someone clarify for me? thanks, ZK -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: