Mac 命令行安装mysql homebrew 安装mysql后,如何配置mysql
非常好 强力推荐
这个是我最新并且一直推崇的方法:
1、安装:sunyichaodeMacBook-Pro:~ sunyichao$ brew install mysql
2、开启mysql:mysql.server start
2、使用mysql的配置脚本:/usr/local/opt/mysql/bin/mysql_secure_installation //mysql 提供的配置向导
启动这个脚本后,即可根据如下命令提示进行初始化设置
sunyichaodeMacBook-Pro:~ sunyichao$ /usr/local/opt/mysql/bin/mysql_secure_installation //mysql 提供的配置向导
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD PLUGIN can be used to test passwordsand improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD plugin? Press y|Y for Yes, any other key for No: k //是否采用mysql密码安全检测插件(这里作为演示选择否,密码检查插件要求密码复杂程度高,大小写字母+数字+字符等)
Please set the password for root here. // 首次使用自带配置脚本,设置root密码 New password: Re-enter new password: By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for 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] Y //是否删除匿名用户
... 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] Y //是否禁止远程登录
... 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] Y //删除测试数据库,并登录
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] Y//重新载入权限表
... Success! All done! If you've completed all of the above steps, your MySQL
installation should now be secure. Thanks for using MySQL! Cleaning up...
sunyichaodeMacBook-Pro:~ sunyichao$
Mac 命令行安装mysql homebrew 安装mysql后,如何配置mysql的更多相关文章
- 【转载】【Centos linux系统】命令行(静默)安装oracle 11gR2
[原文]:http://blog.chinaunix.net/uid-23886490-id-3565998.html 一.安装前准备 1.内存及swap要求 至于swap如何添加,后文将提到 gre ...
- 【Centos linux系统】命令行(静默)安装oracle 11gR2
一.安装前准备 1.内存及swap要求 至于swap如何添加,后文将提到 1 2 grep MemTotal /proc/meminfo grep SwapTotal /proc/meminfo 2. ...
- Scoop - 在Windows命令行上进行程序安装
2019-01-28 22:49:21 资料来源自Scoop官方网站以及github上的帮助文档 如果有疑惑或者觉得文章有错误请留言以帮助改正 补充内容(2019-04-09 21:11:36):不 ...
- 【转载】基于Linux命令行KVM虚拟机的安装配置与基本使用
基于Linux命令行KVM虚拟机的安装配置与基本使用 https://alex0227.github.io/2018/06/06/%E5%9F%BA%E4%BA%8ELinux%E5%91%BD%E4 ...
- mac命令行配置网络
mac命令行配置网络今天终于找到了Mac OS X通过命令行修改ip的方式了,记录如下: 修改mac地址,重启后失效sudo ifconfig en0 lladdr d0:67:e5:2e:07:f1 ...
- Appium Mac 命令行安装
试过很多方法都失败,打算用命令行方式安装. 准备工作: 从 https://github.com/appium/appium下载appium版本的源码(.tar) 详见github_Appium1.6 ...
- mac 命令行安装软件
第一步需要在mac上安装brew工具 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/mas ...
- MAC 命令行工具(Command Line Tools)安装
不过升级后安装命令行工具(Command Line Tools)时发现官网没有clt的下载安装包了,原来改了,使用命令在线安装. 打开终端,输入命令:xcode-select --install 选择 ...
- Ubuntu安装Wildfly(原JBoss)并为其配置MySQL分布式数据源
注:JBoss在8.0版本后改名为WildFly,以JBoss命名的版本最高为7.1.1.Final,但JBoss7.1.1.Final不支持jdk1.8以上版本,如果在jdk1.8情况下安装JBos ...
随机推荐
- Bootstrap系列 -- 15. 下拉选择框select【转发】
<form role="form"> <div class="form-group"> <select class="f ...
- eclipse Java代码折叠工具
eclipse Java代码折叠工具 CreateTime--2018年5月17日15点09分 Author:Marydon 1.问题描述 eclipse自带的代码折叠工具,无法折叠try{}ca ...
- python之模块csv之CSV文件的写入(基本结构)
# -*- coding: utf-8 -*- #python 27 #xiaodeng #CSV文件的写入(基本结构) import csv #csv文件,是一种常用的文本格式,用以存储表格数据,很 ...
- 小程序九:导航&地图&画布
navigator 导航 属性名 类型 默认值 说明 url String 应用内的跳转链接 redirect Boolean false 是否关闭当前页面 hover-class String ...
- highstock使用案例(异步请求,懒加载)
jsp中导入:<script src="<c:url value="/resources/js/highstock.js"></c:url> ...
- <转>字符编码笔记:ASCII,Unicode和UTF-8
本文转自:http://www.ruanyifeng.com/blog/2007/10/ascii_unicode_and_utf-8.html 今天中午,我突然想搞清楚Unicode和UTF-8之间 ...
- JS打开新窗口防止被浏览器阻止的方法[转]
本文实例讲述了JS打开新窗口防止被浏览器阻止的方法.分享给大家供大家参考.具体分析如下: 用传统的window.open()方式打开新窗口,会被浏览器阻止,那么,我们如何才能让JS打开新窗口不被浏览器 ...
- python学习笔记——信号模块signal
基于python学习笔记——多进程间通信——Linux信号基础的学习基础,进一步学习Python标准库中的signal模块. 尽管signal是python中的模块,但是主要针对UNIX平台(比如Li ...
- SIPp常用脚本之二:UAS
看名字就能猜出来,这是作为SIP消息服务端的存在,启动uas,等着接受SIP消息并且给出响应. 一.uas.xml <?xml version="2.0" encoding= ...
- 在python中配置MySQL数据库
MySQL数据库(1) 尽管用文件形式将数据保存到磁盘,已经是一种不错的方式.但是,人们还是发明了更具有格式化特点,并且写入和读取更快速便捷的东西——数据库(如果阅读港台的资料,它们称之为“资料库”) ...