Online installation of MySQL in CENTOS7 environment

Source: Internet
Author: User

Uninstalling MARIADB

CentOS has MARIADB installed by default, so you need to uninstall the MARIADB installed in your system before you install MySQL.

    • View all installed MARIADB packages in the system. Command:rpm -qa | grep mariadb

    • Uninstall MARIADB. Command: rpm -e "mariadb的包名" .
    • If the dependency packet detection fails, you can use a command that forces the unload:rpm -e --nodeps "mariadb的包名"
Install MySQL source

In CentOS, use the CD command to enter the path where you want to save the file, and use the wget command to download the RPM package. Example: wget -c https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

Install the MySQL source. Command: rpm -ivh "下载下来的MySQL源包名" . For example: rpm -ivh mysql57-community-release-el7-11.noarch.rpm

Install MySQL
    • Use commands to yum list | grep mysql view MySQL packages that can be installed in the warehouse

    • Install MySQL:yum install mysql-server

    • To set the root account password for MySQL, refer to: MySQL decompression version installation configuration

    • Run MySQL:mysql -u root -p

View MySQL configuration file under Linux

Execute in turn:

    • which MySQL
    • /usr/bin/mysql
    • /usr/bin/mysql--verbose--help | Grep-a 1 ' Default options '

And then there will be some information like mine.

 from inch The given order:

The meaning of this message is:
The server first read the/etc/mysql/my.cnf file, if the previous file does not exist then continue to read the/etc/my.cnf file, if it does not exist will read the ~/.my.cnf file

Reference Blog: 53895982

Modify the MySQL configuration file

75532382

MySQL Exit command
MySQL exits three methods:
MySQL > exit;
MySQL > quit;
MySQL > \q;

Reference Blog: 78057718

Online installation of MySQL in CENTOS7 environment

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.