Mysql5.5.28.tar.gz compilation and Installation notes 1. yum installation dependency package yum install wget gcc-c ++ make cmake ncurses-devel libtool zilib-devel-y 2. Create mysql useradd-s/ sbin/nologin-M mysql 3. Compile and install mysqlcmake-DCMAKE_INSTALL_PREFIX =/usr/local/mysql \-DMYSQL_UNIX_ADDR =/data/mysql. sock \-DDEFAULT_CHARSET = utf8 \-DDEFAULT_COLLATION = utf8_general_ci \-DWITH_EXTRA_CHARSETS: STRING = utf8, gbk \-records = 1 \-DWITH_READLINE = 1 \-DENABLED_LOCAL_INFILE = 1 \-DMYSQL_DATADIR =/data/mysql/\-DMYSQL_USER = mysql \-DMYSQL_TCP_PORT = 3306 make & make install 4. Modify the mysql configuration file cp support-files/my-medium.cnf/etc/my. cnfcp support-files/mysql. server/etc/init. d/mysqldchmod 755/etc/init. d/mysqld 5. initialize mysqlbash scripts/mysql_install_db -- user = mysql -- basedir =/usr/local/mysql -- datadir =/data/mysql/6. Start the service/etc/init. d/mysqld start 7. Configure mysql user/usr/local/mysql/bin/mysqladmin-u root password 123/usr/local/mysql/bin/mysql-u root-p