MySQL installation in Linux

Source: Internet
Author: User

Steps:

1) View The MySQL that comes with CentOS

Input Rpm-qa | grep MySQL

2) Uninstall your own MySQL

3) upload MySQL to Linux

4) install mysql dependency (optional)

Yum-y Install libaio.so.1 libgcc_s.so.1 libstdc++.so.6

Yum Update libstdc++-4.4.7-4.el6.x86_64

5) unzip MySQL to/usr/local/under MySQL directory (MySQL directory needs to be created manually) within

Cd/usr/local

mkdir MySQL

TAR-XVF mysql-5.6.22-1.el6.i686.rpm-bundle.tar-c/usr/local/mysql

6) install MySQL under/usr/local/mysql

Install server side:RPM-IVH mysql-server-5.6.22-1.el6.i686.rpm

Install client:RPM-IVH mysql-client-5.6.22-1.el6.i686.rpm

7) start MySQL

Service MySQL Start

8) add MySQL to the system service and set the boot up

Join the system service:chkconfig--add MySQL

Auto Start:chkconfig MySQL on

9) Log in to MySQL

MySQL will generate a temporary random password when it is installed, and the storage location is/root/.mysql_secret.

Msyql–u root-p

Modify the MySQL password

Set password = password (' root ');

One) open remote login for MySQL

MySQL is not supported by default in MySQL for security purposes, so you need to set the right to log on to MySQL remotely .

After logging in to MySQL, enter the following command:

Grant all privileges on * * to ' root ' @ '% ' identified by ' root ';

Flush privileges;

Port 3306 for external access to open Linux

/sbin/iptables-i input-p TCP--dport 3306-j ACCEPT

/etc/rc.d/init.d/iptables Save---Persist changes to the firewall

MySQL installation in Linux

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.