Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use binary method to install MariaDB Server in Centos7

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the Centos7 how to use the binary way to install MariaDB Server related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that you read this Centos7 how to use the binary way to install MariaDB Server article will have a harvest, let's take a look at it.

MariaDB Server is one of the most popular open source relational databases. It was created by the original developers of MySQL and guaranteed to remain open source. It is part of most cloud products and is the default configuration for most Linux distributions. MariaDB is designed as a direct alternative to MySQL, with more features, a new storage engine, fewer errors and better performance.

View system version command

$cat / etc/redhat-releaseCentOS Linux release 7.4.1708 (Core) x64 install MariaDB (MySQL)

Download the MariaDB binary installation package:

Https://downloads.mariadb.org unpack and install the Mariadb-devel static library: $yum install mariadb-devel numactl-y $mkdir / renwole$ cd / renwole$ tar zxvf mariadb-10.2.8-linux-glibc_214-x86_64.tar.gz mobile directory and create a soft connection: $mv mariadb-10.2.8-linux-glibc_214-x86_64 / usr/local$ cd / usr/local$ ln-s mariadb-10.2.8-linux-glibc_214-x86_64 mysql Build MariaDB (MySQL) users and groups $groupadd mysql$ useradd-g mysql mysql gives MariaDB (MySQL) directory permissions: $cd / usr/local/mysql$ chown-R root. $chown-R mysql data configuration MariaDB (MySQL)

Delete the included my.cnf profile and create a new one:

$rm-rf / etc/my.cnf$ cp / usr/local/mysql/support-files/my-large.cnf / etc/my.cnf

Note: there are 5 configuration files under / usr/local/mysql/support-files, please select the configuration file according to the memory size of the server (you can also customize and optimize the my.cnf configuration file, if you have before, as long as it is the same version it can be used normally, so there is no need to create it again, MariaDB (MySQL) will automatically find the my.cnf file under / etc when starting).

The documents are:

My-small.ini (memory local/mysql/data

Note: this path is used to initialize the database. This directory will exist in your database in the future. This storage path can be changed to another path to avoid unnecessary losses caused by system downtime in the future. So please change the relative path according to your own needs, and don't forget to give permission.

Initialize the database $cd / usr/local/mysql/scripts$. / mysql_install_db-- user=mysql-- basedir=/usr/local/mysql-- datadir=/usr/local/mysql/data$ cd / usr/local/mysql/support-files$ cp mysql.server / etc/init.d/mysql$ chmod + x / etc/init.d/mysql$ systemctl enable mysql to add system variables For example, entering: mysql-uroot-p directly prompts you that there is no such command: $vim / etc/profile adds the following to the end of the file: PATH=$PATH:/usr/local/mysql/binexport PATH makes the variable effective immediately and starts the Mysql database: $source / etc/profile$ systemctl restart mysql$ ss-antp initializes the MariaDB (MySQL) security account $/ usr/local/mysql/bin/mysql_secure_installation

Note: enter prompts you to enter the MariaDB (MySQL) password, the newly installed mysql password is empty by default, so directly enter the enter, then enter Y to set the MySQL password, enter the enter twice, then press Y (roughly meaning delete test database, anonymous account, and finally Y configuration takes effect.

This is the end of the article on "how to install MariaDB Server using binary in Centos7". Thank you for reading! I believe you all have a certain understanding of "how to install MariaDB Server using binary in Centos7". If you want to learn more, you are welcome to follow the industry information channel.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report