码迷,mamicode.com
首页 > 数据库 > 详细

yum 安装mysql

时间:2015-07-27 16:20:51      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

1、安装

查看有没有安装过:         yum list installed mysql*

查看有没有安装包:         yum list mysql*

安装mysql客户端:          yum install mysql

安装mysql 服务器端:     yum install mysql-server          yum install mysql-devel

2、启动&&停止

数据库字符集设置 mysql配置文件/etc/my.cnf中加入default-character-set=utf8

启动mysql服务: service mysqld start 或者 /etc/init.d/mysqld start

开机启动:chkconfig --add mysqld,

查看开机启动设置是否成功chkconfig --list | grep mysql*

3、创建帐户

grant all on hive_metadata.* to hive@‘%‘ identified by ‘hive‘;

grant all on hive_metadata.* to hive@localhost identified by ‘hive‘; localhost可以配相应的本机电脑的ip,这样客户端即可连接



版权声明:本文为博主原创文章,未经博主允许不得转载。

yum 安装mysql

标签:

原文地址:http://blog.csdn.net/u011579204/article/details/47085329

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!