博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Linux下源码编译安装MySQL 5.5.8
阅读量:6308 次
发布时间:2019-06-22

本文共 1799 字,大约阅读时间需要 5 分钟。

准备工作:新建用户和用户组groupadd mysqluseradd -g mysql mysql1:下载:bison-2.4.2.tar.bz2cmake-2.8.3.tar.gzmake-3.82.tar.gzbzr-2.3b5.tar.gzmysql-5.5.8.tar.gz2:解压安装前3个包tar zxvf  cmake-2.8.3.tar.gzcd cmake-2.8.3./configuremakemake installtar zxvf make-3.82.tar.gzcd make-3.8.2./configuremakemake installtar jxvf bison-2.4.2.tar.bz2cd bison-2.4.2./configuremakemake install3:解压mysql-5.5.8.tar.gztar zxvf mysql-5.5.8.tar.gzcd mysql-5.5.8cmake . \-DCMAKE_INSTALL_PREFIX=/mysql/mysqldir \-DMYSQL_DATADIR=/mysql/mysqldir/data \-DWITH_INNOBASE_STORAGE_ENGINE=1 \-DMYSQL_TCP_PORT=3306 \-DMYSQL_UNIX_ADDR==/mysql/mysqldir/data/mysql.sock \-DMYSQL_USER=mysql \-DWITH_DEBUG=0报错(如无报错直接make & make install 即可):CMake Error at cmake/readline.cmake:82 (MESSAGE):Curses library not found.  Please install appropriate package,remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on RedHat and derivates it is ncurses-devel.Call Stack (most recent call first):cmake/readline.cmake:126 (FIND_CURSES)cmake/readline.cmake:216 (MYSQL_USE_BUNDLED_LIBEDIT)CMakeLists.txt:256 (MYSQL_CHECK_READLINE)-- Configuring incomplete, errors occurred!缺少包:ncurses-devel解决:到安装光盘或者网上DOWN相应的包安装:rpm -ivh ncurses-devel*.rpmrm -f CMakeCache.txtcmake . \-DCMAKE_INSTALL_PREFIX=/mysql/mysqldir \-DMYSQL_DATADIR=/mysql/mysqldir/data \-DWITH_INNOBASE_STORAGE_ENGINE=1 \-DMYSQL_TCP_PORT=3306 \-DMYSQL_UNIX_ADDR==/mysql/mysqldir/data/mysql.sock \-DMYSQL_USER=mysql \-DWITH_DEBUG=0makemake install完成后进入MYSQL安装目录cd /mysql/mysqldircp support-files/my-huge.cnf /etc/my.cnfvi /etc/my.cnf将数据目录和套接字文件修改为实际值.修改权限chown mysql:mysql /etc/my.cnfchown -R mysql:mysql /mysql/mysqldir切换用户进入安装目录su - mysqlcd /mysql/mysqldircp scripts/mysql_install_db ../mysql_install_db启动MYSQLbin/mysqld_safe &OK

转载于:https://www.cnblogs.com/bugs/p/3208814.html

你可能感兴趣的文章
Hadoop集群完全分布式安装
查看>>
QString,char,string之间赋值
查看>>
我的友情链接
查看>>
Nginx+mysql+php-fpm负载均衡配置实例
查看>>
shell脚本操作mysql数据库 (部份参考)
查看>>
MySql之基于ssl安全连接的主从复制
查看>>
informix的逻辑日志和物理日志分析
查看>>
VMware.Workstation Linux与windows实现文件夹共享
查看>>
ARM inlinehook小结
查看>>
wordpress admin https + nginx反向代理配置
查看>>
管理/var/spool/clientmqueue/下的大文件
查看>>
HTML学习笔记1—HTML基础
查看>>
mysql dba系统学习(20)mysql存储引擎MyISAM
查看>>
centos 5.5 64 php imagick 模块错误处理记录
查看>>
apache中文url日志分析--php十六进制字符串转换
查看>>
Ansible--playbook介绍
查看>>
浅谈代理
查看>>
php创建桌面快捷方式实现方法
查看>>
基于jquery实现的超酷动画源码
查看>>
fl包下的TransitionManager的使用
查看>>