How Linux installs data and simply uses MYSQL-MARIADB

Source: Internet
Author: User
Tags import database server port

A common relational database management system

– Microsoft's SQL Server

–IBM's DB2

– Oracle, MySQL for Oracle

– Community Open Source version MariaDB


MARIADB related package in RHEL7: Mariadb-server Port: 3306

I. Deployment of the MARIADB database

1. Installing the Mariadb-server database software

[Email protected] ~]# yum-y install Mariadb-server


2. Start the MARIADB service

[Email protected] ~]# systemctl restart MARIADB

[Email protected] ~]# Systemctl enable MARIADB


No monitoring, only for native

[Email protected] ~]# vim/etc/my.cnf #数据库主配置文件

[Mysqld]

Skip-networking #跳过网络监听


3.MARIADB The default user is root and we need to set a password for it:

Change password for database account

–mysqladmin [-u user name] [-p[old password]] password ' new password '


Enter database: Mysql-u root-p123

Show databases;//View Database

CREATE DATABASE AA//creating databases


MariaDB [(none)]> Interactive Instruction

– List database: show databases;

– Using/Selecting the database: Use database name;

– List What tables are in the library: show tables;

– Creating database: Create database name;

– Delete database: drop database name;


Import Database: mysql-u root-p[password] Database < backup file. sql

Export database: mysqldump-u root p[password] Database > export file. sql


Database authorization:

MariaDB [(none)]> Interactive Instruction

–grant permissions list on database name. Table name to User name @localhost

Identified by ' password ';

DESC user; #查看表结构






How Linux installs data and simply uses MYSQL-MARIADB

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.