Mysql学习MySQL安全配置向导mysql_secure_installation详解
发布时间:2020-08-06 02:53:17 所属栏目:MySql 来源:互联网
导读:介绍《Mysql学习MySQL安全配置向导mysql_secure_installation详解》开发教程,希望对您有用。
《Mysql学习MySQL安全配置向导mysql_secure_installation详解》要点: 安装完mysql-server 会提示可以运行mysql_secure_installation.运行mysql_secure_installation会执行几个设置: 通过这几项的设置能够提高mysql库的安全.建议生产环境中mysql安装这完成后一定要运行一次mysql_secure_installation,详细步骤请参看下面的命令:MYSQL实例 代码如下:[root@server1 ~]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it,we'll need the current password for the root user. If you've just installed MySQL,and you haven't set the root password yet,the password will be blank, so you should just press enter here. Enter current password for root (enter for none):<C初次运行直接回车 OK,successfully used password,moving on… Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. Set root password? [Y/n] <C 是否设置root用户密码,输入y并回车或直接回车 New password: <C 设置root用户的密码 Re-enter new password: <C 再输入一次你设置的密码 Password updated successfully! Reloading privilege tables.. … Success! By default,a MySQL installation has an anonymous user,allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing,and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] <C 是否删除匿名用户,生产环境建议删除,所以直接回车 … Success! Normally,root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] <C是否禁止root远程登录,根据自己的需求选择Y/n并回车,建议禁止 … Success! By default,MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing,and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] <C 是否删除test数据库,直接回车 - Dropping test database… … Success! - Removing privileges on test database… … Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] <C 是否重新加载权限表,直接回车 … Success! Cleaning up… All done! If you've completed all of the above steps,your MySQL installation should now be secure. Thanks for using MySQL! [root@server1 ~]# (编辑:莱芜站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- MYSQL教程mysql unix准换时间格式查找指定日期数据代码
- 为什么MySQL Workbench会为视图生成占位符表?
- MYSQL数据库mysql 5.7安装 MySQL 服务无法启动但是服务没有
- MySQL / PHP错误:[2002]通常只允许使用每个套接字地址(协议
- php – 在MySQL中复制一条记录
- Mysql学习在MySQL数据库中使用C执行SQL语句的方法
- MYSQL教程innodb引擎redo文件维护方法
- mysql – 在创建表时在SQL中对列进行排序的最佳实践
- javascript – 需要使用node.js访问mysql数据库的帮助
- Mysql应用PHP连接MySql闪断自动重连的方法