zoukankan      html  css  js  c++  java
  • mysql_secure_installation

    安装完mysql-server 会提示可以运行mysql_secure_installation。运行mysql_secure_installation会执行几个设置:
      a)为root用户设置密码
      b)删除匿名账号
      c)取消root用户远程登录
      d)删除test库和对test库的访问权限
      e)刷新授权表使修改生效

    1、首先来进行 MySQL 的安装。打开超级终端,输入:

    [root@localhost ~]# yum install mysql mysql-server

    2、安装完毕,让 MySQL 能够随系统自动启动:

    [root@localhost ~]# chkconfig --levels 235 mysqld on

    [root@localhost ~]# /etc/init.d/mysqld start

    3、设置MySQL 数据 root 账户的密码:

    [root@localhost ~]# mysql_secure_installation

    当出现如下提示时候直接按回车:

    Enter current password for root

    出现如下再次回车:

    Set root password? [Y/n]

    出现如下提示输入你需要设置的密码,回车后在输入一次确认:

    New password:

    接下来还会有四个确认,分别是:

    Remove anonymous users? [Y/n]

    Disallow root login remotely? [Y/n]

    Remove test database and access to it? [Y/n]

    Reload privilege tables now? [Y/n]

    直接回车即可。

    4、重启mysql

    /etc/init.d/mysqld restart #重启

    /etc/init.d/mysqld stop #停止

    /etc/init.d/mysqld start #启动

  • 相关阅读:
    strstr 函数的实现
    函数模板与模板函数
    内核态和用户态
    最短路径算法(跟新SPFA,Ford)
    P1042 乒乓球
    P2347 砝码称重
    P1087 FBI树
    P1540 机器翻译
    P1028 数的计算
    P1067 多项式输出
  • 原文地址:https://www.cnblogs.com/zhepama/p/4024004.html
Copyright © 2011-2022 走看看