mac下mysql安装及配置启动
---恢复内容开始---
原始链接:https://segmentfault.com/q/1010000000475470
按照如下方法成功安装并启动:
mysql.server start//启动服务
mysql -u root -p//登录
/usr/local/opt/mysql/bin/mmysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 8.0. Homebrew Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 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安装及配置启动的更多相关文章
- Linux下MySQL安装及配置
Linux下MySQL安装及配置 安装MySQL Ubuntu系统中,直接使用apt install的方式去安装MySQL的服务端和客户端,MySQL的客户端必须安装,否则无法通过命令连接并操作MyS ...
- Linux下MySQL安装和配置
--Linux下MySQL安装和配置 ---------------------------2014/05/18 Linux下MySQL的配置和安装 本文的安装采用 rpm 包安装 1.首先在官网下载 ...
- Mac下Maven安装与配置
Mac下Maven安装与配置 下载maven http://maven.apache.org/download.cgi main->download菜单下的Files 下载后解压在Documen ...
- mac下mysql数据库的配置
这里记录一下. 之前在mac下使用brew install mysql安装,但是安装完成后发现密码不好修改,上网搜了下发现mac下使用命令行安装mysql确实存在很多问题,这一点确实远不如Ubuntu ...
- mac 下mysql安装
系统环境: OS X Yosemite 10.10.3 登录用户: fx (有 sudo 权限) MySQL版本: 5.5.49 (mysql-5.5.49-osx10.9-x86_64.tar) M ...
- mac下mysql安装、卸载、基本操作
2018-06-08 10:57:26 张广森 阅读数 6584更多 分类专栏: mac mysql 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本 ...
- linux 下 mysql安装和配置
最近在学习R语言,看到R与数据库交互这一部分,就自己动手实践了一下,数据库选择的是mysql,主要记录下linux下怎么安装mysql. 网上的很多资料都有相关的文章,这里只是记录下自己安装过程中遇到 ...
- 解决mac 下mysql安装后root用户登录密码错误问题
使用的mac OS 10.11 安装mysql后访问root/root用户失败,网上找了一些解决办法,下面记录下解决方法方便以后自己查询 概述(看懂下面就不用看了): 停服务:sudo /usr/l ...
- Mac 下 Mosquitto 安装和配置 (Mosquitto为开源的mqtt服务器)
官网:http://mosquitto.org/download/ 官网的介绍简单明了 Mac 下一个命令“brew install mosquitto” 安装成功了,还学会了brew 安装目录:/u ...
随机推荐
- vs2019离线安装包下载
https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual- ...
- 《XXX重大技术需求征集系统》的可用性和可修改性战术分析
在网站的界面完整有效的呈现在最终用户面前前,其中经历的每一环节出现问题都会导致网站页面不可访问.原因如,如DNS被劫持.网站交换机失效,硬盘损坏,网卡松掉,机房停电等都可能导致网站不可用(网站故障)情 ...
- Python面向对象之魔术方法
__str__ 改变对象的字符串显示.可以理解为使用print函数打印一个对象时,会自动调用对象的__str__方法 class Student: def __init__(self, name, a ...
- LOJ.6504.[雅礼集训2018 Day5]Convex(回滚莫队)
LOJ 莫队.发现只需要维护前驱后继就可以了. 但是加入一个点需要找到它当前的前驱后继,很麻烦还带个\(\log\). 但是如果只有删除某个点,只需要更新一下它的前驱后继即可. 用回滚莫队就好惹. 撤 ...
- Vs2017 typescript 开发小问题
最近想写点ts的东西,以前用vs2015很方便,直接创建一个ts app项目就折腾了. Vs2017打开,居然发现这个项目模板不见了. 于是研究了一下,由于原来的ts app项目就是一个asp.n ...
- python is, ==区别
“is” is the identity comparison. #比较引用是否相同 “==” is the equality comparison. #比较内容是否相同 >>> [ ...
- Hibernate根据实体类自动创建表
Hibernate支持自动建表,在开发阶段很方便,可以保证hbm与数据库表结构的自动同步. 如何使用呢?很简单,只要在hibernate.cfg.xml里加上如下代码 Xml代码<propert ...
- XIV Open Cup named after E.V. Pankratiev. GP of America
A. Ancient Diplomacy 建图,同色点间边权为$0$,异色点间边权为$1$,则等价于找一个点使得到它最短路最长的点的最短路最小,Floyd即可. 时间复杂度$O(n^3)$. #inc ...
- angular.identity()
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- Solve Error: node postinstall sh: node: command not found
When install the yeoman using the following command: npm install -g yo You might have the following ...