CentOS RPM安装MySQL-5.6
2014-09-19 17:29
531 查看
1.检查是否有安装
安装之前应该先查询系统是否自在了mysql的软件包
rpm -qa|grep -i mysql
如果有的话需要先删除
rpm -e 软件名 --nodeps
2.下载安装包
cd/usr/local/src
wgethttp://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.13-1.el6.x86_64.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.13-1.el6.x86_64.rpm
上面的地址失效,用这个:
http://ftp.ntu.edu.tw/MySQL/Downloads/MySQL-5.6/
3.安装
rpm -ivh MySQL-server-5.6.13-1.el6.x86_64.rpm
rpm -ivh MySQL-client-5.6.13-1.el6.x86_64.rpm
4.启动及配置
#启动MySQL
service mysql start
#登录mysql
mysql -u root -p
Enter password:
安装后生成的一个随机密码在 /root/.mysql_secret
#修改密码
SET PASSWORD=password('password');
#添加一个可远程登录的帐号
GRANT all privileges on *.* TO 'root'@'%'identified by'password'WITH GRANT OPTION;
FLUSH PRIVILEGES;
#修改密码
SET PASSWORD FOR 'root'@'%'= PASSWORD('password');
#########################################
#可运行此脚本 进行生产服务器安全配置
/usr/bin/mysql_secure_installation
#Enter current password for root
输入root密码
#Change the root password? 是否修改root的密码
#Remove anonymous users? 是否删除匿名账号
#Disallow root login remotely?
是否取消root用户远程登录
#Remove test database and access to it? 是否删除test库和对test库的访问权限
#Reload privilege tables now?
是否现在刷新授权表使修改生效
相关文章推荐
- Centos6.4 用rpm方式安装MySql5.6
- centos下mysql5.6的rpm安装
- centos6.5 mysql5.6 RPM安装
- centos下rpm安装mysql5.6(二)
- CentOS 6 下RPM方式安装MySQL5.6
- CentOS6.5下RPM方式安装MySQL5.6
- Centos6.4 用rpm方式安装MySql5.6
- CentOS6.5系统下RPM包安装MySQL5.6
- centos7和centos6.5环境rpm方式安装mysql5.7和mysql5.6详解
- CentOS6.5系统下RPM包安装MySQL5.6(亲测可行)
- CentOS 6.5 RPM包方式安装 Mysql 5.6
- linux centos(5.6)使用rpm方式安装mysql(5.5)时候报错:error:failed dependencies
- CentOS6.6 下 rpm 安装mysql5.6
- CentOS6.5系统下RPM包安装MySQL5.6
- MySQL数据库系列之Centos6.5系统下RPM包安装MySQL5.6
- CentOS RPM安装MySQL-5.6
- CentOS 6 下RPM方式安装MySQL5.6
- CentOS6.5系统下RPM包安装MySQL5.6
- CentOS6.5系统下RPM包安装MySQL5.6
- centos7和centos6.5环境rpm方式安装mysql5.7和mysql5.6详解