Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 3.83 KB

mariadb.md

File metadata and controls

60 lines (48 loc) · 3.83 KB

Shell

Databases

  • show databases; = Print all databases.
  • use my_database; = Connect to the database called my_database.
  • show tables; = Print tables of the current database.

Users

MariaDB Galera cluster

Quorum requires more than half of all nodes to be running!

  • galera_new_cluster = Re-bootstrap a failed cluster. Run from bash on most up-to-date node.
    • show status like 'wsrep_last_committed'; = Show commit number. Compare across nodes to determine most up-to-date node.
  • show status like 'wsrep%'; = Show cluster status.

    Change safe_to_bootstrap to 1 to forcibly allow bootstrapping node:
root@server# cat /var/lib/mysql/grastate.dat

# GALERA saved state
version: 2.1
uuid:    00dbfde9-51d0-11eb-8b86-02d3d6f3051a
seqno:   -1
safe_to_bootstrap: 0