List:Cluster« Previous MessageNext Message »
From:Yan Anic Date:June 22 2009 3:21pm
Subject:Re: How to include only some databases in a cluster?
View as plain text  
Hi Matthew,

Thanks for your help. Unfortunately I can't turn on
skip_show_database. It's too restrictive for me.

A workaround might be to connect to one (generic) API node and execute
a DROP DATABASE test_cluster statement.
This statement will drop the (empty) database test_cluster from all
API nodes except from the API node where I have created the myisam (or
innodb) table within it.

I was hoping for a more elegant solution since I have to repeat again
this workaround when I connect to the second API node and create the
database test_custer2. My aim is in fact to have a database (outside
the cluster) for each API node where I'd like to store some data
specific for that node only, like in the following example:

API Node 1 --> test_custer1 + "all the databases inside the cluster"
API Node 2 --> test_custer2 + "all the databases inside the cluster"
...
API Node N --> test_clusterN + "all the databases inside the cluster"


On Mon, Jun 22, 2009 at 4:33 PM, Boehm, Matthew<mboehm@stripped> wrote:
> Hi Yan,
> Since MyISAM, InnoDB and NDB are all "table engines", you cannot, AFAIK,
> exclude a database from being seen by other API nodes in the cluster.
>
> You could probably engage more strict permissions and turn on
> skip_show_database
>
> http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysv
> ar_skip_show_database
>
> -Matthew
>
>> -----Original Message-----
>> From: Yan Anic [mailto:yananic82@stripped]
>> Sent: Monday, June 22, 2009 6:47 AM
>> To: cluster@stripped
>> Subject: How to include only some databases in a cluster?
>>
>> Hello list,
>>
>> I'd like to know if it is possible to exclude a database from the
>> cluster.
>> I know this is possible in replication using for example the
>> sql_log_bin variable.
>> So I can have a database in the master which is not replicated on the
>> slaves. Is it possible to do this on a cluster?
>>
>> I already know that I can decide if a table should be included in the
>> cluster or not by using the engine option of the create table syntax
>> (if I use engine = myisam then that table will not be included in the
>> cluster).
>>
>> But what about a database? The create database syntax has not the
>> engine = xxx option.
>>
>> What I'd like to have is reported below.
>>
>> SQL Node 1:
>>
>> mysql> show databases;
>> +--------------------+
>> | Database           |
>> +--------------------+
>> | information_schema |
>> | mysql              |
>> | test               |
>> +--------------------+
>> 3 rows in set (0.00 sec)
>>
>> mysql> CREATE DATABASE test_cluster;
>> Query OK, 1 row affected (0.14 sec)
>>
>> mysql> CREATE TABLE test_cluster.test_table (a int) ENGINE = MyISAM;
>> Query OK, 0 rows affected (0.08 sec)
>>
>> mysql> show databases;
>> +--------------------+
>> | Database           |
>> +--------------------+
>> | information_schema |
>> | mysql              |
>> | test               |
>> | test_cluster       |
>> +--------------------+
>> 4 rows in set (0.00 sec)
>>
>>
>> SQL Node 2:
>>
>> mysql> show databases;
>> +--------------------+
>> | Database           |
>> +--------------------+
>> | information_schema |
>> | mysql              |
>> | test               |
>> | test_cluster       |  ----> I'd like not to see the
> test_cluster
>> database here if it is possible
>> +--------------------+
>> 4 rows in set (0.00 sec)
>>
>> mysql> use test_cluster;
>> Database changed
>>
>> mysql> show tables;
>> Empty set (0.03 sec) ----> ok table is not included since I've used
>> the myisam engine
>>
>> Thanks in advance,
>> Yan.
>>
>> --
>> MySQL Cluster Mailing List
>> For list archives: http://lists.mysql.com/cluster
>> To unsubscribe:
>> http://lists.mysql.com/cluster?unsub=1
>
>
Thread
How to include only some databases in a cluster?Yan Anic22 Jun
  • RE: How to include only some databases in a cluster?Matthew Boehm22 Jun
    • Re: How to include only some databases in a cluster?Yan Anic22 Jun
  • Re: How to include only some databases in a cluster?Tom Hanlon22 Jun