查看已经安装的mysql:

sudo yum list installed |grep mysql

删除

sudo yum remove mysql

安装

sudo rpm -ivh MySQL-server-5.6.19-1.rhel5.x86_64.rpm

会发现mysql已经被添加到/etc/init.d/

查看服务状态

sudo /sbin/service mysql status

启动服务

sudo /sbin/service mysql start

ps查看, 服务运行在mysql用户下,

检查启动参数

sudo /sbin/chkconfig –list mysql

mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off

已经添加到系统自启动

my.cnf在 /usr 下, 添加以下基本参数

join_buffer_size = 64M

sort_buffer_size = 4M

read_rnd_buffer_size = 4M

key_buffer_size=16M

max_allowed_packet=16M

修改默认端口会遇到selinux的权限问题, 具体可以看

https://blogs.oracle.com/jsmyth/entry/selinux_and_mysql

可以通过 sudo /usr/sbin/semanage port -l 查看当前的端口状态

semanage port -a -t mysqld_port_t -p tcp 6033

就可以指定其他端口了

#########

A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !

You will find that password in ‘/home/milton/.mysql_secret’.

You must change that password on your first connect,

no other statement but ‘SET PASSWORD’ will be accepted.

See the manual for the semantics of the ‘password expired’ flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

/usr/bin/mysql_secure_installation

which will also give you the option of removing the test database.

This is strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as /usr/my.cnf and

will be used by default by the server when you start it.

You may edit this file to change server settings

#########

编译安装

需要预先安装ncurses-devel, 否则会报错”Curses library not found”.

sudo yum install ncurses-devel

cmake需要用root权限运行:

sudo cmake -DCMAKE_INSTALL_PREFIX=/opt/mysql

-DMYSQL_DATADIR=/opt/mysql/data -DWITH_INNOBASE_STORAGE_ENGINE=1

-DMYSQL_TCP_PORT=6033 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8

-DDEFAULT_COLLATION=utf8_general_ci

添加用户和组

shell> sudo groupadd mysql

shell> sudo useradd -r -g mysql mysql

# cd /opt/mysql

# sudo chown -R mysql .

# sudo chgrp -R mysql .

安装测试数据

# sudo scripts/mysql_install_db –user=mysql

显示如下:

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

./bin/mysqladmin -u root password ‘new-password’

./bin/mysqladmin -u root -h ML-M0 password ‘new-password’

Alternatively you can run:

./bin/mysql_secure_installation

which will also give you the option of removing the test

databases and anonymous user created by default. This is

strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd mysql-test ; perl mysql-test-run.pl

New default config file was created as ./my.cnf and

will be used by default by the server when you start it.

You may edit this file to change server settings

再修改用户

# sudo chown -R root .

# sudo chown -R mysql data

启动服务

# sudo bin/mysqld_safe –user=mysql &

添加到系统启动

# sudo cp support-files/mysql.server /etc/rc.d/init.d/mysqld

# sudo chkconfig --add mysqld

Centos 6.3 压缩包安装MySQL5.6.2x

# cd /opt/mysql

#tar zxvf mysql-advanced-5.6.23-linux-glibc2.5-x86_64.tar.gz

#ln -s mysql-advanced-5.6.23-linux-glibc2.5-x86_64 mysql

# cd mysql

#--- install &init

#sudo chown -R mysql:mysql .

#sudo ./scripts/mysql_install_db --user=mysql

#---start the server (这边加 --user=mysql 的时候不成功, 后来不加这个才正常启动的)

#sudo ./bin/mysqld_safe &[1] 3492[root@racnote1 mysql]#150324 16:33:40 mysqld_safe Logging to '/usr/local/mysql/data/racnote1.err'.150324 16:33:40 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

Ctrl+C

#---add it to the service

#sudo cp support-files/mysql.server /etc/init.d/mysql.server

#sudo vi /etc/init.d/mysql.serverfind "basedir=", add the path to mysql installation, e.g. "basedir=/opt/mysql/mysql"#sudo chkconfig --list

#sudo chkconfig --add mysql.server

#sudo chkconfig --list

#---initialize the root password

#sudo ./bin/mysql_secure_installation

#--- link the mysql executable to /usr/bin

# cd/usr/local/bin

#sudo ln -s /opt/mysql/mysql/bin/mysql mysql

centos5安装mysql 5.6.19 mysql-devel_Centos5.8 安装 MySQL5.6.19相关推荐

  1. mysql5.1编译安装centos7_CentOS7下 Nginx1.13.5 + PHP7.1.10 + MySQL5.7.19 源码编译安装

    在CentOS7下 Nginx1.13.5 + PHP7.1.10 + MySQL5.7.19 源码编译安装过程记录. 一.安装Nginx 1.安装依赖扩展 # yum -y install wget ...

  2. MySQL超详细安装教程 手把手教你安装MySQL到使用MySQL 最简单的MySQL安装方式,这种方式装,卸载也简单(安装mysql的步骤和方法)

    目录 MySQL 压缩包下载地址: 下载方式: 安装步骤: 一.解压下载的文件: 二.给解压的文件改名 三.将这个包放到自己想要存放的电脑目录下 四.配置环境变量 1.右键我的电脑,选择属性 2.选择 ...

  3. mysql+1.6安装,CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14方法

    这篇文章主要介绍了CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14方法分享,需要的朋友可以参考下准备篇: 一.配置防火墙,开启80端口.3306端口 Cen ...

  4. linux安装多个mysql数据库_linux下多个mysql5.7.19(tar.gz)安装图文教程

    初级第一次在Linux下安装MySQL-5.7.19版本教程请看上一篇,如果已经会安装了,那么请看这篇linux下安装多个mysql-5.7.19 环境:centos 6.5 1-下载 2-跳过登陆 ...

  5. mysql+installer+community+5.7.9_win10系统,mysql-installer-community-5.7.19.0.msi安装

    1.进入官网找到自己所需的安装包:https://dev.mysql.com/  ,路径:DOWNLOAD-->MYSQL Community Edition(GRL)-->MYSQL o ...

  6. linux mysql 5.5 安装_Linux 安装 mysql5.5.19

    在官网上下载mysql-5.5.19-linux2.6-i686.tar.gz压缩包,此包解压后为编译好的文件,不需要咱们自己编译.安装,直接修改配置即可用. 1.将mysql-5.5.19-linu ...

  7. centos mysql 5.6.19_Centos5.8 安装 MySQL5.6.19

    查看已经安装的mysql: sudo yum list installed |grep mysql 删除 sudo yum remove mysql 安装 sudo rpm -ivh MySQL-se ...

  8. centos5.9 mysql_CentOS 5.9系统服务器使用yum安装Apache+PHP+MySQL环境

    Centos 里的 yum 在线安装很慢.以下是替换为中国CentOS镜像服务器! 中国官方镜像网站: http://centos.ustc.edu.cn/ /* 使用说明 */ cd /etc/yu ...

  9. mysql 5.7.19 rpm下载_centos6.8 mysql5.7 rpm安装与完全卸载

    一.查看centos版本 cat /etc/issue 安装mysql5.7 #下载rpm包 wget http://soft.71t.com.cn:81/soft/mysql-5.7.19-1.el ...

最新文章

  1. Calendar.clear(int field)的陷阱
  2. 优秀程序员必备七要件
  3. Spring高级之Spring事务详解(用法、传播行为、隔离级别、只读事务、事务条件)
  4. 初试cocos2d-x坐标系
  5. python中的随机函数的用法_python中的随机函数小结
  6. mysql 启动服务错误
  7. 与一线Linux嵌入式开发工程师的对话
  8. c#制作的简单的画图板
  9. 第一阶段冲刺(第十天)
  10. PHP生成UTF-8编码的CSV文件用Excel打开乱码的解决办法
  11. 【数学分析笔记05】数列极限的性质
  12. 烧写嵌入式linux,嵌入式linux系统烧写
  13. 【第126期】游戏策划:给@毛毛团的简历分析
  14. 数据分析的 5 种归纳方法
  15. Blender场景建模练习:破旧的公寓楼
  16. 字谜游戏(b)C语言
  17. 07、Flutter FFI 数组
  18. 在线2进制8进制10进制16进制进制转换工具
  19. 演讲发言时太紧张怎么办?只需三招帮你彻底克服当众讲话前的紧张感
  20. 成功解决 failing shard [AccessControlException[access denied (“java.io.FilePermission“

热门文章

  1. moosefs即将发布新版
  2. 信息安全——密码学之DES介绍
  3. 我是如何2小时弄出房产网站小程序的?
  4. hi模板文件报乱码问题
  5. jmeter 非GUI模式下测试报错An error occurred: Unknown arg:
  6. 【LeetCode】124. Binary Tree Maximum Path Sum
  7. socket和URLConnection
  8. Randomized Cuts for 3D Mesh Analysis (SIGGRAPH Asia 08)
  9. nginx每日日志切割脚本
  10. linux中OpenVas 漏洞扫描软件