首页 / 数据库 / MySQL / MYSQL使用心得(一) centOS or ubuntu下安装mysql5.6
MYSQL使用心得(一) centOS or ubuntu下安装mysql5.62014-05-12 iteye 85977328官方网站http://www.mysql.com/下载downloads(GA)--> MySQL Community Edition (GPL)安装依赖centosyum install gcc gcc-c++ ncurses-devel zip make cmakeubuntuapt-get install gcc g++ cmake make libncurses5-dev bison zip解压缩tar -zxvf mysql-5.6.14.tar.gz注意:源码目录和安装目录不要使用同一目录!清理环境rm -rf /etc/my.cnfuserdel mysqlgroupdel mysql安装mysqlcmake -DCMAKE_INSTALL_PREFIX=/application/search/mysql/mysql-5.6.14 -DMYSQL_DATADIR=/data0/search/mysql/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -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 -DENABLED_LOCAL_INFILE=1注:如果想重新cmake,则需要删除目录下的 rm -rf CMakeCache.txtmake -j16 && make install -j16=====================================================修改配置文件 /application/search/mysql/mysql-5.6.14/tmp/my.cnf配置文件是5.5和5.6最关键的区别=====================================================# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# *** DO NOT EDIT THIS FILE. It"s a template which will be copied to the# *** default location during install, and will be replaced if you# *** upgrade to a newer version of MySQL.# 用户客户端bin目录下直接登录使用[client]port = 3306socket = /application/search/mysql/mysql-5.6.14/tmp/mysql.sock[mysql]default-character-set=utf8[mysqld]# Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.innodb_buffer_pool_size = 1024Minnodb_data_file_path = ibdata1:64M:autoextendinnodb_log_file_size = 1Ginnodb_log_files_in_group = 3innodb_log_buffer_size = 8Minnodb_flush_log_at_trx_commit = 0innodb_use_sys_malloc = 0