Home >Database >Mysql Tutorial >Linux平台rpm方式安装MySQL 5.5.13 GA

Linux平台rpm方式安装MySQL 5.5.13 GA

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:02:061149browse

rhel4 下安装mysql 5.5.13//author:guojin.chen一、rpm方式安装1、准备包: MySQL-server-5.5.13-1.rhel4.i386.rpm MySQL-clie

rhel4 下安装mysql 5.5.13
//author:guojin.chen
一、rpm方式安装
1、准备包:
  MySQL-server-5.5.13-1.rhel4.i386.rpm
  MySQL-client-5.5.13-1.rhel4.i386.rpm
2、检查有没有旧版mysql
   rpm -q mysql
   如果有的话,就卸掉,根据约束,,从最外部开始卸载。
   rpm -e 包
3、安装
  rpm -ivh MySQL-server-5.5.13-1.rhel4.i386.rpm MySQL-client-5.5.13-1.rhel4.i386.rpm
4、说明下默认安装目录
   /var/lib/mysql 数据文件目录
   /usr/share/mysql 配置文件目录
   /usr/bin    程序目录
   /etc/rc.d/init.d/mysql 启动脚本
5、启动|终止|查看服务器
   /etc/rc.d/init.d/mysql start|stop|status
   /usr/bin/mysqladmin -u root -ppassword shutdown
6、更改数据文件目录
   mv /var/lib/mysql /data/
   cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
   vi /etc/my.cnf
   修改client和mysqld组的socket=/data/mysql/mysql.sock
   vi /etc/rc.d/init.d/mysql
   修改datadir=/data/mysql
7、启动服务器,如果日志里报错显示:“/usr/sbin/mysqld: Can't change dir to '/data/mysql/' (Errcode: 13)”
   那么应该是和selinux有关,
   解决办法:
   vi /etc/selinux/config
   修改selinux=disabled或者permissive
   再次启动服务器,OK。
8、如果服务器可以启动,但是客户端连不上,那应该是my.cnf里client组的socket未改过来。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn