List:Cluster« Previous MessageNext Message »
From:Martin Skold Date:July 11 2004 10:37am
Subject:Re: One frontend don't see changes made by another frontend
View as plain text  
You can actually start the MySQL server with
--ndbcluster --default-storage-engine=ndbcluster
to avoid having to specify storage engine for every table.

BR
-- Martin

Jim Hoadley wrote:

>Joseph and Devananda --
>
>That was it. When I first set up MySQL Cluster I used TYPE=NDB.
>I inadvertently dropped it in my testing somewhere along the line.
>
>Thanks!
>
>-- Jim
>
>--- "Joseph E. Sacco, Ph.D." <jsacco@stripped> wrote:
>  
>
>>Hello Jim,
>>
>>At the risk of stating the obvious, did you specify TYPE=NDB when
>>creating the cluster tables?
>>
>>I have observed that a mysql server can have both local and cluster
>>tables. If a table is not in the cluster, other mysql servers connected
>>to the cluster will never see it.
>>
>>I did a simple experiment using the "test" database that is present with
>>all MySQL installs.  I first created a table in the cluster [TYPE=NDB]
>>using a mysql server on one conputer. On a different computer I then
>>fired up another mysql server that was connected to the cluster. The
>>cluster table "magically" appeared.
>>
>>I then shut down one of the mysql servers, edited it's my.cnf file to
>>remove it from the cluster, and brought it back up again. The server
>>knew about the existence of cluster table [metadata had been copied
>>locally] but certainly could not access the data. I then dropped that
>>table the database, brought down the mysql server, edited it's my.cnf to
>>put it back into the cluster, and brought the server back up. Like
>>"magic" the cluster table  reappeared.
>>
>>Hope that helps...
>>
>>
>>-Joseph
>>
>>=============================================================
>>
>>
>>On Fri, 2004-07-09 at 18:14, Jim Hoadley wrote:
>>    
>>
>>>Hello --
>>>
>>>I have a similar problem to the one Luca describes.
>>>
>>>2 nodes on 2 computers (configured for 2 replicas)
>>>2 APIs on these same 2 computers
>>>
>>>All NDB tests are fine, meaning I can CREATE, INSERT, DELETE, SELECT as
>>>      
>>>
>>well as
>>    
>>
>>>stop either node. However I can only "see" the Cluster database from one of
>>>      
>>>
>>the
>>    
>>
>>>APIs. Connecting to the other, the database doesn't exist.
>>>
>>>Martin's suggestion 'need to do "CREATE DATABASE ..;" on all MySQL
>>>      
>>>
>>instances'
>>    
>>
>>>did not fix my problem.
>>>
>>>Sequence I follow is: 
>>>
>>>1. connect (from 3rd computer) to API on node_1 and create database
>>>
>>> mysql> create table city(col1 integer not null primary key, col2
>>>      
>>>
>>char(20));
>>    
>>
>>> Query OK, 0 rows affected (0.04 sec)
>>> 
>>> mysql> insert into city values(1, 'Walnut Creek');
>>> Query OK, 1 row affected (0.03 sec)
>>> 
>>> mysql> insert into city values(2, 'Bologna');
>>> Query OK, 1 row affected (0.00 sec)
>>> 
>>> mysql> select * from city;
>>> +------+--------------+
>>> | col1 | col2         |
>>> +------+--------------+
>>> |    1 | Walnut Creek |
>>> |    2 | Bologna      |
>>> +------+--------------+
>>> 2 rows in set (0.00 sec)
>>> 
>>> mysql> quit
>>> Bye
>>>
>>>2. connect (from 3rd computer) to the API on node_2 and read from database
>>>
>>> mysql> select * from city; 
>>> Empty set (0.00 sec)
>>> 
>>> mysql> quit
>>> Bye
>>>
>>>I'm starting the API on node_1 with the connect string like:
>>>export NDB_CONNECTSTRING="host=localhost:2200;nodeid=11"
>>>I'm starting the API on node_2 with the connect string like:
>>>export NDB_CONNECTSTRING="host=node_1:2200;nodeid=12"
>>>
>>>I can see the API connected to the mgm_ndbd on node_1
>>>
>>>NDB> show
>>>Cluster Configuration
>>>---------------------
>>>2 NDB Node(s)
>>>DB node:        2  (Version: 3.5.0)
>>>DB node:        3  (Version: 3.5.0)
>>> 
>>>4 API Node(s)
>>>API node:       11  (Version: 3.5.0)
>>>API node:       12  (Version: 3.5.0)
>>>API node:       13  (not connected)
>>>API node:       14  (not connected)
>>> 
>>>1 MGM Node(s)
>>>MGM node:       1  (Version: 3.5.0)
>>> 
>>>NDB>
>>>
>>>Am I missing something? Any debugging ideas? 
>>>
>>>-- Jim
>>> Jim Hoadley
>>> Senior Software Engineer
>>> 
>>> Dealer Fusion, Inc.
>>> 1450 Enea Circle, Suite 100
>>> Concord, CA 94520
>>> j_hoadley[at]yahoo[dot]com
>>> (925) 969-8300 x125
>>>
>>>
>>>--- Luca Villani <luca.villani@stripped> wrote:
>>>      
>>>
>>>>Alle 15:15, venerd 9 luglio 2004, Martin Skold ha scritto:
>>>>
>>>>
>>>>        
>>>>
>>>>>Also the creation of new databases is currently also not propagated
>>>>>between MySQL instances.
>>>>>
>>>>>This means you currently need to do "CREATE DATABASE ..;"
>>>>>on all MySQL instances.
>>>>>          
>>>>>
>>>>Thank you very much, now every frontend seems to work fine. :-)
>>>>
>>>>Here there is another question: as long as mysqld normally store
>>>>        
>>>>
>>permissions 
>>    
>>
>>>>in standard tables of mysql database, stored on local filesystem, do we
>>>>        
>>>>
>>need 
>>    
>>
>>>>to grant privileges onto all mysqld frontend?
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>Any query referencing the table created through another MySQL
> instance
>>>>>will then make it visible and you can see it in a "SHOW TABLES;"
>>>>>          
>>>>>
>>>>I've tested it and it's right.
>>>>
>>>>
>>>>But during a simple test I'm going in trouble with a simple update: I
>>>>        
>>>>
>>found 
>>    
>>
>>>>the OperationRecords limit... ;-)
>>>>
>>>>As long as we normally perform a 2-3.000.000 lines updates, are there
>>>>        
>>>>
>>some 
>>    
>>
>>>>problems in setting an appropriate OperationRecords limit?
>>>>
>>>>Occasionally we've performed an alter table on very big tables
>>>>        
>>>>
>>(15-25.000.000
>>    
>>
>>>>lines), are there some problem on ndb?
>>>>
>>>>
>>>>
>>>>
>>>>P.S.: yes, we work togheter all italian mobile telcos... :-)
>>>>
>>>>
>>>>
>>>>-- 
>>>>Luca Villani                Wireless Solutions spa - DADA group
>>>>NOC manager                 Europe HQ, via Castiglione 25 Bologna
>>>>http://www.wseurope.com     Tel: +39 051 2966826    Fax: +39 051 2966800
>>>>GPG public key available    Mobile: +39 348 5298542 UIN: 76272621
>>>>
>>>>
>>>>--
>>>>MySQL Cluster Mailing List
>>>>For list archives: http://lists.mysql.com/cluster
>>>>To unsubscribe:   
>>>>        
>>>>
>>http://lists.mysql.com/cluster?unsub=1
>>    
>>
>>>>        
>>>>
>>>
>>>		
>>>__________________________________
>>>Do you Yahoo!?
>>>New and Improved Yahoo! Mail - Send 10MB messages!
>>>http://promotions.yahoo.com/new_mail
>>>      
>>>
>>-- 
>>Joseph E. Sacco, Ph.D. <jsacco[at]earthlink[dot]net>
>>
>>
>>    
>>
>
>
>		
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail Address AutoComplete - You start. We finish.
>http://promotions.yahoo.com/new_mail 
>
>  
>

-- 
Martin Sköld, Software Engineer
MySQL AB, www.mysql.com
Office: +46 (0)730 31 26 21



Thread
One frontend don't see changes made by another frontendLuca Villani9 Jul
  • Re: One frontend don't see changes made by another frontendMartin Skold9 Jul
    • Re: One frontend don't see changes made by another frontendLuca Villani9 Jul
      • Re: One frontend don't see changes made by another frontendJim Hoadley10 Jul
        • Re: One frontend don't see changes made by another frontendDevananda10 Jul
Re: One frontend don't see changes made by another frontendJim Hoadley11 Jul
  • Re: One frontend don't see changes made by another frontendMartin Skold11 Jul