当前位置: 首页 > news >正文

第 26 章 MySQL

目录

26.1. Installation 26.2. create database and user

26.1. Installation

# yum install mysql-server
# /etc/init.d/mysqld start
		

设置数据库root密码

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h your.domain password 'new-password'
		

or

# /usr/bin/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):
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]
New password:
Re-enter new password:
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]
 ... 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]
 ... 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]
 - 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]
 ... 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!

		

Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>comments powered by Disqus





原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

相关文章:

  • 如何确保SWF文件Hash值相同
  • 2017JavaScript框架战报——React分战场
  • 整理Java基础知识--Character类
  • 网上购物系统(Task005)——通用数据库访问函数集SqlHelper类
  • mysql 密码重置
  • 微软产品组里的十一类人
  • window10转Windows7
  • java生成缩略图
  • Docker 运行 jar
  • 在区块链上表白——使用C#将一句话放入比特币的区块链上
  • Powershell for循环语句示例
  • 关于C#中随机数的生成问题
  • 梦断代码阅读笔记01
  • JSON 之 SuperObject(11): TSuperTableString、TSuperAvlEntry
  • js中Object.create作用,什么时候用?和new是什么区别
  • 分享一款快速APP功能测试工具
  • Android系统模拟器绘制实现概述
  • javascript从右向左截取指定位数字符的3种方法
  • javascript面向对象之创建对象
  • JS进阶 - JS 、JS-Web-API与DOM、BOM
  • MySQL主从复制读写分离及奇怪的问题
  • python学习笔记-类对象的信息
  • React 快速上手 - 07 前端路由 react-router
  • ucore操作系统实验笔记 - 重新理解中断
  • 大快搜索数据爬虫技术实例安装教学篇
  • 对话:中国为什么有前途/ 写给中国的经济学
  • 服务器从安装到部署全过程(二)
  • 将回调地狱按在地上摩擦的Promise
  • 聚簇索引和非聚簇索引
  • 聊聊sentinel的DegradeSlot
  • 让你的分享飞起来——极光推出社会化分享组件
  • 什么软件可以提取视频中的音频制作成手机铃声
  • 通过npm或yarn自动生成vue组件
  • 通信类
  • 我这样减少了26.5M Java内存!
  • 走向全栈之MongoDB的使用
  • ​Python 3 新特性:类型注解
  • # 20155222 2016-2017-2 《Java程序设计》第5周学习总结
  • #QT项目实战(天气预报)
  • $NOIp2018$劝退记
  • ( 用例图)定义了系统的功能需求,它是从系统的外部看系统功能,并不描述系统内部对功能的具体实现
  • (1)(1.19) TeraRanger One/EVO测距仪
  • (1)STL算法之遍历容器
  • (2)nginx 安装、启停
  • (2/2) 为了理解 UWP 的启动流程,我从零开始创建了一个 UWP 程序
  • (vue)页面文件上传获取:action地址
  • (力扣记录)1448. 统计二叉树中好节点的数目
  • (十五)Flask覆写wsgi_app函数实现自定义中间件
  • (一)u-boot-nand.bin的下载
  • (转载)PyTorch代码规范最佳实践和样式指南
  • .bat批处理(四):路径相关%cd%和%~dp0的区别
  • .bat批处理(五):遍历指定目录下资源文件并更新
  • .libPaths()设置包加载目录
  • .net 4.0 A potentially dangerous Request.Form value was detected from the client 的解决方案
  • .NET CF命令行调试器MDbg入门(二) 设备模拟器