1.yum
Yum-y install mysql-server MySQL
2.RPM Installation
http://dev.mysql.com/downloads/Download RPM Package, please confirm the server version, my is Red Hat 5.9, download is the following version, bundle is a collection package
Mysql-5.6.21-1.rhel5.x86_64.rpm-bundle.tar
[Email protected] ~]# cd/soft/[[email protected] soft]# ll Total608028-rwxr--r--1Root root310988800 Ten- - -: -mysql-5.6. +-1. Rhel5.x86_64.rpm-bundle.Tar-rw-r--r--1 7155Wheel23156366 the- A -: -mysql-client-5.6. +-1. rhel5.x86_64.rpm-rw-r--r--1 7155Wheel4579502 the- A -: -mysql-devel-5.6. +-1. rhel5.x86_64.rpm-rw-r--r--1 7155Wheel117279604 the- A -: -mysql-embedded-5.6. +-1. rhel5.x86_64.rpm-rw-r--r--1 7155Wheel88524802 the- A -: -mysql-server-5.6. +-1. rhel5.x86_64.rpm-rw-r--r--1 7155Wheel2404168 the- A -: -mysql-shared-5.6. +-1. rhel5.x86_64.rpm-rw-r--r--1 7155Wheel75030266 the- A -: -mysql-test-5.6. +-1. rhel5.x86_64.rpm
RPM-UVH mysql-*.rpm
' Root '@'localhost'=password ('root' 0 rows affected (0.07 sec)
Commands for 3.mysql
Show Databses;
Use MySQL;
Show tables;
Describe user;
Create DATABASE CMS;
Select Database ();
DATETIME (accounted for 8 bytes)
TIMESTAMP (% of 4 bytes)
DATE (4 bytes)
Year (% of 1 bytes)
Time (3 bytes)
MySQL installation and tuning under Linux