江西中创建设工程有限公司网站,营销网站的基本要素,wordpress 中文插件大全,公司宣传彩页设计模板mysql版本5.5以上编译安装时需要用到软件cmake#xff0c;cmake特性是独立于源码编译#xff0c;编译工作可以在另外一个目录中而非源码目录中进行#xff0c;mysql版本5.5以上编译安装时需要用到软件cmake#xff0c;cmake特性是独立于源码编译#xff0c;编译工作可以在…mysql版本5.5以上编译安装时需要用到软件cmakecmake特性是独立于源码编译编译工作可以在另外一个目录中而非源码目录中进行mysql版本5.5以上编译安装时需要用到软件cmakecmake特性是独立于源码编译编译工作可以在另外一个目录中而非源码目录中进行好处是可以保证源码目录不受任何一次编译的影响。1.下载安装cmake[rootlinuxidc ~]# wget[rootlinuxidc ~]# tar zxvf cmake-2.8.11.2.tar.gz[rootlinuxidc ~]# cd cmake-2.8.11.2[rootlinuxidc ~]# ./bootstrap[rootlinuxidc ~]# make make installcmake安装完成2.安装mysql5.5以上的版本[rootlinuxidc ~]# wget ://cdn.mysql.com/[rootlinuxidc ~]# tar zxvf mysql-5.6.13.tar.gz[rootlinuxidc ~]# cd mysql-5.6.13[rootlinuxidc ~]# cmake -DCMAKE_INSTALL_PREFIX/opt/mysql -DMYSQL_UNIX_ADDR/tmp/mysql.sock -DDEFAULT_CHARSETutf8 -DDEFAULT_COLLATIONutf8_general_ci -DWITH_EXTRA_CHARSETSall -DWITH_INNOBASE_STORAGE_ENGINE1 -DWITH_ARCHIVE_STORAGE_ENGINE1 -DWITH_BLACKHOLE_STORAGE_ENGINE1 -DWITH_PERFSCHEMA_STORAGE_ENGINE1 -DWITH_SSLyes -DENABLED_LOCAL_INFILE13.mysql安装后的设置1.修改权限[rootlinuxidc ~]# chown -R root.mysql /opt/mysql/[rootlinuxidc ~]# chown -R mysql.mysql /opt/mysql/data/2.初始化数据库[rootlinuxidc ~]# /opt/mysql/scripts/mysql_install_db --usermysqlFATAL ERROR: Could not find ./bin/my_print_defaultsIf you compiled from source, you need to run make install tocopy the software into the correct location ready for operation.If you are using a binary release, you must either be at the toplevel of the extracted archive, or pass the --basedir optionpointing to that location.#初始化碰到这个错误是因为没有指定安装目录以及存放数据的目录[rootlinuxidc ~]# /opt/mysql/scripts/mysql_install_db --usermysql --basedir/opt/mysql/ --datadir/opt/mysql/data/3.复制配置文件my.cnf[rootlinuxidc ~]# cp /opt/mysql/support-files/my-default.cnf /etc/my.cnf4.启动[rootlinuxidc ~]# /opt/mysql/bin/mysqld_safe [1] 18401[rootlinuxidc ~]# 130909 23:28:07 mysqld_safe Logging to /opt/mysql/data/linuxidc.err.130909 23:28:07 mysqld_safe Starting mysqld daemon with databases from /opt/mysql/data[rootlinuxidc ~]# ps -ef | grep mysqlroot 18401 22774 2 23:28 pts/0 00:00:00 /bin/sh /opt/mysql/bin/mysqld_safemysql 18491 18401 81 23:28 pts/0 00:00:03 /opt/mysql/bin/mysqld --basedir/opt/mysql --datadir/opt/mysql/data --plugin-dir/opt/mysql/lib/plugin --usermysql --log-error/opt/mysql/data/linuxidc.err --pid-file/opt/mysql/data/linuxidc.pidroot 18515 18245 0 23:28 pts/2 00:00:00 grep mysqlcmake编译参数详解-DCMAKE_INSTALL_PREFIXdir_name 用于指定安装目录-DWITH_INNOBASE_STORAGE_ENGINE1-DWITH_ARCHIVE_STORAGE_ENGINE1-DWITH_BLACKHOLE_STORAGE_ENGINE1-DWITH_PERFSCHEMA_STORAGE_ENGINE1 常用存储引擎参数设置-DDEFAULT_CHARSETcharset_nameThe server character set. By default, MySQL uses the latin1 (cp1252 West European) character set.charset_name may be one of binary, armscii8, ascii, big5, cp1250, cp1251, cp1256, cp1257, cp850, cp852, cp866, cp932, dec8, eucjpms, euckr, gb2312, gbk, geostd8, greek, hebrew, hp8, keybcs2, koi8r, koi8u, latin1, latin2, latin5, latin7, macce, macroman, sjis, swe7, tis620, ucs2, ujis, utf8, utf8mb4, utf16, utf16le, utf32. The permissible character sets are listed in the cmake/character_sets.cmake file as the value of CHARSETS_AVAILABLE.-DENABLED_LOCAL_INFILEbool bool值表示(1表示允许该功能0表示没有改功能)-DMYSQL_UNIX_ADDRfile_nameThe Unix socket file path on which the server listens for socket connections. This must be an absolute path name. The default is /tmp/mysql.sock.相关阅读基于Cmake编译安装MySQL 5.5使用Cmake方式安装mysql-5.5.10CentOS下 MySQL 5.5.13 Cmake 安装笔记Linux源码安装MySQL 5.6.12 (Cmake编译) 本条技术文章来源于互联网如果无意侵犯您的权益请点击此处反馈版权投诉本文系统来源php中文网