MySQL编译安装详解
来源:互联网 发布:hp61墨盒清零软件 编辑:程序博客网 时间:2024/04/30 07:22
首先看gcc编译工具是否安装好了:
yum install -y gcc-*
相关rpm依赖包如下:
依赖包:
编译安装MySQL5.1.50
[root@xen_202_14 install]# useradd mysql
[root@xen_202_14 install]# pwd
/tmp/install
[root@xen_202_14 install]# ll
total 23224
-rw-r--r-- 1 root root 23750564 Mar 4 09:51 mysql-5.1.50.tar.gz
[root@xen_202_14 install]# tar -xzvf mysql-5.1.50.tar.gz
[root@xen_202_14 install]# ll
total 23228
drwxrwxrwx 33 7155 wheel 4096 Mar 4 11:07 mysql-5.1.50
-rw-r--r-- 1 root root 23750564 Mar 4 09:51 mysql-5.1.50.tar.gz
[root@xen_202_14 mysql-5.1.50]#./configure --prefix=/usr/local/mysql --datadir=/data/mysql/data --enable-assembler --with-client-ldflags=--all-static --with-unix-socket --with-charset=utf8 --enable-thread-safe-client --with-pthread --without-debug --with-big-tables --enable-community-features --enable-profiling --enable-local-infile --with-fast-mutexes --with-plugins=partition,federated,ndbcluster,innobase,csv,blackhole,myisam,innodb_plugin
[root@xen_202_14 mysql-5.1.50]# make
[root@xen_202_14 mysql-5.1.50]# strip sql/mysqld
[root@xen_202_14 mysql-5.1.50]# make install
[root@xen_202_14 mysql-5.1.50]# cp support-files/my-medium.cnf /etc/my.cnf
[root@xen_202_14 mysql-5.1.50]# cp support-files/mysql.server /etc/init.d/mysqld
[root@xen_202_14 mysql-5.1.50]# chmod u+x /etc/init.d/mysqld
[root@xen_202_14 mysql-5.1.50]# chkconfig --add mysqld (chkconfig中无此项服务时执行)
[root@xen_202_14 mysql-5.1.50]# /usr/local/mysql/bin/mysql_install_db --user=mysql --datadir=/data/mysql/data
[root@xen_202_14 mysql-5.1.50]# chown -R mysql.mysql /data/mysql/
[root@xen_202_14 mysql-5.1.50]# service mysqld start
[root@xen_202_14 mysql-5.1.50]# /usr/local/mysql/bin/mysqladmin -u root password '123456'
[root@xen_202_14 mysql-5.1.50]# echo "PATH=\"/usr/local/mysql/bin:/data/bin/:\$PATH\"" >> /etc/profile
[root@xen_202_14 mysql-5.1.50]# export PATH="/usr/local/mysql/bin:/data/bin/:$PATH"
[root@xen_202_14 mysql-5.1.50]# mysql -uroot -p123456
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 26287
Server version: 5.1.50-log Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
0 0
- MySQL编译安装详解
- MySQL-5.7.19编译安装详解!
- Linux下MySQL 5.5.x 编译安装详解
- 基于apache + mysql + php编译安装过程详解
- CentOS下MySQL 5.7.9编译安装步骤详解
- 编译安装httpd,nginx,mysql,yum命令详解
- MySQL 编译参数详解
- mysql 编译参数详解
- mysql 编译安装
- mysql 5 编译安装
- mysql编译安装优化
- mysql编译安装
- ubuntu11 编译安装mysql
- mysql 5.1 编译安装
- mysql 编译安装
- mysql编译安装
- mysql的编译安装
- MySQL编译安装笔记
- C++中抽象类和接口类的区别
- jQuery拖拽布局插件Portal
- C# 心得
- POJ 2253 Frogger (Floyd)
- Cacti 监控华为5700交换机总流量
- MySQL编译安装详解
- 在安卓开发时,鼠标停留,却无法显示帮助文档,显示This element neither has attached source nor attached Javadoc
- 汉诺塔问题(递归过程解析)
- 帧、行、场
- 《卓越程序员密码》
- 在Objective-C中实现Delegate:协议
- Let us learn C in Code <10>
- 如何设置控件的背景为透明的
- NYOJ 6 喷水装置(一)