RedHat下MySQL 5.6 安装、维护
准备环境:
RedHat 5系统、MySQL 5.6 rpm包
首先 上传mysql至服务器
1、 解压缩MySql
[root@localhost]# tar -xvf MySQL-5.6.2_m5-1.rhel5.i386.tar
MySQL-client-5.6.2_m5-1.rhel5.i386.rpm
MySQL-devel-5.6.2_m5-1.rhel5.i386.rpm
MySQL-embedded-5.6.2_m5-1.rhel5.i386.rpm
MySQL-server-5.6.2_m5-1.rhel5.i386.rpm
MySQL-shared-5.6.2_m5-1.rhel5.i386.rpm
MySQL-test-5.6.2_m5-1.rhel5.i386.rpm
2、 安装MySQL-server包
[root@localhost]# rpm -ivh MySQL-server-5.6.2_m5-1.rhel5.i386.rpm
error:Failed dependencies:
MySQL conflicts with mysql-5.0.45-7.el5.i386
MySQL-serverconflicts with mysql-server-5.0.45-7.el5.i386
(安装失败,由于系统先前安装有mysql,把它卸载掉!再安装)
[root@localhost]# rpm -e mysql-5.0.45-7.el5.i386 --nodeps
[root@localhost]# rpm -e mysql-server-5.0.45-7.el5.i386 –nodeps
[root@localhost]# rpm -ivh MySQL-server-5.6.2_m5-1.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-server ###########################################[100%]
[root@localhost]# rpm -ivh MySQL-client-5.6.2_m5-1.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
3、 启动mysql并设置登录密码
[root@localhost]# /etc/init.d/mysql start
StartingMySQL......[ OK ]
[root@localhost]# mysqladmin -u rootpassword "123456"
4、 登录mysql并创建数据库
[root@localhost]# mysql -u root -p
Enterpassword:
Welcometo the MySQL monitor. Commands end with; or \g.
YourMySQL connection id is 5
Serverversion: 5.6.2-m5 MySQL Community Server (GPL)
Copyright(c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracleis a registered trademark of Oracle Corporation and/or its
affiliates.Other names may be trademarks of their respective
owners.
Type'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>create database shiyue;
QueryOK, 1 row affected (0.01 sec)
5、 配置客户端连接
mysql>use mysql;
Readingtable information for completion of table and column names
Youcan turn off this feature to get a quicker startup with -A
Database changed
mysql>grant all on *.* to root@"%" identified by "123456";
QueryOK, 0 rows affected (0.00 sec)
通过对1042问题代码的查询,得出编辑/etc/my.cnf文件,在[mysqld]内添加一行skip-name-resolve
在/etc/目录下如没有my.cnf配置文件,则请到/usr/share/mysql/下找到*.cnf文件,拷贝其中的一个到/etc/并改名为my.cnf
[root@localhost]# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
[root@localhost]# vi /etc/my.cnf
#Example MySQL config file for medium systems.
#
# Thisis for a system with little memory (32M - 64M) where MySQL plays
# animportant part, or systems up to 128M where MySQL is used together with
#other programs (such as a web server)
#
#MySQL programs look for option files in a set of
#locations which depend on the deployment platform.
# Youcan copy this option file to one of those
#locations. For information about these locations, see:
#http://dev.mysql.com/doc/mysql/en/option-files.html
#
# Inthis file, you can use all long options that a program supports.
# Ifyou want to know which options a program supports, run the program
# withthe "--help" option.
# Thefollowing options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
# Herefollows entries for some specific programs
# TheMySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size= 16M
max_allowed_packet= 1M
table_open_cache= 64
sort_buffer_size= 512K
net_buffer_length= 8K
read_buffer_size= 256K
read_rnd_buffer_size= 512K
myisam_sort_buffer_size= 8M
skip-name-resolve
#Don't listen on a TCP/IP port at all. This can be a security enhancement,
# ifall processes that need to connect to mysqld run on the same host.
# Allinteraction with mysqld must be made via Unix sockets or named pipes.
"/etc/my.cnf"145L, 4700C written
RedHat下MySQL 5.6 安装、维护的更多相关文章
- Windows 8.1下 MySQL绿色版安装配置与使用
原文:Windows 8.1下 MySQL绿色版安装配置与使用 Mysql-5.6.17-winx64操作步骤: 一.安装MySQL数据库 1.下载. 下载地址:http://downloads.my ...
- Window下MySql 5.6 安装后内存占用很高的问题
Window下MySql 5.6 安装后内存占用很高的问题 刚刚准备玩一把mysql,初学者 环境是window 7和window sever 2008, mysql是最新的5.6, 发现的问题是安装 ...
- Windows 10下mysql 64位 安装(mysql-5.7.11-winx64安装)
Windows下mysql 64位 安装(mysql-5.7.11-winx64安装) 系统Windows10 安装包mysql-5.7.11-winx64.zip 安装过程中遇到的问题,请留意4.0 ...
- Window 下 MySQL 环境的安装
Window 下 MySQL 环境的安装 简介: MySQL 是最流行的关系型数据库管理系统,在WEB应用方面 MySQL 是最好的RDBMS(Relational Database Manageme ...
- CentOS 7下MySQL 5.7安装
5.7和之前版本的MySQL有一些不同,现把CentOS 7下MySQL 5.7安装.配置与应用完整过程记下来,或许对新手来说有用. 本文描述的安装是采用通用的二进制压缩包(linux – Gener ...
- [转] Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置
from: http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得 ...
- Linux学习之CentOS--CentOS6.4下Mysql数据库的安装与配置【转】
如果要在Linux上做j2ee开发,首先得搭建好j2ee的开发环境,包括了jdk.tomcat.eclipse的安装(这个在之前的一篇随笔中已经有详细讲解了Linux学习之CentOS(七)--C ...
- Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置
原文:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建好j ...
- Linux学习之CentOS6下Mysql数据库的安装与配置
转自:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建好j ...
随机推荐
- 《Programming WPF》翻译 第9章 1.自定义控件基础
原文:<Programming WPF>翻译 第9章 1.自定义控件基础 在写一个自定义控件之前,你需要问的第一个问题是,我真的需要一个自定义控件吗?一个写自定义控件的主要原因是为了用户界 ...
- mysql 中 LIMIT的简单用法
mysql--语法: SELECT * FROM table LIMIT [offset,] rows | rows OFFSET offset --举例: select * from table l ...
- 3Sum Smaller 解答
Question Given an array of n integers nums and a target, find the number of index triplets i, j, k w ...
- 精确覆盖DLX算法模板
代码 struct DLX { int n,id; int L[maxn],R[maxn],U[maxn],D[maxn]; ]; ) //传列长 { n=nn; ;i<=n;i++) U[i] ...
- mook_百度百科
mook_百度百科 mook
- 计算机视觉库 SimpleCV
SimpleCV首页.文档和下载 - 计算机视觉库 - 开源中国社区 计算机视觉库 SimpleCV 编辑/纠错 分享到 新浪微博腾讯微博 已用 +0 收藏 + ...
- 【转】Windows与Linux(Ubuntu)双系统时间不一致的解决方法
当在嵌入式Linux里面备份文件时候,在备份的时候,PC(win7)和开发板的时间都是9:30,但是在开发板发现文件创建时间是9:30,然后u盘插在PC(win7)上,发现文件创建时间是1:30,为什 ...
- web文档类型DOCTYPE html很重要
之前写html或者jsp页面,从来不注意DOCTYPE 的声明,也不太明白DOCTYPE 的作用.直到最近碰到了一个非常奇葩的bug:某一个页面在IE7和8,Chrome,ff等下正常,但是在IE9下 ...
- 再一次强调,ORACLE外键必须加索引
外键加索引是常识,必须牢记.本来不想写这样的简单案例.可是连续遇到好几起外键不加索引导致性能问题,所以还是写一下. 一个兄弟问我 delete from Sa_Sales_Comm_Detail s ...
- jquery模仿css3延迟效果
HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta ...