RPM Package Format MySQL Installation

Source: Internet
Author: User
Tags mysql command line

1. Download the RPM package required for MySQL installation

http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.21-1.linux_glibc2.5. x86_64.rpmhttp:// cdn.mysql.com/downloads/mysql-5.6/mysql-client-5.6.21-1.linux_glibc2.5. x86_64.rpmhttp://cdn.mysql.com /downloads/mysql-5.6/mysql-devel-5.6.21-1.linux_glibc2.5.x86_64.rpm

2. Installation

[[email protected] softs] #
[[email protected] softs] # RPM-IVH mysql-client-5.6.21-1.linux_glibc2.5.x86_64.rpm
[[email protected] softs] # RPM-IVH mysql-devel-5.6.21-1.linux_glibc2.5.x86_64.rpm

During the installation, MySQL will be a random password to the root user, the password is stored in the/root/.mysql_secret

MySQL installation directory information:

Directory Contents of Directory
/usr/bin Client Programs and Scripts
/usr/sbin The mysqld server
/var/lib/mysql Log files, databases
/usr/share/info Manual in Info format
/usr/share/man Unix manual Pages
/usr/include/mysql Include (header) files
/usr/lib/mysql Libraries
/usr/share/mysql Miscellaneous support files, including error messages, character set files, sample configuration files, SQL for database I Nstallation
/usr/share/sql-bench Benchmarks

3. Start MySQL:

[[Email protected] ~] # service MySQL start starting MySQL                                          ... Determine [Root@Luxh -01 ~]#  service mysql statusMySQL running (3270)                                       [OK]

4. Log in to MySQL

[[Email protected] ~] # mysql-uroot-p

Enter a random password generated during installation to log in to the MySQL command line interface

5. Change the root user password

mysql> Set Password = password ('123456');

6, copy/usr/share/mysql/my-default.cnf to/ETC/MY.CNF

[[email protected] MySQL] # pwd/usr/share/mysql[root@Luxh -01 MySQL]#  cp my-default.cnf/etc/my.cnf[email protected] [MySQL]#

Then according to the actual needs can be modified/ETC/MY.CNF, modified after the restart of MySQL can

7. Allow Root Login

Mysql> Grant All on * * to [email protected]'%'"123456"   0 rows affected (0.02  sec) MySQL>0 rows affected (0.00  sec) MySQL

  

RPM Package Format MySQL Installation

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.