yum install gcc gcc-c++ ncurses-devel perl wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz tar -xzvf cmake-2.8.10.2.tar.gz cd cmake-2.8.10.2 ./bootstrap make && make install wget http://ftp.gnu.org/gnu/bison/bison-2.5.tar.gz tar zxvf bison-2.5.tar.gz cd bison-2.5 ./configure make make install groupadd MysqL adduser -g MysqL MysqL chown -R MysqL.MysqL /usr/local/MysqL/ cd /usr/local/MysqL-5.5 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/MysqL -DMysqL_UNIX_ADDR=/usr/local/MysqL/MysqL.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMysqL_DATADIR=/usr/local/MysqL/data -DMysqL_TCP_PORT=3306 -DENABLE_DOWNLOADS=1 make && make install cd /usr/local/MysqL scripts/MysqL_install_db --user=MysqL --datadir=/usr/local/data /usr/local/MysqL/scripts/MysqL_install_db --user=MysqL --datadir=/usr/local/MysqL/data --basedir=/usr/local/MysqL --collation-server=utf8_general_ci cp /usr/local/MysqL/support-files/my-default.cnf /etc/my.cnf cp /usr/local/MysqL/support-files/MysqL.server /etc/init.d/MysqLd vi /etc/my.ini [MysqLd] datadir = /data/MysqL socket = /tmp/MysqL.sock pid-file = /data/logs/MysqL/MysqL.pid user = MysqL port = 3306 default_storage_engine = InnoDB # InnoDB #innodb_buffer_pool_size = 128M #innodb_log_file_size = 48M innodb_file_per_table = 1 innodb_flush_method = O_DIRECT # MyISAM #key_buffer_size = 48M # character-set character-set-server=utf8 collation-server=utf8_general_ci # name-resolve skip-host-cache skip-name-resolve # LOG log_error = /data/logs/MysqL/MysqL-error.log long_query_time = 1 slow-query-log slow_query_log_file = /data/logs/MysqL/MysqL-slow.log # Others explicit_defaults_for_timestamp=true #max_connections = 500 open_files_limit = 65535 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [client] socket = /tmp/MysqL.sock port = 3306 vi /etc/profile PATH=/usr/local/MysqL/bin:/usr/local/MysqL/lib:$PATH service MysqLd start chkconfig --level 35 MysqLd on grant all privileges on *.* to root@"%" identified by '123456' with grant option; flush privileges;