mysql5.6.12 源码安装记录
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql5.6.12 源码安装记录相关的知识,希望对你有一定的参考价值。
安装的是mysql5.6.12 资源是从csdn上下载的,官网没找到这个版本
编译:
cmake -DCMAKE_ISTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DMYSQL_USER=mysql -DDEFAULT_COLLATION=utf8_general_ci
若编译使用utf8字符集 一定要修改默认的collation 否则默认是latin 会有问题
然后make &&make install
然后切换到软件路径下 执行初始化脚本 在scripts下
./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/mysql.pid --tmpdir=/tmp
指定tmp路径 pid 运行用户 主目录 数据目录
初始化 看见俩OK即成功
然后创建etc文件夹 将my.cnf拷贝过来,然后打开 ,修改:
[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 = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. #log_bin = datadir = /usr/local/mysql/data log-error = /var/lib/mysql/mysql.error general_log = 1 general_log_file = /var/lib/mysql/mysql.log # These are commonly set, remove the # and set as required. user = mysql basedir = /usr/local/mysql tmpdir = /tmp # datadir = ..... port = 3306 server_id = 10 #socket = .... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
然后将support-file里的mysql.server 拷贝到/etc/init.d/
cp mysql.server /etc/init.d/mysql5
service mysql5 start。。。success
cd bin ,执行./mysql
ok~
这个是从网上看的 具体没遇到过:
如果出现这个错误:--MySQL 5.6.12 --Packaging as: mysql-5.6.12-Linux-x86_64 --Could NOT find Threads (missing: Threads_FOUND) --Could NOT find Threads (missing: Threads_FOUND) --Check if the system is big endian --Searching 16 bit interger CMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:31 (MESSAGE): no suitable type found Call Stack (most recent call first): configure.cmake:621 (TEST_BIG_ENDIAN) CMakeLists.txt:314 (INCLUDE) 解决方法很简单,只要把CMakeCache.txt 这个文件删掉就可以了,编译完后会重新生成。~~~
本文出自 “FOR THE DREAM” 博客,请务必保留此出处http://forthedream.blog.51cto.com/11242688/1883951
以上是关于mysql5.6.12 源码安装记录的主要内容,如果未能解决你的问题,请参考以下文章
Android 插件化VirtualApp 源码分析 ( 目前的 API 现状 | 安装应用源码分析 | 安装按钮执行的操作 | 返回到 HomeActivity 执行的操作 )(代码片段
Mysql 5.6.12 Group_concat 与内部连接问题
[未解决问题记录]python asyncio+aiohttp出现Exception ignored:RuntimeError('Event loop is closed')(代码片段