四川移动端网站建设,深圳最近流感多吗,cms 做网站模板,网站统计访客数量怎么做背景#xff1a;现有mysql版本为5.5.40#xff0c;考虑到以后需做主从#xff0c;而5.6在主从方面、mysql读写方面都有很大提升。所以#xff0c;准备升级。官网#xff1a;http://www.mysql.com/环境#xff1a;centos6.5 X86_64安装目录#xff1a;/database/mysql解压…背景现有mysql版本为5.5.40考虑到以后需做主从而5.6在主从方面、mysql读写方面都有很大提升。所以准备升级。官网http://www.mysql.com/环境centos6.5 X86_64安装目录/database/mysql解压目录/database/mysql-5-6-24数据存放目录/database/sqldata1、安装依赖包yum install gcc gcc-c -yyum install -y ncurses-develyum install -y openssl-devel(不安装会报错见后文)yum install -y cmakeyum install -y libaioyum install -y bison2、创建mysql用户用户组groupadd mysqluseradd -g mysql mysql3、cmake编译tar –zxvf mysql-5.6.24.tar.gzcd mysql-5-6-24cmake -DCMAKE_INSTALL_PREFIX:PATH/database/mysql -DMYSQL_DATADIR:PATH/database/sqldata -DEXTRA_CHARSETSall -DENABLED_LOCAL_INFILE1 -DWITH_READLINE1 -DMYSQL_USERmysql -DENABLED_LOCAL_INFILE1 -DWITH_SSLyes报错CMake Error at cmake/ssl.cmake:83 (MESSAGE):Cannot find appropriate system libraries for SSL. Use WITH_SSLbundled toenable SSL supportCall Stack (most recent call first):CMakeLists.txt:255 (MYSQL_CHECK_SSL)解决安装openssl-devel,然后rm CMakeCache.txt。重新运行以上命令。make make install次步时间比较长。#添加PATHecho PATH$PATH:/database/mysql/bin /etc/profilesource /etc/profile#修改目录权限chown -R mysql:mysql /database/mysqlchown -R mysql:mysql /database/sqldata#拷贝配置文件cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf#设置my.conf 在[mysqld]中设置datadir/database/sqldata#初始化scripts/mysql_install_db --usermysql --datadir/database/sqldata --basedir/database/mysql日志To start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/db1/mysql/bin/mysqladmin -u root password ‘new-password‘/db1/mysql/bin/mysqladmin -u root -h shekou password ‘new-password‘Alternatively you can run:/db1/mysql/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers.See the manual for more instructions.You can start the MySQL daemon with:cd . ; /db1/mysql/bin/mysqld_safe You can test the MySQL daemon with mysql-test-run.plcd mysql-test ; perl mysql-test-run.plPlease report any problems at http://bugs.mysql.com/The latest information about MySQL is available on the web athttp://www.mysql.comSupport MySQL by buying support/licenses at http://shop.mysql.comWARNING: Found existing config file /db1/mysql/my.cnf on the system.Because this file might be in use, it was not replaced,but was used in bootstrap (unless you used --defaults-file)and when you later start the server.The new default config file was created as /db1/mysql/my-new.cnf,please compare it with your file and take the changes you need.#设置mysql服务cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysqldchkconfig --add mysqldservice mysql start#空密码登陆mysqlmysql4、mysql优化及其他操作(详见其他文章)原文http://strongit.blog.51cto.com/10020534/1775494