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 install MariaDB 10 in Debian and buntu

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces how to install MariaDB 10 in Debian and buntu. It is very detailed and has a certain reference value. Interested friends must read it!

MariaDB database management system is a branch of MySQL and is mainly maintained by the open source community. The purpose of licensing MariaDB with GPL is to be fully compatible with MySQL, including API and the command line, making it an easy replacement for MySQL.

Install MariaDB on Debian and Ubuntu

1. Before installing MariaDB, you need to import the warehouse key and obtain the MariaDB repository with the following command

On Debian 10 (Sid) $sudo apt-get install software-properties-common$ sudo apt-key adv-- recv-keys-- keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 $sudo add-apt-repository 'deb [arch=amd64 I386] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian sid main' on Debian 9 (Stretch) $sudo apt-get install software-properties-common$ sudo apt-key adv-- recv-keys-- keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 $sudo add-apt-repository 'deb [arch=amd64] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian stretch main' on Debian 8 (Jessie) $sudo apt-get install software-properties -common$ sudo apt-key adv-- recv-keys-- keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db$ sudo add-apt-repository 'deb [arch=amd64 I386 ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian jessie main' on Debian 7 (Wheezy) $sudo apt-get install python-software-properties$ sudo apt-key adv-- recv-keys-- keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db$ sudo add-apt-repository 'deb [arch=amd64 I386] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian wheezy main' on Ubuntu 16.10 (Yakkety Yak) $sudo apt-get install software-properties-common$ sudo apt-key adv-- recv-keys-- keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 $sudo add-apt-repository 'deb [arch=amd64 I386] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu yakkety main' on Ubuntu 16.04 (Xenial Xerus) $sudo apt-get install software-properties-common$ sudo apt-key adv-- recv-keys-- keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 $sudo add-apt-repository 'deb [arch=amd64,i386 Ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu xenial main' on Ubuntu 14.04 (Trusty) $sudo apt-get install software-properties-common$ sudo apt-key adv-- recv-keys-- keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db$ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu trusty main'

2. Then, update the system installation package list and install the MariaDB server as follows:

$sudo apt-get update$ sudo apt-get install mariadb-server

During installation, you will be asked to configure the MariaDB server; set a secure root password on the following page:

Set a new Root password for MariaDB

Enter the password again and press enter to continue the installation.

Enter the MariaDB password again

When the MariaDB installation package is installed, start the database server daemon and enable it so that it starts automatically the next time you boot:

-On SystemD Systems-$sudo systemctl start mariadb$ sudo systemctl enable mariadb$ sudo systemctl status mariadb- On SysVinit Systems-$sudo service mysql start$ chkconfig-- level 35 mysql onOR$ update-rc.d mysql defaults$ sudo service mysql status

Enable the MariaDB service

Then, run the mysql_secure_installation script to protect the database, where you can:

Set the root password (if you haven't set it in the configuration section above). Prohibit remote root login remove test database remove anonymous user overload permission configuration $sudo mysql_secure_installation

Secure MariaDB installation

5. Once the database server is protected, you can use the following shell command to view the installed version and log in to MariaDB:

$mysql-V $mysql-u root-p

The above is all the contents of the article "how to install MariaDB 10 in Debian and buntu". Thank you for reading! Hope to share the content to help you, more related knowledge, 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