How to Upgrade MySQL and Install MariaDB 10.2 on Ubuntu 18.04 LTS and 16.04 LTS 3
Linux,  VestaCP

How to Upgrade MySQL and Install MariaDB 10.2 on Ubuntu 18.04 LTS and 16.04 LTS

In this tutorial we’ll upgrade/install to Mariadb 10.2 on Ubuntu 18.04 LTS, 16.04 LTS and with vestacp when you install MySQL version 5.7 will be install on Ubuntu 16 and 18. This tutorial will also work with vestacp installed soon 18.04 will be supported by vestacp. MariaDB is designed as a drop-in replacement of MySQL with more features, new storage engines, fewer bugs, and better performance. MariaDB is developed by many of the original developers of MySQL who now work for the MariaDB Foundation and the MariaDB Corporation, and by many people in the community. To upgrade follow this simple steps to upgrade it to latest version.

How to Upgrade MySQL and Install MariaDB 10.2 on Ubuntu 18.04 LTS and 16.04 LTS 4

Login as root and follow the commands one by one.

First Add mariadb apt repository :

For 18.04 LTS :

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] http://mariadb.biz.net.id/repo/10.2/ubuntu bionic main'

For 16.04 LTS :

apt-get install software-properties-common
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mariadb.biz.net.id/repo/10.2/ubuntu xenial main'

To Upgrade :

This is only for the upgrade and follow this commands :-

Stop and remove MySQL server :

service mysql stop
apt remove mysql-client mysql-client-core  mysql-server mysql-server-core
or
apt remove mysql-server

Now we’ll Update/install

apt update
apt install mariadb-server

When the installer ask for the password just leave it blank it will ask to set the password 3-4 times for all time leave the password blank (imp when upgrading from mysql to mariadb only)

Well Mariadb is now installed and you just need to start mariadb server and upgrade the database :

service mysql start

Now upgrade the database :

mysql_upgrade

To Install :

This is only for fresh installation don’t use it for the upgrade.

apt update
apt install mariadb-server

When it will ask you to enter root password please enter and remember the password, after successful installation start the mariadb server :

service mysql start

For VestaCP only extra config :

rm -rf /etc/mysql/my.cnf
ln -s /etc/mysql/mysql.cnf /etc/mysql/my.cnf

thats it you can login as root for the checks.

Nguồn

Tui là Nguyễn Xuân Bình Minh

Để lại một bình luận

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Website này sử dụng Akismet để hạn chế spam. Tìm hiểu bình luận của bạn được duyệt như thế nào.