Linux MySQL installation, remote access, and password reset

Source: Internet
Author: User

Installation:

Yum install MySQL

Yum Install Mysql-server

Yum Install Mysql-devel

Set boot up:

Chkconfig-add mysqld

See if boot boot settings are successful chkconfig--list | grep mysql*, the result should be as follows:

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

To create a root administrator:

Mysqladmin-u Root Password 123456

Reset Password:

Service Mysqld Stop

Mysqld_safe--skip-grant-tables &

Note that the final & symbol must not be less

Mysql-u Root

Use MySQL;

Update user set Password=password ("New_pass") where user= "root";

Flush privileges;

Quit

MySQL Related directories:

Database directory

/var/lib/mysql/

Configuration file

/usr/share/mysql (mysql.server command and configuration file)

Related commands

/usr/bin (Mysqladmin mysqldump and other commands)

Startup scripts

/etc/rc.d/init.d/(startup script file for MySQL directory)

Linux MySQL installation, remote access, and password reset

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.