creating databases in different folders

2009-06-01 Thread Foo JH
Hi all,

I'm using MySQL 5.0 on Windows 2003.

Problem background: We use the same server for different applications.
All the applications share the same server as the database server. Each
application uses their own database. In MSSQL we put each database in
the corresponding application folder so that the application root folder
contains everything (including the database).

Now we're trying to do the same for MySQL as well, but I'm not sure how
I can specify that a database should be created in a particular
directory (and it's almost always not in C:\Program Files\MySQL Server).

Can anyone advise? Thanks.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Left join query

2009-06-01 Thread Gavin Towey
A LEFT OUTER JOIN in that query in not necessary.  An inner join should be used.

-Original Message-
From: Shiv [mailto:shiv...@gmail.com]
Sent: Saturday, May 30, 2009 10:18 PM
To: bharani kumar
Cc: mysql
Subject: Re: Left join query

Hi,
   Along with tables, you should also provide details on how they are
related.  Assuming "Code" is unique in both tables and left joined on
Airport table, you can do something like this

SELECT A.Code, C.Code, A.SlNo, C.SlNo, A.Name, C.Location, A.status,
C.status, C.type
FROM Airport A
LEFT OUTER JOIN Common C
ON A.Code = C.Code
WHERE A.status = 1 and C.status = 1 and C.type = 'airport'
Cheers,
Shiva


On Fri, May 29, 2009 at 8:52 PM, bharani kumar <
bharanikumariyer...@gmail.com> wrote:

> Airport table
>
> SlNoName  Code  AuthLocation status
> 1   ChennaiCHN  Yes India 1
> 2.  Hydarabed   HYD Yes India 0
> 3   walkerWAK   Yes uk1
>
>
> common table
>
> SlNoName  CodeType   Location
>  status
> 1   ChennaiCHNAirport   India
> 1
> 2.  guest Road GR Seaport   India   1
> 3.  Hyderabad  HYDAirport
> India   0
> 4.  John gardenJG Seaport   India   0
> 5   walkerWAKairportuk1
>
>
> Hi All
>
> Can u please tell the query for the above table ,
>
> Display the record which satisfy below condtions ,
>
> 1.Need to display airport name , Where airport status = 1 and common
> table status = 1 and common table type = airport
>
> Output somthing like below
>
> AirportCode CommonCode AirportSlNo CommonSlNo  AirportName
> CommonLocation Status Type
>
> CHNCHN1   1
>  Chennai  india  1airport
>
> WAK   WAK   35
>  walker uk   1airport
>
>
> Any idea ,
>
>
>
>
> Thnaks
>
>
>
>
>
>
>
> --
> Regards
> B.S.Bharanikumar
> http://php-mysql-jquery.blogspot.com/
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql?unsub=shiv...@gmail.com
>
>

The information contained in this transmission may contain privileged and 
confidential information. It is intended only for the use of the person(s) 
named above. If you are not the intended recipient, you are hereby notified 
that any review, dissemination, distribution or duplication of this 
communication is strictly prohibited. If you are not the intended recipient, 
please contact the sender by reply email and destroy all copies of the original 
message.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Effect of NULL on index performance specific to InnoDB

2009-06-01 Thread Kyong Kim
It's often said that NOT NULL column is preferable in terms of index
performance.
I was wondering exactly why and how this is so specifically to InnoDB.
It would be great if someone can shed light on this matter in some detail.
Kyong

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Best way to convert character set from "latin1 to utf8" for existing database?

2009-06-01 Thread ewen fortune
Uma,

On Mon, Jun 1, 2009 at 8:41 AM, Uma Bhat  wrote:
> Hi All,
>
> I have read many blogs suggesting some examples for this.
> But suggestions from you guys who have ACTUALLY worked on such a scenario
> would help me out the best.
>
>
> Current Database has:
> DEFAULT CHARACTER SET - latin1
> DEFAULT COLLATION : latin1_swedish_ci
>
> We need to convert this to
>  DEFAULT CHARACTER SET - utf8
> DEFAULT COLLATION : utf8_general_ci
>
>
> Note that this has to be done on a database that has *existing data* in it .
>
> Hence just by doing a:
>
> ALTER DATABASE  CHARSET=utf8;
>
> would result in unexpected behaviour of the data.

Ryan Lowe blogged about this.

http://www.mysqlperformanceblog.com/2009/03/17/converting-character-sets/

He wrote a tool for it (linked from post)

http://www.pablowe.net/convert_charset

And Schlomi Noach commented that openark also has a tool.

http://code.openark.org/forge/openark-kit

Cheers,

Ewen

>

> Thanks!
> Uma
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Recover data without logs

2009-06-01 Thread ewen fortune
Weitao,

On Sun, May 31, 2009 at 10:13 AM, Weitao Liu  wrote:
> I had deleted some important data from my mysql server,who can tell how can
> I recover my data,I do not open the bin log,is there some other method?

If you are using InnoDB you may be able to recovery the data from the
pages if you did something like "DELETE * FROM..."

http://code.google.com/p/innodb-tools/

Cheers,

Ewen

>
> thanks a lot !
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Recover data without logs

2009-06-01 Thread Weitao Liu
Still thanks,I will remember how to avoide this if the feature!