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