Mac下brew安装与配置mysql
一、打开mac控制台
$ brew install mysql
二、启动mysql服务
$ mysql.server start
三、初始化mysql配置
1 rainMacBook-Pro:~ comet$ mysql_secure_installation
2
3 Securing the MySQL server deployment.
4
5 Connecting to MySQL using a blank password.
6
7 VALIDATE PASSWORD PLUGIN can be used to test passwords
8 and improve security. It checks the strength of password
9 and allows the users to set only those passwords which are
10 secure enough. Would you like to setup VALIDATE PASSWORD plugin?
11
12 Press y|Y for Yes, any other key for No: N // 这个选yes的话密码长度就必须要设置为8位以上,但我只想要6位的
13 Please set the password for root here.
14
15 New password: // 设置密码
16
17 Re-enter new password: // 再一次确认密码
18 By default, a MySQL installation has an anonymous user,
19 allowing anyone to log into MySQL without having to have
20 a user account created for them. This is intended only for
21 testing, and to make the installation go a bit smoother.
22 You should remove them before moving into a production
23 environment.
24
25 Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y // 移除不用密码的那个账户
26 Success.
27
28
29 Normally, root should only be allowed to connect from
30 'localhost'. This ensures that someone cannot guess at
31 the root password from the network.
32
33 Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n //不接受root远程登录账号
34
35 ... skipping.
36 By default, MySQL comes with a database named 'test' that
37 anyone can access. This is also intended only for testing,
38 and should be removed before moving into a production
39 environment.
40
41
42 Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y //删除text数据库
43 - Dropping test database...
44 Success.
45
46 - Removing privileges on test database...
47 Success.
48
49 Reloading the privilege tables will ensure that all changes
50 made so far will take effect immediately.
51
52 Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
53 Success.
54
55 All done!
一点、一点才能到达彼岸
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战