Linux下安装与配置Mysql 5

1,首先下载MySQL安装包,版本为

MySQL Community Server 5.6.17 目前是最高版本

下载地址为:http://dev.mysql.com/downloads/mysql/ 下载的rpm包 

直接输入: rpm -ivh MySQL-server-5.6.17-1.el6.x86_64.rpm 报出了如下错误,网上一查是因为包冲突,然后就把原来的包给卸载干净,输入 yum -y remove mysql* 搞定
Preparing...                ########################################### [100%]
        file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
        file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.6.17-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64

安装完成


输入 service mysql start  即可启动服务


2,安装客户端 否则MySQL命令是用不了的,下载安装客户端

然后就可以 mysql -u root -P  了 之后当然是要授权远程连接权限了,值得注意的是(

A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.) 意思是给root用户生成了随机密码,这个密码可以在'/root/.mysql_secret'.里找的到

登录,然后输入grant all privileges on *.* to 'root'@'%'identified by 'root' with grant option; 即可 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值