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 ...
随机推荐
- hdu 3832 Earth Hour
http://acm.hdu.edu.cn/showproblem.php?pid=3832 #include <cstdio> #include <iostream> #in ...
- XJOI网上同步训练DAY1 T3
思路:一开始看到这题的时候想DP,可是发现貌似不行..因为有前缀也有后缀,而且有的后缀会覆盖到现在的前缀,这就不满足无后效性了啊! 但是有个很巧妙的思路:如果我们知道a[i]的最大值,那么p的数量和q ...
- Cocos2d-x程序Windows下VC中文乱码的解决(用MultiByteToWideChar进行转换,VC2010有非常厉害的execution_character_set)
Cocos2d-x默认字符串常量编码都是UTF8的,而Windows中的VC默认都是跟系统相同,比如简体Windows是GB2312或者GBK.繁体就是BIG5编码.而我们大多数中国人用VC编译出来的 ...
- Codeforces243C-Colorado Potato Beetle(离散化+bfs)
Old MacDonald has a farm and a large potato field, (1010 + 1) × (1010 + 1) square meters in size. Th ...
- JUnit三分钟教程 ---- 实际应用
JUnit三分钟教程 ---- 实际应用 摘自http://lavasoft.blog.51cto.com/62575/65775 接上文"JUnit三分钟教程 ---- 快速起步&qu ...
- 0,null,empty,空,false,isset
<?php header("Content-type: text/html; charset=utf-8"); $a=0; //1. if($a==0) { echo $a; ...
- python3-day2(基本回顾)
1.作用域 1>外层变量可以被内层变更使用 2>内层变更不可以被外层使用 global nonlocal 2.对于Python,一切事物都是对象,对象基于类创建 3.练习 有如下值集合 [ ...
- python高级编程(第12章:优化学习)2
#优化策略 #3个原则 """ 1a:寻找其他原因:确定第三方服务器或资源不是问题所在 2a:度量硬件:确定资源足够用 3a:编写速度测试:创建带有速度要求的场景 &qu ...
- 修改UISearchBar placeholder textColor
[[UILabel appearanceWhenContainedIn:[UISearchBar class], nil] setTextColor:[UIColor redColor]];
- 内外连接、组函数、DDL、DML和TCL
前言 cross join ,是笛卡尔积:nature join 是自然连接. 正文 内外连接 inner join inner join 的inner能够省略. 内连接 在一个表中可以找到在还有一个 ...