list all databases in mysql server

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

list all databases in mysql server

higer
Hi,

Is it possible to show all databases in a mysql server with iBatis?



Best Regards,
Zhong Nanhai

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: list all databases in mysql server

Josh Kamau
IMHO opinion, its not possible because each connection is to one Database. So your ibatis, JDBC or whatever code only knows the objects under the database for which connection was made.

Regards.

On Fri, May 21, 2010 at 10:17 AM, Zhong Nanhai <[hidden email]> wrote:
Hi,

Is it possible to show all databases in a mysql server with iBatis?



Best Regards,
Zhong Nanhai

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: list all databases in mysql server

higer
Hi,

Then, is there any other way?


On 5/21/10, Josh Kamau <[hidden email]> wrote:

> IMHO opinion, its not possible because each connection is to one Database.
> So your ibatis, JDBC or whatever code only knows the objects under the
> database for which connection was made.
>
> Regards.
>
> On Fri, May 21, 2010 at 10:17 AM, Zhong Nanhai
> <[hidden email]>wrote:
>
>> Hi,
>>
>> Is it possible to show all databases in a mysql server with iBatis?
>>
>>
>>
>> Best Regards,
>> Zhong Nanhai
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: list all databases in mysql server

Martin Ellis-4
In reply to this post by higer
On 21 May 2010 08:17, Zhong Nanhai <[hidden email]> wrote:
> Is it possible to show all databases in a mysql server with iBatis?

<select id="showdatabases" resultType="map">
  SHOW DATABASES
</select>

System.out.println(session.selectList("your-namespace.showdatabases"));

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: list all databases in mysql server

higer
Many thanks!!! It works.

On 5/21/10, Martin Ellis <[hidden email]> wrote:

> On 21 May 2010 08:17, Zhong Nanhai <[hidden email]> wrote:
>> Is it possible to show all databases in a mysql server with iBatis?
>
> <select id="showdatabases" resultType="map">
>   SHOW DATABASES
> </select>
>
> System.out.println(session.selectList("your-namespace.showdatabases"));
>
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...