Home  >  Article  >  Database  >  yum安装mysql_MySQL

yum安装mysql_MySQL

WBOY
WBOYOriginal
2016-06-01 12:59:041226browse

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,这样客户端即可连接

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn