MariaDB beginner management commands
Earlier, we learned to install the MariaDB server on CentOS/RHEL 7 (SEE), which is now the default database of RHEL/CentOS 7. Now we will discuss some useful MariaDB management commands. These are some very basic
mysql> SHOW GLOBAL VARIABLES; Global variables affect the global operation of the serverMysql> SHOW [SESSION] VARIABLES; Client variables, only valid for this sessionNote: Some of these parameters support run-time modification and take effect immediately; some parameters are not supported and can only be changed by modifying the configuration file and restarting the server programSome parameter scopes are global and immutable; some can provide individual settings for each userModifying the value
MySQL Basic command operation1. Login Method:Mysql-u root-p2. Show all databases:show databases;3. Operation of the specified database (take Information_schema as an example)Use Information_schema4. Show all the tablesShow tables;5. Display the table structure (take the Users table for example)Discribe tables;6. Query the size of all databases:Select Concat (Round (sum (data_length/1024/1024), 2), ' MB ') as data from tables;7. Query the size of the specified database (take Zabbix as an example)
documentation)
Here, I will list the configurations of the test machine:
Operating system version: CentOS7
Node4: 10.128.20.16 node5: 10.128.20.17 node6: 10.128.20.18
In the first behavior example, node4 is the hostname and 10.128.20.16 is the ip address. Modify the/etc/hosts file on the three machines. My file is as follows:10.128.20.16 node410.128.20.17 node510.128.20.18 node6
To ensure mutual communication between nodes, You need to disable firewall settings (if you need a firewall, refer to
)
Here, I will list the configurations of the test machine:
Operating system version: centos7
Node4: 10.128.20.16 node5: 10.128.20.17 node6: 10.128.20.18
In the first behavior example, node4 ishostname, 10.128.20.16 isip, Modify on three machines/etc/hostsFile. My file is as follows:
10.128.20.16 node410.128.20.17 node510.128.20.18 node6
To ensure mutual communication between nodes, You need to disable firewall settings (if you need a firewall, refer to the official website to add firewall infor
Tags: ant current value Lin Create compile users restart base1, installation mariadb Installation commands Yum-y Install mariadb Mariadb-server Installation Complete mariadb, first start mariadb, two
Label:Long-standing space environment configuration forget almost, today Hollow finishing, reset the disk to rebuild the environment, first install the MARIADB database, here to record the installation process for later review. 1, installation mariadb Installation commands yum-y Install mariadb
packages be up to date before making any changes to your repo files. You can do the with:
# yum update [On RHEL/CentOS 7]
# apt-get update [On Debian/Ubuntu]
On Rhel/centos 7
If you had any old packages, wait for the installation to finish. Next, you'll need to the add themariadb 10.1 repo for Centos/rhel 7/distributions. To does this, use your favorite text editor such as Vim or nano and open the following file:
# Vim/etc/yum.repos.d/mariadb10.repo
Add
The following is a look at mariadb multi-source replication (mariadb Multi-master replication) example, I hope to help you.MARIADB multi-source Replication (mariadb Multi-master replication)A multi-master replication feature was added to the mariadb-10.0.Modified syntax:For each replication thread there is a correspond
'/^[^ \t]/{n;s/(^[^]*). *addr: ([^]*). */\1=\2/p} 'eth0=172.17.0.3#查看SLAVE的状态[root@legion135/docker/image/mariadb]# Yum install-y-Q MySQLDelta RPMs reduced 1.5 M of updates to 126 K (91% saved)[root@legion135/docker/image/mariadb]# mysql-uroot-plookback-h172.17.0.3Welcome to the MARIADB Monitor. Commands End With; or
MARIADB, as a branch of MySQL, is already widely used in open source projects, such as hot OpenStack, so the cluster deployment is essential to ensure high availability of the service while increasing the load capacity of the system.MariaDB Galera Cluster IntroductionThe MARIADB cluster is a MARIADB synchronous multi-host cluster. It only supports the XTRADB/INNO
at boot time with to copy Support-files/mysql.server to the right place for your system please RE
MEMBER to SET A PASSWORD for the MariaDB root USER! To does, start the server, then issue the following commands: '/usr/local/mariadb//bin/mysqladmin '-u root password ' new- Password '/usr/local/mariadb//bin/mysqladmin '
in it are converted, as are the special characters in the MySQL table name. This is done to make it easier for file names to be ported on different systems.Tips:You only need to specify –log-base-name, and all other variables will use this as a prefix instead of specifying –relay-log,–relay-log-index,–general-log,–slow-log,–log-bin for MYSQLD , –log-bin-index these names.
Other mattersAll slave error messages are added with connection name and then written to the error log.Er_master_info and W
Label:MARIADB, as a branch of MySQL, is already widely used in open source projects, such as hot OpenStack, so the cluster deployment is essential to ensure high availability of the service while increasing the load capacity of the system. MariaDB Galera Cluster IntroductionThe MARIADB cluster is a MARIADB synchronous multi-host cluster. It only supports the XTRA
shared libraries required for MARIADB/MYSQL clientsMariadb-libs.x86_64:the shared libraries required for MARIADB/MYSQL clientsMariadb-server.x86_64:the mariadb server and related filesMARIADB.X86_64:A community developed branch of MySQLMariadb-test.x86_64:the test suite distributed with MariadWell, put mariadb
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.