Prepare the database (MySQL). If you already have MySQL, you can ignore this. Connect to MySQL; Create a data table; mysql> create database demo; mysql> use demo; mysql> create table pet(name varchar(30), owner varchar(30), species varchar(20), sex char(1)); Add data table content; exit(); ---- Exit MySQL backup MySQL; Foreword, enable binary; Back up the data table; back up my.cnf; $ mysqldump --all-databases --user=root --password --master-data > backupdb.sql $ sudo cp /etc/mysql/my.cnf /opt/my.cnf.bak del MySQL; Stop the MySQL service; $ sudo service mysql stop //RHEL6 $ sudo systemctl stop mysql //RHEL7 $ sudo /etc/init.d/mysql stop //RHEL6 Remove MySQL configuration and files; $ sudo yum remove mysql* mysql-server mysql-devel mysql-libs $ sudo rm -rf /var/lib/mysql build mariadb; Install mariadb and related dependency packages; ....................................... //The following is the file content [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/5.5/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 ....................................... Restore the my.cnf file; Start mariadb; $ sudo service mariadb start $ sudo systemctl start mariadb $ sudo /etc/init.d/mariadb start MySQL ==>> MARIADB; Import the data table into mariadb; The following content appears, indicating that the login is successful; Congratulations; ......................................//The following is the sql command MariaDB [(none)]> show databases; MariaDB [(none)]> use test01; MariaDB [test01]> select * from pet; You may also be interested in:
|
>>: React+Koa example of implementing file upload
In this article, we will learn about the optimiza...
Docker basic instructions: Update Packages yum -y...
Table of contents Preface advantage: shortcoming:...
Table of contents Docker version Install Docker E...
Introduction There is no need to introduce Redis ...
CSS: Copy code The code is as follows: *{margin:0;...
Configure Mysql master-slave service implementati...
Table of contents 1. Use the "rpm -ivh insta...
Copy code The code is as follows: <object id=&...
Table of contents 1 Background 2 Create a contain...
Table of contents The significance of standard co...
Table of contents 1. writable: writable 2. enumer...
HTML to achieve simple ListViews effect Result: c...
To install Jenkins on CentOS 8, you need to use t...
The players we see on the web pages are nothing m...