Yum install-y gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel*/ /install the compilation environment GCC
RZ uploads cmake-2.8.8.tar.gz and mysql-5.5.32.tar.gz
Tar XF cmake-2.8.8.tar.gz//Unzip make
CD cmake-2.8.8//Enter the CMake directory
./configure//Compile CMake
Gmake//Installation Gmake
Gmake Install//installation Gmake
Cd.. Exit CMake Directory
Groupadd MySQL//create Group
Useradd mysql-s/sbin/nologin-m-G MySQL//create user belongs to MySQL Group
Tar XF mysql-5.5.32.tar.gz//unzip MySQL
CD mysql-5.5.32//Enter MySQL directory
Enter the following and return to
CMake. -dcmake_install_prefix=/application/mysql-5.5.32 \
-dmysql_datadir=/application/mysql-5.5.32/data \
-dmysql_unix_addr=/application/mysql-5.5.32/tmp/mysql.sock \
-DEXTRA_CHARSETS=GBK,GB2312,UTF8,ASCII \
-denabled_local_infile=on \
-dwith_innobase_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwithout_example_storage_engine=1 \
-dwithout_partition_storage_engine=1 \
-dwith_fast_mutexes=1 \
-dwith_zlib=bundled \
-denabled_local_infile=1 \
-dwith_readline=1 \
-dwith_embedded_server=1 \
-dwith_debug=0
Make && make install//install MySQL
Ln-s/application/mysql-5.5.32//application/mysql//Create a soft connection
Cd.. Exit MySQL Directory
CP MYSQL-5.5.32/SUPPORT-FILES/MY-SMALL.CNF/ETC/MY.CNF
Echo ' Export path=/application/mysql/bin: $PATH ' >>/etc/profile//Edit environment variable
Source/etc/profile//Immediate effect
Chown-r mysql.mysq/application/mysql/data///user empowerment
Chmod-r 1777/tmp///Folder empowerment
cd/application/mysql/scripts///Enter the initialization directory
./mysql_install_db--basedir=/application/mysql/--datadir=/application/mysql/data/--user=mysql//Initialize MySQL
Cd.. Exit
cd/home/oldboy/tools/mysql-5.5.32//Enter directory
CP support-files/mysql.server/etc/init.d/mysqld//Create boot file
chmod +x/etc/init.d/mysqld//Folder empowerment
/etc/init.d/mysqld Start//startup MySQL Service
MySQL//Enter MySQL
Select User,host from Mysql.user; See if there are any empty users
Delete from mysql.user where user= '; Remove Empty users
Delete from Mysql.user where host= ':: 1 '; Deleted:: 1
Quit//Quit MySQL
/application/mysql//bin/mysqladmin-u root password ' oldboy123 '//Add password
Chkconfig mysqld on//Set boot up
mysql-uroot-poldboy123//test can be entered, password is correct
This article is from the "11104762" blog, please be sure to keep this source http://11114762.blog.51cto.com/11104762/1812556
Make install MySQL