Redhat下的Mysql源码安装
来源:互联网 发布:oracle重启数据库 编辑:程序博客网 时间:2024/05/22 15:58
Redhat下的Mysql源码安装
Installing MySQL on Linux Using the MySQL Yum Repository
如果选择使用yum安装5.6版本
Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
shell> sudo yum install mysql-community-server
源码安装
Source Installation System Requirements
- CMake, which is used as the build framework on all platforms
- GNU make 3.75 or higher
- A working ANSI C++ compiler. GCC 4.2.1 or later
- erl is needed if you intend to run test scripts
How to Get MySQL
选择自己的系统进行下载 ,直接下载.tar.gz源码
http://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.31-linux-glibc2.5-x86_64.tar.gz
解压后的文件目录架构如下所示:
Directory Contents of Directory
bin, scripts mysqld server, client and utility programs
data Log files, databases
docs MySQL manual in Info format
man Unix manual pages
include Include (header) files
lib Libraries
share Miscellaneous support files, including error messages, sample configuration files, SQL for database installation
sql-bench Benchmarks
开始安装
建立用户,解压文件
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
自定义数据文件的保存文件
shell> mkdir -p /data/mysql
初始化mysql,basedir 是解压安装文件的目录
shell>/script/mysql_install_db –user=mysql –basedir=/usr/local/mysql/ –datadir=/data/mysql/
修改配置文件 ,并建立配置文件短链接
vi /usr/local/mysql/my.cnf
basedir = /usr/local/mysql
datadir = /data/mysql
ln -s /usr/local/mysql/my.cnf /etc/my.cnf
shell> cp support-files/mysql.server /etc/init.d/mysqld 将常用启动服务放到/etc/init文件中
增加环境变量
vi /etc/profile
export PATH=$PATH:/usr/local/mysql/bin
source /etc/profile 立即生效配置
service mysqld start 启动mysql程序
添加自动启动
chkconfig –add mysqld
chkconfig mysqld on
Mysql启动成功
- Redhat下的Mysql源码安装
- redhat下安装MySQL
- RedHat下安装mysql
- redhat as4 下mysql的安装
- mysql在redhat下的安装
- Redhat下mysql的安装与使用
- Linux (redhat 6.2) 下源码安装mysql (5.6.19)
- 数据库学习之--RedHat EL55下Mysql源码包安装
- redhat下源码安装ffmpeg
- redhat 5.4下安装MYSQL
- RedHat下安装MYSQL 5.5
- redhat 下卸载安装mysql
- 在redhat/centos下源码安装gcc的方法
- RedHat 6.3 源码安装 MySQL-5.5.29
- RedHat 6.3 源码安装 MySQL-5.5.29
- RedHat 9.0下用rpm包安装mysql的问题
- Linux 下 (RedHat 9.0) JDK,Tomcat,MySQL的安装
- Redhat下 Apache, php, mysql的默认安装路径
- Service与IntentService
- 缓存
- socket编程之select,poll,epoll
- Python用for循环来遍历list时,for循环体内有改动list长度的操作的情况
- Ubuntu 16.04 下Qt编译出现“cannot find -lGL”及无法安装libgl1-mesa-dev解决
- Redhat下的Mysql源码安装
- POJ 3252 组合数学?
- 谷歌拒绝向安全公司开放病毒分析数据
- 关于安装Cocoapods的一般步骤
- [Leetcode 4] Median of Two Sorted Arrays
- UE4容器TArray、TMap的使用
- 用Promise让Node的异步任务顺序执行
- ACL(访问控制列表)基础篇
- Vertical Histogram