标签:查询 systemctl stop 自动启动 roo mysq conf server 方式安装
#rpm -qa | grep -i mariadb //查询安装的MariaDB
#rpm -e --nodeps 查到软件名 //卸载相关MariaDB的所有软件
#find / -name mariadb
#whereis mariadb //查找是否有相关配置目录及文件,如有,则 rm -rf 删除
#whereis mysql
#find / -name mysql//查找是否有相关配置目录及文件,如有,则 rm -rf 删除
#rm -rf /etc/my.cnf//删除mysql配置文件
chkconfig --list|grep -i mysql //查看服务
chkconfig --del mysql //删除服务
#yum -y install autoconf
#tar -xvf MySQL-5.6.41-1.el7.x86_64.rpm-bundle.tar //解压mysql数据库;
yum install net-tools //先安装net-tools,mysqlServer安装需要
#rpm -ivh MySQL-server-5.6.41-1.el7.x86_64.rpm #安装mysql server
#rpm -ivh MySQL-client-5.6.41-1.el7.x86_64.rpm #安装mysql client
#service mysql start
#service mysql status //查看mysql状态
#mysql -uroot -p//默认密码在/root/.mysql_secret中
> SET PASSWORD = PASSWORD(‘123456‘);//修改root密码
#chkconfig --add mysql //加入到系统服务
#chkconfig mysql on//设置mysql自动启动
#chkconfig //查询自启列表
#systemctl stop firewalld//关闭防火墙
systemctl status firewalld //查看状态
systemctl disable firewalld//开机禁用
grant all privileges on *.* to ‘root‘ @‘%‘ identified by ‘123456‘;
flush privileges;
标签:查询 systemctl stop 自动启动 roo mysq conf server 方式安装
原文地址:https://www.cnblogs.com/-saligia-/p/9748148.html