Este contenido no está disponible en el idioma seleccionado.

Chapter 9. Start MariaDB Locally and Setup Accounts


To start MariaDB and setup base accounts, execute the following procedure.

Procedure

  1. Start the MariaDB service and set up base accounts ALL controller nodes.

    mysqld_safe --wsrep-provider=none &
    MYSQL_PASSWORD=$(/bin/hiera -c /etc/puppet/hiera.yaml mysql::server::root_password)
    CLUSTERCHECK_PASSWORD=$(/bin/hiera -c /etc/puppet/hiera.yaml mysql_clustercheck_password)
    /usr/bin/mysql -u root -p -e "CREATE USER 'clustercheck'@'localhost';"
    /usr/bin/mysql -u root -p -e "GRANT PROCESS ON *.* TO 'clustercheck'@'localhost' IDENTIFIED BY '$CLUSTERCHECK_PASSWORD';"
    /usr/bin/mysqladmin -u root password $MYSQL_PASSWORD
    mysqladmin -u root -p$MYSQL_PASSWORD shutdown
    Copy to Clipboard Toggle word wrap

    The director creates a root password and stores it in /root/.my.cnf.

  2. On ALL controller nodes, ensure that the mysql process is not running.

    [root@overcloud-controller-0]# ps -ef | grep mysql
    [root@overcloud-controller-1]# ps -ef | grep mysql
    [root@overcloud-controller-2]# ps -ef | grep mysql
    Copy to Clipboard Toggle word wrap
  3. Uncomment the wsrep_cluster_address and wsrep_provider settings in /etc/my.cnf.d/galera.cnf on ALL controller nodes.

    wsrep_cluster_address = gcomm://overcloud-controller-0,overcloud-controller-1,overcloud-controller-2
    wsrep_provider = /usr/lib64/galera/libgalera_smm.so
    Copy to Clipboard Toggle word wrap
  4. On one of the nodes in the cluster, bring the Galera cluster up with Pacemaker.

    [root@overcloud-controller-0]# pcs resource manage galera
    [root@overcloud-controller-0]# pcs resource cleanup galera
    Copy to Clipboard Toggle word wrap
  5. Make sure that cluster is running.

    [root@overcloud-controller-0]# pcs status | grep -C3 galera
    Copy to Clipboard Toggle word wrap

    If the cluster is running, the output should look like this:

    Master/Slave Set: galera-master [galera]
         Masters: [ overcloud-controller-0 overcloud-controller-1 overcloud-controller-2 ]
    Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat