CentOS6.5下通过百胜仓库安装mysql

  

环境:Centos6.5

查看centos版本:

[root@localhost  ~] #, cat /etc/redhat-release    CentOS  release  6.5,(最终)

<强> 1。查看是否安装了mysql

[root@localhost  ~] #, rpm  -qa  |, grep “mysql”   [root@localhost  ~) #

显示没有安装。

<强> 2。安装mysql客户端

[root@localhost  ~] #, yum  -y  install  mysql   [root@localhost  ~) #

<强> 3。安装mysql服务端

[root@localhost  ~] #, yum  -y  install  mysql-server  mysql-devel   [root@localhost  ~) #

<强> 4。安装mysql客户端和服务端

[root@localhost  ~] #, yum  -y  install  mysql  mysql-server  mysql-devel   [root@localhost  ~) #

<强> 5。查询mysql是否已安装完成

以安装mysql客户端和服务端为例:

[root@localhost  ~] #, rpm  -qa  |, grep “mysql”   mysql - libs 5.1.73 el6_8.x86_64——8.   mysql -猛击5.1.73 el6_8.x86_64——8.   mysql el6_8.x86_64——5.1.73 - 8.   mysql - server - 5.1.73 8. el6_8.x86_64   [root@localhost  ~) #

<强> 6。启动mysql

[root@localhost  ~] #, service  mysqld 开始   Starting  mysqld:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, (OK 才能,,)   [root@localhost  ~) #

或使用下面命令:

[root@localhost  ~] #,/etc/摆在/mysqld 开始   Starting  mysqld:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, (OK 才能,,)   [root@localhost  ~) #

<强> 7。查看mysql状态

[root@localhost  ~] #, service  mysqld 状态   mysqld  (pid , 3043), is 运行…   [root@localhost  ~) #

<强> 8。进入mysql

进入mysql - - -注:mysql安装后的根默认没有密码。

以根用户名进入mysql:

[root@localhost  ~] #, mysql  -uroot  - p   密码:Enter    Welcome 用,MySQL 监控只,Commands 最终获得with ,趁机\ g。   Your  MySQL  connection  id  is  3   版本:Server  5.1.73  Source 分布   Copyright  (c), 2000年,2013年,Oracle 和/或its 子公司只All  rights 保留。   Oracle  is  a  registered  trademark  of  Oracle  Corporation 和/或它的   子公司只Other  names  may  be  trademarks  of  their 各自   的主人。   Type 帮助;”,或“\ h”, for 帮助只Type ‘\ c’,用clear 从而current  input 语句。   mysql>

<强> 9。将mysql设置开机启动项

[root@localhost  ~] # chkconfig  mysqld    [root@localhost  ~) #

好了,此时安装mysql完成了。

CentOS6.5下通过百胜仓库安装mysql