zoukankan      html  css  js  c++  java
  • centos7 mysql

    1.卸载流程:转载http://www.cnblogs.com/Lenbrother/articles/6203620.html

    2.安装流程:转载http://www.centoscn.com/CentosServer/www/2016/0331/6964.html

                        转载http://www.cnblogs.com/julyme/p/5969626.html

    一。配置防火墙开启端口

          1.关闭fireewall       systemctl stop firewalld.service

          2.禁止fireewall启动   systemctl disable firewalld.service

         3.安装iptables防火墙   yum install iptables-services

         4.编辑iptables防火墙    vi /etc/sysconfig/iptables

     # Firewall configuration written by system-config-firewall
    
    # Manual customization of this file is not recommended.
    
    *filter
    
    :INPUT ACCEPT [0:0]
    
    :FORWARD ACCEPT [0:0]
    
    :OUTPUT ACCEPT [0:0]
    
    -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    
    -A INPUT -p icmp -j ACCEPT
    
    -A INPUT -i lo -j ACCEPT
    
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
    
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
    
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
    
    -A INPUT -j REJECT --reject-with icmp-host-prohibited
    
    -A FORWARD -j REJECT --reject-with icmp-host-prohibited
    
    COMMIT
    
    :wq! #保存退出
    View Code

        5.重启防火墙使配置生效   systemctl restart iptables.service

        6.设置开机启动      systemctl enable iptables.service

        7.

    # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
    # rpm -ivh mysql-community-release-el7-5.noarch.rpm
    # yum install mysql-community-server
    # service mysqld restart
    # mysql -u root (初次登陆木有密码)
    mysql> set password for 'root'@'localhost' =password('password');(设置密码)
    mysql> grant all privileges on *.* to root@'%'identified by 'password';(远程连接设置)
    mysql>create user 'username'@'%' identified by 'password';  (新建用户)
    mysql -u root -p (登陆数据库)
    8.关闭SELINUX(不清楚用途待查)
    vi /etc/selinux/config
    
    #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加
    :wq! #保存退出
    setenforce 0 #使配置立即生效

    二。卸载:

       1.首先执行查看命令,看一下都安转了什么东东:
         rpm -qa |grep -i mysql

       2.执行卸载命令:yum remove  (安装的东西)

       3.检查是否卸载干净:rpm -qa |grep -i mysql

       4.终极检查:rpm -qa |grep -i mysql

        5.清理文件查看mysql文件目录:find / -name mysql.

        6.删除掉该文件 :rm -rf (文件路径)

  • 相关阅读:
    AX88772B 驱动移植
    USB 驱动之 usb_register 函数解析
    am335x USB 驱动框架记录
    warning: assignment from incompatible pointer type [enabled by default]
    WARNING: arch/arm/mach-omap2/built-in.o(.text+0x12cdc): Section mismatch in reference from the function mmc0_init() to the (unknown reference) .init.data:(unknown)
    Oracle11g客户端client的下载与安装
    sqlserver2008R2 评估期已过
    SQL2008 提示评估期已过的解决方法
    Windows下Oracle定时备份(全量备份)
    某客的《微信小程序》从基础到实战视频教程
  • 原文地址:https://www.cnblogs.com/yongyao/p/6895370.html
Copyright © 2011-2022 走看看