CentOs6.7环境下rpm包安装mysql5.7
来源:互联网 发布:江西广电网络宽带投诉 编辑:程序博客网 时间:2024/05/16 00:56
1.移除原有的mysql包
查询:
rpm -qa|grep mysql移除:
rpm -e mysql-libs-5.1.73-5.el6_6.x86_64 --nodeps
2.安装
顺序安装如下rpm包:
rpm -i mysql-commercial-common-5.7.10-1.1.el6.x86_64.rpm
rpm -i mysql-commercial-libs-5.7.10-1.1.el6.x86_64.rpm
rpm -i mysql-commercial-client-5.7.10-1.1.el6.x86_64.rpm
rpm -i mysql-commercial-server-5.7.10-1.1.el6.x86_64.rpm
3.初始化
/usr/bin/mysqld --initialize --user=mysql
4.启动
/etc/init.d/mysqld start或者直接
service mysqld start
问题:初始化或重启中可能会出现如下问题:
2016-01-31T13:47:52.934154Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.2016-01-31T13:47:52.934209Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.2016-01-31T13:47:52.934221Z 0 [ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions2016-01-31T13:47:52.934232Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error2016-01-31T13:47:53.539845Z 0 [ERROR] Plugin 'InnoDB' init function returned error.2016-01-31T13:47:53.539899Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.2016-01-31T13:47:53.539913Z 0 [ERROR] Failed to initialize plugins.2016-01-31T13:47:53.539919Z 0 [ERROR] Aborting
遇到如上问题,你需要
vi /etc/selinux/config将
SELINUX=permissive
重启你的机器后就可以启动你的mysql了,别问我为什么,我也不知道(权限问题)
忘记root密码:(安全模式启动5.7同样有效)
mysqld_safe --skip-grant-tables --skip-networking &
mysql -uroot -p
重置密码:
use mysql;
update mysql.user set authentication_string=password('root') where user='root' and Host = 'localhost';
以上命令只适用于5.7版本的mysql哦!
第二次修改的时候需要这样子咯:
set password for 'root'@'localhost'=password('root');运行远程访问:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
以上每个修改步骤都要:
FLUSH PRIVILEGES;
5.开启重启
chkconfig --add mysqld chkconfig --level 2345 mysqld on
6.mysql安装文件路径
默认日志文件路径:/usr/log/mysqld.log
默认配置文件路径:/etc/my.conf
更多精彩内容请继续关注我的github主页:https://github.com/caicongyang
记录与分享,你我共成长 -from caicongyang
1 0
- CentOs6.7环境下rpm包安装mysql5.7
- CentOS6.7环境下安装mysql cluster(rpm包方式)
- centos6.5环境通过rpm包安装mysql5.5.51数据库
- 在CentOS6.8下rpm方式安装MySQL5.7
- CentOS6.5系统下RPM包安装MySQL5.6
- CentOS6.5系统下RPM包安装MySQL5.6
- CentOS6.5系统下RPM包安装MySQL5.6
- 【转载】----CentOS6.5系统下RPM包安装MySQL5.6
- CentOS6.5系统下RPM包安装MySQL5.6
- CentOS6.5系统下RPM包安装MySQL5.6
- CentOS6.5系统下RPM包安装MySQL5.6
- linux centos6.5 rpm安装mysql5.7
- CentOS6.5 安装 MySQL5.7 RPM Bundle
- CentOS6.9用rpm安装MySQL5.7
- centos7.2下安装mysql5.7,使用rpm包安装
- centos7.2下安装mysql5.7,使用rpm包安装
- centos7.2下安装mysql5.7,使用rpm包安装
- centos7.2下安装mysql5.7,使用rpm包安装
- 网络——获取Web数
- 结构体和类向前声明
- maven 安装配置
- 曲折的ubuntu14.04下用c的api去连接mysql
- iOS WebView 清除缓存和Cookie
- CentOs6.7环境下rpm包安装mysql5.7
- github学习(3)
- 网络——Base64Encode(转:自定义Base64编码器——Base64Encode)
- Wunder Fund Round 2016 D. Hamiltonian Spanning Tree(贪心+dp)
- POST方式提交XML调用接口
- BASIC-10 十进制转十六进制
- USACO-Section 3.1 Humble Numbers(DP)
- cocos2dx 3.3 pluginx tools文件夹分析
- 通过StoryBoard创建UIViewController