In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains the "installation method of maridb", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "the installation method of maridb"!
1. Create a user
Useradd-u 1000 teledb
Passwd teledb
Nihao123
2. Decompress the file
Tar-zxvf mariadb.tar.gz-C / oracle/mysql/
Cd / oracle/mysql/data
Mkdir mariadb10_data3306
Cd mariadb10_data3306/
Mkdir {data,binlog,relaylog,logs,tmp}
Cd logs
Mkdir {arch,tmp}
Vim / home/teledb/.bash_profile
PATH=$PATH:$HOME/bin:/home/teledb/mariadb/bin
Modify the configuration file:
Vim / home/teledb/mariadb/etc/mariadb3306.cnf
Parameter modification:
Server-id=25563306 naming rules: the last two + ports of the machine ip
The last bit of gtid-domain-id=5657586 one master and two slaves ip + the last bit of port
Innodb_buffer_pool_size=8G single instance does not exceed 80% of machine memory, and two instances add up to no more than 80% of machine memory free-m view.
Innodb_thread_concurrency=6 less than or equal to the number of CPU threads cat / proc/cpuinfo | grep 'processor' | sort-u | wc-l
Log_slave_updates turns on log_slave_updates with one master and two slaves
Report-host=172.31.25.56 modifies report_host to machine IP
Modify individual paths according to the actual situation
Cd / oracle/mysql/mariadb/
. / scripts/mysql_install_db-- defaults-file=/oracle/mysql/mariadb/etc/mariadb3306.cnf
Start mariadb
Mysqld_safe-- defaults-file=/oracle/mysql/mariadb/etc/mariadb3306.cnf &
View the error log file, and proceed to the next step if no error is reported
Tail-100f / data/mariadb10_data3306/logs/mysql3306.err
= create database =
Create database `immcc_ test` default character set utf8 collate utf8_general_ci
/ home/teledb/mariadb/bin/mysql-S / tmp/mysql_3306.sock-uroot-p
Connect to mariadb with sock and execute the following statement:
/ home/teledb/mariadb/bin/mysql-S / tmp/mysql_3306.sock-uroot-p
Update mysql.user set password=PASSWORD ('123456') where User='root'
Delete from mysql.user where user='sh_kd_sh_test'
Grant all privileges on immcc_test.* to 'immcc_test'@'%' identified by' immcc_test'
Grant all privileges on *. * to 'root'@'%' identified by' 1qaz2WSX'
Flush privileges
Create database `sh_kd_zj_ test` default character set utf8 collate utf8_general_ci
Grant all privileges on sh_kd_zj_test.* to 'sh_kd_zj_test'@'%' identified by' sh_kd_zj_test'
Flush privileges
Thank you for your reading, the above is the content of "the installation method of maridb", after the study of this article, I believe you have a deeper understanding of the installation method of maridb, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.