REDHAT7 Install mariadb (original MySQL)

Source: Internet
Author: User
Tags joins

REDHAT7 Install mariadb (original MySQL)


Installation:

# Yuminstall MARIADB Mariadb-server

Start up and boot up:

#systemctl Start mariadb

#systemctl Enable MARIADB

the root password for MySQL is empty at this time

# Mysql–uroot

    • User MySQL;

    • Update user set Password=password (' 123456 ') where user=root;

    • Flush privileges;

    • Quit

Open firewall:

#firewall-cmd–permanent–add-service=mysql

#firewall-cmd--reload

# vi/etc/my.cnf (mysqld )

skip-networking= 1 (closed remote connection via IP , default is allowed)

: Wq

Link Blur query

Link '%a% ' with the letter a in the middle

Link ' _a% ' ends with a

Link '%a_ ' begins with a

Statement examples (note distinguishing functions, fields, table names):

Select *from worker where Sal >= 2500;

Select *from Worker where sal! = 2500;

Select*from worker where Deptno in (2,4);

Select *from worker where Sal between and 2500;

Selectavg (SAL) from worker;

Selectmax (SAL) from worker;

Selectmin (SAL) from worker;

Select *from worker order by Deptno; (in ascending order)

Select *from worker order by deptno Desc; (descending order)

Selectdeptno,max (SAL) from the worker group by Deptno;

CreateTable Test AS SELECT * from worker;

Internal connection:

Selectstudent,sno,student.sname,coll.cname from student join Coll Onstudent.cno=coll.con;

Left Outer connection:

Select S.sno,s.sname,c.cnamefrom student as S left joins Coll as C on S.cno=c.cno;

Right connection:

Select S.sno,s.sname,c.cnamefrom Coll as c right joins student as s on S.CNO=C.CNO;


This article is from the "Linux" blog, so be sure to keep this source http://yangzhiming.blog.51cto.com/4849999/1721717

REDHAT7 Install mariadb (original MySQL)

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.