看完INSTALL-SOURCE后记录下mysql 5.5安装的记录cmake需要单独安装myisam引擎默认加载,with_engine_storage_engine 加载innodb等引擎datadir=/data/mysqlgroupadd mysqluseradd -g mysql mysql -Mcmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DSYSCONFDIR=/etc -DMYSQL_DATADIR=/data/mysql/ -DWITH_engine_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8 -DWITH_EXTRA_CHARSETS=all -DENABLED_LOCAL_INFILE=1 -DDEFAULT_COLLATION=utf8_general_cimakemake install chown -R mysql:mysql /data/mysql初始化时指定datadir basedir/usr/local/mysql/scripts/mysql_install_db --user=mysql --datadir=/data/mysql/ --basedir=/usr/local/mysql/cp support-files/my-huge.cnf /etc/my.cnfcp support-files/mysql.server /etc/init.d/修改socket = /data/mysql/mysql.sockdatadir = /data/mysql启动/usr/local/mysql/bin/mysqld_safe --user=mysql & /etc/init.d/mysql.server start|stop