mysql安装./depcomp_编译安装mysql及问题汇总
编译安装mysql
groupadd mysql
useradd -g mysql mysql
MYSQLFILE="mysql-5.1.24-rc.tar.gz"
tar -zvxf $MYSQLFILE
cd mysql-5.1.24-rc
'./configure' \
'--prefix=/usr/local/mysql' \
'--with-charset=utf8' \
'--with-extra-charsets=latin1,gbk,gb2312,ascii,big5'
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
#到此处已安装完成。可启动mysql:/usr/local/mysql/bin/mysqld_safe --user=mysql &
#关闭mysql:/usr/local/mysql/bin/mysqladmin -p shutdown
# 如下为添加mysql至服务
cp mysql-5.1.24-rc/support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod 775 /etc/rc.d/init.d/mysqld
chkconfig –add mysqld
然后启动即可--service mysqld start 自启动:chkconfig --level 35 mysqld on
添加至环境变量:
vi /etc/profile
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/mysql/lib
export LD_LIBRARY_PATH
PATH=$PATH:.:/usr/local/mysql/bin
export PATH
编译安装出现如下错误checking whether make sets $(MAKE)... yes
checking "character sets"... default: utf8, collation: utf8_general_ci; compiled in: utf8 latin1 utf8 latin1 gbk gb2312 ascii big5
checking whether to compile national Unicode collations... yes
checking for doxygen... no
checking for pdflatex... no
checking for makeindex... no
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.The solution is simple, run one of the following commands to install a C compiler:
未安装c语言编译环境!
解决办法:
CentOS: yum -y install gcc
Fedora: up2date -i gcc
./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=latin1,gbk,gb2312,ascii,big5
make[1]: Entering directory `/usr/local/software/tools/mysql-5.1.52/mysys'
source='my_new.cc' object='my_new.o' libtool=no
DEPDIR=.deps depmode=none /bin/sh ../depcomp
g++ -DDEFAULT_BASEDIR="/usr/local/mysql" -DMYSQL_DATADIR=""/usr/local/mysql/var"" -
DDEFAULT_CHARSET_HOME=""/usr/local/mysql"" -DSHAREDIR=""/usr/local/mysql/share/mysql"" -DDEFAULT_HOME_ENV=MYSQL_HOME -
DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX -DDEFAULT_SYSCONFDIR=""/usr/local/mysql/etc"" -DHAVE_CONFIG_H -I. -I../include
-I../include -I../include -I. -O -fno-implicit-templates -fno-exceptions -fno-rtti -c -o my_new.o my_new.cc
../depcomp: line 571: exec: g++: not found
make[1]: *** [my_new.o] Error 127
make[1]: Leaving directory `/usr/local/software/tools/mysql-5.1.52/mysys'
make: *** [all-recursive] Error 1
../depcomp: line 571: exec: g++: not found 提示这个是缺少:gcc-c++-3.4.6-3.i386.rpm
yum -y install gcc-c
3../include/my_global.h:909: error: redeclaration of C++ built-in type `bool'
make[2]: *** [my_new.o] Error 1
make[2]: Leaving directory `/home/tools/mysql-5.0.22/mysys'
make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/mysql-5.1' make: *** [all] Error 2
yum -y install ncurses-devel
根据提示安装累得半死,后来直接找到依赖包全部安装就好了!
依赖的开发包安装
yum -y install gcc glib gcc-c++ esound-devel ncurses-devel
mysql安装./depcomp_编译安装mysql及问题汇总相关推荐
- mysql 数据库安装命令_教你MySQL数据库的编译安装以及命令详解(5.7版本)
一.安装MySQL所需的环境依赖包 [root@localhost opt]# yum -y install gcc gcc-c++ make ncurses ncurses-devel bison ...
- mysql dba系统学习(1)mysql各版本编译安装
MySQL是一个关系型数据库管理系统,由瑞典MySQL AB公司开发,目前属于Oracle公司.MySQL是一种关联数据库管理系统,关联数据库将数据保存在不同的表中,而不是将所有数据放在一个大仓库内, ...
- mysql编译安装 rpm安装_Linux常用工具小结:(2) Mysql的rpm安装和编译安装
Mysql的rpm安装 1,下载. 2,安装. 下载到本地解压: tar -xvf MySQL-5.5.12-1.rhel5.x86_64.tar 安装以下rpm rpm -ivh MySQL-dev ...
- boost安装_编译安装Mysql详细步骤
1.编译安装mysql 首先关闭防火墙和selinux [root@localhost ~]# systemctl stop firewalld && setenforce 0 1.清 ...
- CentOS MySQL 5.7编译安装
CentOS MySQL 5.7编译安装 MySQL 5.7 GA版本的发布,也就是说从现在开始5.7已经可以在生产环境中使用,有任何问题官方都将立刻修复. MySQL 5.7主要特性: 更好的性能: ...
- Linux常用工具小结:(2) Mysql的rpm安装和编译安装
Mysql的rpm安装 1, 下载. 这里下载http://dev.mysql.com/downloads/mirror.php?id=402502. 2, 安装. 下载到本地解压: tar -xvf ...
- Linux/CentOS安装MySQL(RPM安装、编译安装)
2019独角兽企业重金招聘Python工程师标准>>> Linux/CentOS安装MySQL(RPM安装.编译安装) 目前最常用的MySQL安装方法也就是采用Yum安装RPM包,或 ...
- Linux高级实战部署--LNMP生产环境部署(mysql,nginx,php编译安装,项目部署)
LNMP生产环境部署 一.编译安装 MySQL MySQL 类型 #### 1.MySQL Community Server - MySQL Community Server是社区版本,开源免费,但不 ...
- nginx的yum安装和编译安装
一.什么是nginx? nginx是一个做网站服务器的软件,是静态的网站 html 写前端静态页面的语言 python,java,php,go等动态语言,写后端的,就是和数据库进行交互 二.nginx ...
最新文章
- SAP MM ME57界面看到的供应源跟Source List主数据不一致?
- 前端开发学习笔记 - 1. Node.JS安装笔记
- Namenode文件系统命名空间映像文件及修改日志
- C语言 __STDC__ - C语言零基础入门教程
- GeoServer地图开发解决方案(三):部署地图数据篇
- OpenShift 4 - 容器访问限速和Route访问限制流
- NetCDF文件介绍
- IDL | 语句练习
- Tensorflow CUDA及CUDNN版本对应关系表查询
- 计算机怎么盲打键盘,键盘指法,教您盲打及快速打字指法练习的步骤
- 谈逻辑与数学界线之淡化(修正版)
- GeForce Experience 安装时乱码解决
- Jmeter性能测试实践--登录场景设计
- hotmail邮箱pop3服务器设置方法
- 组织人事领域信息化探索:开启编制、干部、人事一体化管理新模式
- xmanager登陆linux黑屏,使用xmanager工具登陆linux服务器时黑屏问题
- 量化金融论文:Astock
- 关于发布后网站调用本地exe的曲线救国之路
- 巨变之下的网易财报:游戏出海动作加快,音乐毛利润首次转正
- spring boot spring data 整合 redis redis keys * 出现 \xac\xed\x00\x05t\x00) 编码异常