[root@mailmysql-5.5.13]# cmake .-DCMAKE_INSTALL_PREFIX=/software/mysql/ -DMYSQL_DATADIR=/storage/db/mysql_data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_SSL=system -DWITH_ZLIB=system-DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1-DWITH_MYISAM_STORAGE_ENGINE=1 -DSYSCONFDIR=/etc/mysql -DMYSQL_TCP_PORT=7454 -DWITH_DEBUG=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1-DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1
【openssl未安装成功】
[root@mailmysql-5.5.13]# make &&make install
[root@mailmysql-5.5.13]# cp./support-files/my-innodb-heavy-4G.cnf /etc/mysql/my.cnf
[root@mailmysql-5.5.13]# chown -R mysql/storage/db/mysql_data/
[root@mailmysql-5.5.13]# chgrp -R mysql/storage/db/mysql_data/
[root@mailmysql-5.5.13]#/software/mysql/scripts/mysql_install_db --basedir=/software/mysql/--user=mysql --datadir=/storage/db/mysql_data/
[root@mailmysql-5.5.13]# cp./support-files/mysql.server /etc/init.d/mysqld【注意路径】
[root@mailmysql-5.5.13]# chmod 755/etc/init.d/mysqld
[root@mailmysql-5.5.13]# vim/etc/init.d/mysqld
basedir=/software/mysql
datadir=/storage/db/mysql_data
[root@mailmysql_data]# /etc/init.d/mysqldstart
StartingMySQL[ OK ]
[root@mail bin]# vim /etc/profile
exportPATH=$PATH:/software/mysql/bin
[root@mail bin]# source /etc/profile
[root@mail bin]# mysql
Welcome to theMySQL monitor. Commands end with ; or\g.
Your MySQLconnection id is 2
Server version:5.5.13-log Source distribution
Copyright (c)2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is aregistered trademark of Oracle Corporation and/or its
affiliates. Othernames may be trademarks of their respective
owners.
Type 'help;' or'\h' for help. Type '\c' to clear the current input statement.
mysql>
[root@mail ~]# chkconfig mysqld on
[root@mail ~]# chkconfig --level 24 mysqld off
[root@mail ~]# chkconfig --list mysqld
mysqld 0:off 1:off 2:off 3:on 4:off 5:on 6:off
[root@mail lib]# vim /etc/ld.so.conf
/software/mysql/lib
[root@mail ~]# ldconfig -v |grep mysql
/software/mysql/lib:
libmysqlclient.so.18 ->libmysqlclient_r.so.18.0.0
参考: