Linux system installation MySQL

Source: Internet
Author: User
Tags mysql login

First, download the MySQL compression pack on Oracle's website

Download this tar package and upload it to the server via FTP, unzip it to the corresponding path by Xshell, check if the system has MARIADB installed, because it is the branch of MySQL, the two will have conflict with the installation of MySQL.
// check command Yum List installed | grep mariadb // Uninstall Command yum-y remove mariadb-libs.x86_64

Create a data directory for storing database tables
mkdir data
Install MySQL
./mysqld--initialize--user=mysql--datadir=/usr/local/mysql-5.7. /data--basedir=/usr/local/mysql-5.7.  -

After installing the initial password as above, need to record, for a MySQL login:. hoxyhvru3um

Enable security features to generate digital certificates
./mysql_ssl_rsa_setup--datadir=/usr/local/mysql-5.7. /data

Data certificate file

Assigning permissions to the entire MySQL installation directory
Chown-r mysql:mysql/usr/local/mysql-5. 7. /

Start MySQL
// & indicates booting from the background ./mysqld_safe &

// view process ps-ef|grep MySQL

Using MySQL
// executes in the bin directory ./mysql-uroot-P// paste password after execution

You need to change your password before entering
// Modify Password Statements ' Root '@'localhost'123456';

Before granting remote access, permissions on the native installation of MySQL, only native access to this MySQL, can be accessed by granting permissions to any server, or you can specify a server to access
Grant all privileges on * * to [email protected]'%'123456'  ; // WHERE * * The first * represents the database name, the second * represents all database tables // [email protected] '% ' root indicates the database user name,% is the IP address, you can also specify the specific IP address: [email protected] ' 135.149.96.53 '

Successful authorization via NAVICAT connection, successful connection

Quit MySQL

Turn off MySQL service
// turn off the MySQL service ./mysqladmin-uroot-p shutdown

The MySQL service is down.

Linux system installation 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.