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 ...
随机推荐
- 转载收藏之用 - 微信公众平台开发教程(五):使用Senparc.Weixin.MP SDK
Senparc.Weixin.MP SDK已经涵盖了微信5.0的所有公共API,以及2013年10月29日升级之后大部分实用的接口. 整个项目的源代码以及已经编译好的程序集可以在这个项目中获取到:ht ...
- 收集点小文,讲CGI,FASTCGI,PHP-CGI,PHP-FPM之间通透点的文章
http://blog.csdn.net/meegomeego/article/details/36180343 http://www.opsers.org/linux-home/server/php ...
- BIN和HEX文件的区别
HEX文件和BIN文件是我们经常碰到的2种文件格式.下面简单介绍一下这2种文件格式的区别: 1.HEX文件是包括地址信息的,而BIN文件格式只包括了数据本身.在烧写或下载HEX文件的时候,一般都不需要 ...
- ftp和http转参数的使用(转)
浏览器因特网资源:URL是浏览器寻找信息时所需的资源位置,通过URL,应用程序才能找到并使用共享因特网上大量的数据资源. 大部分URL都遵循一种标准的格式: ①HTTP协议(http://或者http ...
- LR选择哪种方式录制
LR选择哪种方式录制,有以下考虑原则: 1.基于浏览器的应用程序推荐使用HTML-basic script方式录制 2.不是基于浏览器的应用程序推荐使用URL-basic script方式录制 3.如 ...
- css1-颜色和长度
<!DOCTYPE html>CSS1-颜色和长度 <style>div{ /*颜色*/ color:#f00; /*前景色*/ background:#00f; /*背景色* ...
- C#利用QrCode.Net生成二维码(Qr码)
在网上很多应用都是用二维码来分享网址或者其它的信息.尤其在移动领域,二维码更是有很大的应用场景.因为项目的需要,需要在网站中增加一个生成二维码分析网址的功能,在谷歌大幅度抽筋的情况下无奈使用百度.百度 ...
- Sqlserver 系列(一):常用函数
(1)聚合函数 sum,max,min,avg,count (2)日期函数 datediff ,dateadd, datepart,getdate,month,day (3)字符串函数 ltrim,r ...
- asp.net缓存(一)
ASP.NET页面输出缓存(OutputCache) 页面输出缓存是最为简单的缓存机制,该机制将整个ASP.NET页面内容保存在服务器内存中.当用户请求该页面时,系统从内存中输出相关数据,直到缓存数据 ...
- js基础-需要注意的地方
---因为跟别的语言很像,所以只记录要注意的地方 1.== 和 === 的区别 ===要求类型也相等 "5"==5 = ture "5"===5 = false ...