当前位置:首页 > 开发 > 数据库 > 正文

linux下mysql-5.6.23.tar.gz安装与配置

发表于: 2015-03-06   作者:笑我痴狂   来源:转载   浏览:
摘要: 1.卸载系统默认的mysql [root@localhost ~]# rpm -qa | grep mysql mysql-libs-5.1.66-2.el6_3.x86_64 mysql-devel-5.1.66-2.el6_3.x86_64 mysql-5.1.66-2.el6_3.x86_64 [root@localhost ~]# rpm -e mysql-libs-5.1
1.卸载系统默认的mysql
[root@localhost ~]# rpm -qa | grep mysql 
mysql-libs-5.1.66-2.el6_3.x86_64
mysql-devel-5.1.66-2.el6_3.x86_64
mysql-5.1.66-2.el6_3.x86_64
[root@localhost ~]# rpm -e mysql-libs-5.1.66-2.el6_3.x86_64
error: Failed dependencies:
        libmysqlclient.so.16()(64bit) is needed by (installed) mysql-5.1.66-2.el6_3.x86_64
        libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
        libmysqlclient.so.16()(64bit) is needed by (installed) mysql-devel-5.1.66-2.el6_3.x86_64
        libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) mysql-5.1.66-2.el6_3.x86_64
        libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
        libmysqlclient_r.so.16()(64bit) is needed by (installed) mysql-5.1.66-2.el6_3.x86_64
        libmysqlclient_r.so.16()(64bit) is needed by (installed) mysql-devel-5.1.66-2.el6_3.x86_64
        libmysqlclient_r.so.16(libmysqlclient_16)(64bit) is needed by (installed) mysql-5.1.66-2.el6_3.x86_64
        mysql-libs = 5.1.66-2.el6_3 is needed by (installed) mysql-5.1.66-2.el6_3.x86_64
        mysql-libs is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
[root@localhost ~]# rpm -e mysql-devel-5.1.66-2.el6_3.x86_64
[root@localhost ~]# rpm -e mysql-5.1.66-2.el6_3.x86_64
[root@localhost ~]# rpm -e mysql-libs-5.1.66-2.el6_3.x86_64
error: Failed dependencies:
        libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
        libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
        mysql-libs is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
[root@localhost ~]# rpm -qa | grep mysql 
mysql-libs-5.1.66-2.el6_3.x86_64
[root@localhost ~]# 




2.创建用户
以root用户登陆,创建mysql用户,用来维护mysql服务
[root@localhost ~]# 
[root@localhost ~]# groupadd mysql
[root@localhost ~]# useradd -g mysql mysql
[root@localhost ~]# passwd mysql

更改用户 mysql 的密码 。
新的 密码:
无效的密码: 过短
无效的密码: 过于简单
重新输入新的 密码:
passwd: 所有的身份验证令牌已经成功更新。
[
root@localhost ~]# 

[root@localhost mysql]# ll
总用量 38160
-rw-r--r--. 1 root root  5959549 3月   6 14:47 cmake-3.1.3.tar.gz
-rw-r--r--. 1 root root 33115859 3月   6 14:48 mysql-5.6.23.tar.gz
[root@localhost mysql]# 
[root@localhost mysql]# which cmake
/usr/bin/which: no cmake in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/java/jdk1.7.0_75/bin:/usr/java/jdk1.7.0_75/jre/bin:/root/bin)
[root@localhost mysql]# 

[root@localhost mysql]# tar zxvf cmake-3.1.3.tar.gz  
[root@localhost mysql]# cd cmake-3.1.3  
[root@localhost mysql]# ./configure  
[root@localhost mysql]# make  
[root@localhost mysql]# make install  



3.安装mysql 软件
准备好安装介质(mysql-5.6.23.tar.gz)

[root@localhost mysql]# tar zxvf mysql-5.6.23.tar.gz  



4.安装mysql软件
[root@localhost mysql]# cd mysql-5.6.23
[root@localhost mysql-5.6.23]# cmake -DCMAKE_INSTALL_PREFIX=/opt/mysql56 -DSYSCONFDIR=/opt/mysql56/data -DMYSQL_DATADIR=/opt/mysql56/data -DMYSQL_UNIX_ADDR=/opt/mysql56/data/mysqld.sock -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1  -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1  -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_TCP_PORT=3306 -DWITH_EXTRA_CHARSETS=all -DWITH_DEBUG=0 -DENABLE_DEBUG_SYNC=0 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_READLINE=1 -DZLIB_INCLUDE_DIR=/usr -DWITH_READLINE=1  

[root@localhost mysql-5.6.23]# make  
[root@localhost mysql-5.6.23]# make install 


5.运行mysql_install_db生成授权表
[root@localhost mysql-5.6.23]# cd /opt/
[root@localhost opt]# chown -R mysql:mysql mysql56

[root@localhost opt]# su – mysql  
[mysql@localhost ~]$ cd /opt/mysql56  
[mysql@localhost mysql56]$ cp scripts/mysql_install_db .  
[mysql@localhost mysql56]$ ./mysql_install_db  



7.配置自动服务
配置mysql服务
切换到root用户
[root@localhost mysql56]# cp  -r support-files/mysql.server /etc/init.d/mysql  
[root@localhost mysql56]# cd /etc/rc.d/init.d  
[root@localhost init.d]# chmod +x mysql  
[root@localhost init.d]# /sbin/chkconfig --del mysql  
[root@localhost init.d]# /sbin/chkconfig  --add mysql  
[root@localhost init.d]# service mysql start  




linux下mysql-5.6.23.tar.gz安装与配置

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
一、Nagios简介   Nagios是一款开源的电脑系统和网络监视工具,能有效监控Windows、Linux和Unix的
实验环境 虚拟机: 操作系统Linux:Red Hat Enterprise Linux 5 64-bit IP:10.8.205.48 主机名:wu
一.下载安装对应的jdk,并配置Java环境。 官网下载地址: http://www.oracle.com/technetwork/java/j
一、Nagios简介   Nagios是一款开源的电脑系统和网络监视工具,能有效监控Windows、Linux和Unix的
转载自:http://blog.csdn.net/zhuying_linux/article/details/6583096/ Linux下Tomcat的安装配置
1.下载软件包 mysql-5.5.25.tar.gz 或 mysql-5.5.25a.tar.gz 2.# tar -zxvf mysql-5.5.25.tar.gz 加
一、Nagios简介   Nagios是一款开源的电脑系统和网络监视工具,能有效监控Windows、Linux和Unix的
转自:http://www.cnblogs.com/mchina/archive/2013/02/20/2883404.html 一、Nagios简介   Nagios
http://www.cnblogs.com/mchina/archive/2013/02/20/2883404.html <iframe style="left: 795.5px
一、Nagios简介   Nagios是一款开源的电脑系统和网络监视工具,能有效监控Windows、Linux和Unix的
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号