标签:user --nodeps 5.5 har nod emctl 过程 python2 evel
1. 检查安装的mariadb
rpm -qa |grep mariadb
得到已经安装的安装包
mariadb-libs-5.5.56-2.el7.x86_64
mariadb-devel-5.5.56-2.el7.x86_64
mariadb-server-5.5.56-2.el7.x86_64
mariadb-5.5.56-2.el7.x86_64
执行卸载的操作:
rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64
rpm -e --nodeps mariadb-devel-5.5.56-2.el7.x86_64
rpm -e --nodeps mariadb-server-5.5.56-2.el7.x86_64
rpm -e --nodeps mariadb-5.5.56-2.el7.x86_64
2. 安装mysql
下载rpm 生成repo文件:
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -vih mysql-community-release-el7-5.noarch.rpm
3. yum 安装mysql
yum install mysql-server
4.中间注意事项:
如果提示没有安装 perf的话可以安装
yum install perl-JSON.noarch
如果python已经升级到了3.6 需要修改yum的配置文件:
修改文件/usr/bin/yum、/usr/libexec/urlgrabber-ext-down头中相应python为#!/usr/bin/python2.7
5. 安装完成之后启动mysql
systemctl start mysql
6.改root用户增加权限以及修改密码 在用户下执行 mysql
grant all privileges on *.* to ‘root‘@‘%‘
update user set password=password(‘Test6530‘) where user=‘root‘
flush privileges
7.修改字符集:
vim /etc/my.conf
修改主要地方为
[mysqld] character-set-server=utf8 collation-server=utf8_general_ci sql_mode=‘NO_ENGINE_SUBSTITUTION‘
[mysql] default-character-set = utf8 [mysql.server] default-character-set = utf8 [mysqld_safe] default-character-set = utf8 [client] default-character-set = utf8
可用状态.
标签:user --nodeps 5.5 har nod emctl 过程 python2 evel
原文地址:http://www.cnblogs.com/jinanxiaolaohu/p/7866930.html