Your SlideShare is downloading. ×
  • Like
Distribuido
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Distribuido

  • 1,027 views
Published

Configuracion de Mysql en ambiente Federado y Distribuido

Configuracion de Mysql en ambiente Federado y Distribuido

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,027
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
16
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Configuración de MySQL
    Federated y Cluster
  • 2. Ambiente Federado
    Servidor 1
    Servidor 2
    Servidor 3
  • 3. Servidor Remoto
    Servidor Local
  • 4. Inicio del Servidor Local
    Habilitar el motor FEDERATED para acceder a bases de datos remotas
    Mysqld--federated
  • 5. Misma estructura
    Servidor Remoto
    Servidor Local
    CreatetableUsers(
    idusuariointauto_increment,
    usernamevarchar(10),
    passwordvarchar(15),
    primarykey(idusuario));
    CreatetableUsers(
    idusuariointauto_increment,
    usernamevarchar(10),
    passwordvarchar(15),
    primarykey(idusuario))
    ENGINE=FEDERATED
    CONNECTION=
    'mysql://fed_user@remote_host:9306/federated/test_table’;
  • 6. Al crear la tabla
    Formato de la Cadena de Conexión
    scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name
    ENGINE=FEDERATED CONNECTION='mysql://fed_user@remote_host:9306/federated/test_table'
  • 7. MySQLCluster
    Ambiente distribuido
  • 8. Topología
    Clientes
    Mysql
    Datos
    Cliente
    Management
    Datos
    Datos
    Management
    Api
    Datos
  • 9. Management
    ndb_mgmd
    ndb_mgm
    Api
    mysqld --ndb
    Datos
    ndbd
    Datos
    ndbd
  • 10. Supuestos Básicos
    6nodos
  • 11. Archivo my.ini de los nodos de datos
    # Optionsformysqldprocess:
    [mysqld]
    ndbcluster
    # run NDB storageengine
    ndb-connectstring=192.168.0.10
    # Optionsforndbdprocess:
    [mysql_cluster]
    ndb-connectstring=192.168.0.10
    Motor del management server
    Ubicación del management server
  • 12. Debe estar localizado en la raíz del paquete
  • 13. Archivo config.ini del nodo management
    # Options affecting ndbd processes on all data nodes:
    [ndbd default]
    NoOfReplicas=2 # Number of replicas
    DataMemory=80M # How much memory to allocate for data storage
    IndexMemory=18M # How much memory to allocate for index storage
    # For DataMemory and IndexMemory, we have used the
    # default values. Since the "world" database takes up
    # only about 500KB, this should be more than enough for
    # this example Cluster setup.
    # TCP/IP options:
    [tcp default]
    portnumber=2202
  • 14. # This the default; however, you can use any port that is free
    # for all the hosts in the cluster
    # Note: It is recommended that you do not specify the port
    # number at all and allow the default value to be used instead
    # Management process options:
    [ndb_mgmd]
    hostname=192.168.0.10 # Hostname or IP address of management node
    datadir=/var/lib/mysql-cluster # Directory for management node log files
    # Options for data node "A":
    [ndbd]
    # (one [ndbd] section per data node)
    hostname=192.168.0.30 # Hostname or IP address
    datadir=/usr/local/mysql/data # Directory for this data node's data files
  • 15. # Options for data node "B":
    [ndbd]
    hostname=192.168.0.40 # Hostname or IP address
    datadir=/usr/local/mysql/data # Directory for this data node's data files
    # SQL node options:
    [mysqld]
    hostname=192.168.0.20 # Hostname or IP address
    # (additional mysqld connections can be
    # specified for this node for various
    # purposes such as running ndb_restore)
  • 16. Directorio de Trabajo
  • 17. Iniciar ndb_mgmd en el nodo servidor
    ndbd-mgmd –config-file=archivo
    Iniciar ndbd en los nodos de datos
    Ndbd
    Iniciar ndb-mgm en el nodo interfaz
    ndb
    Iniciar mysqld en el nodo interfaz
  • 18. Ndb-mgm
    Show
    Startbackup
    Shutdown
  • 19. Referencias
    ENGINE Federated
    http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html
    MySQLCluster
    http://mirror.atlanticmetro.net/mysql/doc/mysql-cluster-excerpt/5.1/en/index.html