Centos6.5 源码安装MySql5.6.33

卸载已经安装过的旧版本mysql

rpm -e mysql
rpm  -e --nodeps mysql
yum remove mysql

安装MySql

安装mysql依赖包

yum -y install make gcc-c++ cmake bison-devel  ncurses-devel

下载mysql5.6.33

网址http://ftp.ntu.edu.tw/MySQL/Downloads/MySQL-5.6/

wget http://ftp.ntu.edu.tw/MySQL/Downloads/MySQL-5.6/mysql-5.6.33.tar.gz
tar -zxvf  mysql-5.6.33.tar.gz
cd mysql-5.6.33

编译安装

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysqldb -DSYSCONFDIR=/etc -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

make && make install

配置mysql

chown -R mysql:mysql /usr/local/mysql
mkdir -p /data/mysqldb
chown  -R mysql:mysql /data
mv /etc/my.cnf /etc/my.bak

初始化mysql

cd /usr/local/mysql
scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/mysqldb --user=mysql

启动mysql

cp support-files/mysql.server /etc/init.d/mysqld
chkconfig mysql on
service mysql start

mysql环境变量配置

PATH=/usr/local/mysql/bin:$PATH
export PATH
source /etc/profile

设置root登录口令

mysql -uroot  
mysql> SET PASSWORD = PASSWORD(‘123456‘);
时间: 2024-10-01 03:54:47

Centos6.5 源码安装MySql5.6.33的相关文章

CentOS6.5源码安装MySQL5.6.35

接上一篇文章使用RPM包安装MySQL,确实很方便.但是安装后却不知道各文件保存在哪个文件夹下!尝试使用源码安装~本文主要参考:CentOS 6.4下编译安装MySQL 5.6.14 一.卸载旧版本 1.使用下面的命令检查是否安装有mysql [[email protected] tools]# rpm -qa|grep -i mysql 2.有的话就卸载 [[email protected] tools]# yum remove MySQL-server-5.6.35-1.el6.i686 [

Centos-6.6源码安装MySQL-5.5

1.安装环境 [[email protected] ~]# cat /etc/redhat-release CentOS release 6.6 (Final) [[email protected]-mysql-server ~]# uname -r 2.6.32-504.el6.x86_64 2.环境初始化 [[email protected] ~]# /etc/init.d/iptables stop #关闭防火墙 [[email protected]-mysql-server ~]# ch

CentOS6.5源码安装多个MySQL实例及复制搭建

多实例安装本节是在CentOS6.5源码安装MySQL5.6.35的基础上,在同一台机器增加一个MySQL实例.参考Centos中安装多个mysql数据的配置实例,安装目录为/usr/local/mysql3307/ 6.目录创建(-p父目录不存在则创建此目录) [[email protected] ~]# cd mysql-5.6.35 [[email protected] mysql-5.6.35]# mkdir -p /usr/local/mysql3307/data 7.编译安装 [[e

CentOS-6.4-minimal版中源码安装MySQL-5.5.38

/** * CentOS-6.4-minimal版中源码安装MySQL-5.5.38 * ---------------------------------------------------------------------------------------------------------------------- * 三种安装方式 * 1)源码安装 * 2)二进制包安装 * 3)rpm或yum安装 * 本文演示的是源码安装,并且,从mysql-5.5开始,源码安装要通过cmake安装

Linux下源码安装Mysql5.5

本文主要介绍了如何在源码安装mysql5.5,所用系统为CentOS6.5 一.安装相应的开发环境 yum install -y ncurses-devel yum install -y libaio yum install -y bison yum install -y gcc-c++ yum install -y openssl-devel 二.安装cmake 跨平台编译器 # tar xf cmake-2.8.8.tar.gz # cd cmake-2.8.8 # ./bootstrap

源码安装mysql5.6x启动报错:[ERROR] Can't find messagefile '/data/mysqldata/3306/english/errmsg.sys'

170502 10:43:40 mysqld_safe Starting mysqld daemon with databases from /data/mysqldata/3306/data 2017-05-02 10:43:40 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.

源码安装mysql5.6.20&&mysql主从设置(多实例做多个主从)

一.源码安装mysql5.6.20 1.编译环境安装 yum install wget gcc* make openssl openssl-devel openssl-clients -y && yum groupinstall "Development Libraries" -y 2.源码下载(软件见Linux部署源码包) wget -P /usr/local/src/ http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.

MYSQL Study案例之--RedHat EL55源码安装Mysql-5.6

MYSQL  Study案例之--RedHat EL55源码安装Mysql-5.6 系统环境: 操作系统:RedHat EL55 DB Soft:  Mysql 5.6.4-m7 1.系统环境 [[email protected] Packages]# uname -a Linux rh6 2.6.18-194.el5.xen #1 SMP Tue Jan 29 11:47:41 EST 2013 i386 i686 GNU/Linux [[email protected] Packages]#

CentOS 6.5 源码安装MySQL5.6

CentOS 6.5 源码安装MySQL5.6 1:下载安装cmake (mysql5.5以后是通过cmake来编译的) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #http://download.csdn.net/detail/csxuedn/7976005 #wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz # tar -zxv -f /root/cmake-2.8.4.tar.gz