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

Linux installs the MySQL-MariaDB version

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Share a version that is easier and faster to install than the MySQL5.7 version: MariaDB.

Turn off the firewall before the lab begins:

Service firewalld stop

Setenforce 0

Then configure the ALI cloud source:

Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

Then install the epel-releas environment source:

Yum-y install epel-release

Install it:

Yum clean all & & yum makecache

Then build the local YUM source:

Yum-y install mariadb-server mariadb

Enter / etc/my.cnf/:

Vi / etc/my.cnf / /

Modify the main configuration file, assign error log, general log, binary log, slow log file, and specify the storage location:

(delete the original [mysqld] content)

[mysqld]

Log_error=/var/lib/mysql/mysql.err

Log=/var/lib/mysql/mysql_log.log

Log_slow_queries=/var/lib/mysql_slow_queris.log

Binlog-ignore-db=mysql,information_schema

Character_set_server=utf8

Log_bin=mysql_bin

Server_id=1

Log_slave_updates=true

Sync_binlog=1

Auto_increment_increment=2

Auto_increment_offset=1

The service can then be started:

Systemctl start mariadb

Check if port 3306 is open:

Netstat-anpt | grep 3306

Enter "mysql" directly to enter the database service.

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

Database

Wechat

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

12
Report