Yum command to install MySQL

Source: Internet
Author: User

Linux uses Yum to install MySQL, as well as start, login, and remote access.

1. Installation

See if you have installed:

          Yum List installed mysql*          -qa | grep mysql*

To see if there are any installation packages:

          Yum List mysql*

To install the MySQL client:

          Yum install MySQL

To install the MySQL server side:

          Yum install mysql-server          yum install MySQL-devel

2. Start && Stop

Database Character Set settings

          MySQL config file/etc/my.cnf added default-character-set=utf8

To start the MySQL service:

          Service mysqld start or/etc/init.d/mysqld start

Boot start:

          Chkconfig-add mysqld, check if boot boot settings are successful chkconfig--list | grep mysql*

          Mysqld             0: Off    1: Off    2: Enable    3: Enable    4: Enable    5 : Enable    6: Off

Stop it:

          Service Mysqld Stop

3. Login

To create a root administrator:

          123456

Login:

          Mysql-u Root-p Enter the password.

Forgot Password:

          service mysqld stop;           --user=root--skip-grant-tables;           -u root;          Use MySQL;           set Password=password ("new_pass"where user="  Root";          Flush privileges;  

4. Remote Access

Port number for open firewall

MySQL Add permission: The user table in the MySQL library has a new record of "%" and the user is "root".

5. Several important directories of Linux MySQL

Database Directory          /var/lib/mysql/ configuration file          /usr/share/mysql (mysql.server command and configuration file) related commands          /usr/  Bin (mysqladmin mysqldump, etc command) startup         script

Yum command to install 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.