准备环境:

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 安装、维护的更多相关文章

  1. Windows 8.1下 MySQL绿色版安装配置与使用

    原文:Windows 8.1下 MySQL绿色版安装配置与使用 Mysql-5.6.17-winx64操作步骤: 一.安装MySQL数据库 1.下载. 下载地址:http://downloads.my ...

  2. Window下MySql 5.6 安装后内存占用很高的问题

    Window下MySql 5.6 安装后内存占用很高的问题 刚刚准备玩一把mysql,初学者 环境是window 7和window sever 2008, mysql是最新的5.6, 发现的问题是安装 ...

  3. 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 ...

  4. Window 下 MySQL 环境的安装

    Window 下 MySQL 环境的安装 简介: MySQL 是最流行的关系型数据库管理系统,在WEB应用方面 MySQL 是最好的RDBMS(Relational Database Manageme ...

  5. CentOS 7下MySQL 5.7安装

    5.7和之前版本的MySQL有一些不同,现把CentOS 7下MySQL 5.7安装.配置与应用完整过程记下来,或许对新手来说有用. 本文描述的安装是采用通用的二进制压缩包(linux – Gener ...

  6. [转] Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置

    from:  http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得 ...

  7. Linux学习之CentOS--CentOS6.4下Mysql数据库的安装与配置【转】

      如果要在Linux上做j2ee开发,首先得搭建好j2ee的开发环境,包括了jdk.tomcat.eclipse的安装(这个在之前的一篇随笔中已经有详细讲解了Linux学习之CentOS(七)--C ...

  8. Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置

    原文:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建好j ...

  9. Linux学习之CentOS6下Mysql数据库的安装与配置

    转自:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建好j ...

随机推荐

  1. Codeforces 358D Dima and Hares

    http://codeforces.com/contest/358/problem/D 题意:给出n个数,每个数取走的贡献与相邻的数有关,如果取这个数的时候,左右的数都还没被取,那么权值为a,如果左右 ...

  2. SIM卡基础,各管脚意义,封装定义

    1. SIM简介 SIM卡(Subscriber Identity Module).即用户识别模块,是一张符合GSM规范的"智慧卡".SIM卡可以插入任何一部符合GSM规范的移动电 ...

  3. openssl对数组加密解密的完整实现代码

    本例是用C实现的对一个数组进行加密,加密到第二个数组,然后解密到另一个数组的完整实现代码. #include <stdio.h> #include <string.h> #in ...

  4. 域控制器安全策略在哪里 Windows server 2008

    Start(开始)–Programs(程序)–Administrative Tools(管理工具)–Group Policy Management(策略管理器) 展开组策略管理器选择–Forest(林 ...

  5. mysql 的 decimal类型

    最近做项目时将decimal定义成了decimal(5,2),然后等到最大的结果都是999.99,找了很多地方找不出bug在哪里插入很更新的数据都是正确的而结果却都是999.99,最后才知道decim ...

  6. Poj3074-Sudoku(数独DLX)

    题意: 给出一个9*9的矩阵,有一些格子已经填了数,有一些是.代表未填.求任意一组解使得每行包含1~9,每列包含1~9,每个小矩形(3*3)包含1~9. 解析: 精确覆盖DLX的经典题目,每一行代表要 ...

  7. Uva11183-Teen Girl Squad(有向图最小生成树朱刘算法)

    解析: 裸的有向图最小生成树 代码 #include<cstdio> #include<cstring> #include<string> #include< ...

  8. SQL server 中 COUNT DISTINCT 函数

    目的:统计去重后表中所有项总和. 直观想法: SELECT COUNT(DISTINCT *) FROM [tablename] 结果是:语法错误. 事实上,我们可以一同使用 DISTINCT 和 C ...

  9. POJ 1631 Bridging signals DP(最长上升子序列)

    最近一直在做<挑战程序设计竞赛>的练习题,感觉好多经典的题,都值得记录. 题意:给你t组数据,每组数组有n个数字,求每组的最长上升子序列的长度. 思路:由于n最大为40000,所以n*n的 ...

  10. 04747_Java语言程序设计(一)_第9章_输入和输出流

    例9.1一个文件复制应用程序,将某个文件的内容全部复制到另一个文件. import java.io.*; public class Example9_1 { public static void ma ...