一。安装Mysql服务端与Navicat Premium客户端

参见博客:https://blog.csdn.net/wtdask/article/details/79025674

安装mysql服务端:

Step1:使用brew命令安装 ($ brew install mysql)

安装完结果:

安装完成后:

1。启动mysql数据库

$ bash mysql.server start
$ sudo bash mysql.server start

注意:此时可能会报错:

此原因为:权限问题导致,可以应用下列命令修改权限。

sudo chmod -R a+rwx /usr/local/var/mysql

再执行

sudo mysql.server start

显示启动成功!

2。连接mysql数据库

mysql应用brew安装成功后,不需要密码,直接使用命令即可登录

$ mysql -uroot

修改,增加密码设置,输入如下命令

$ mysql_secure_installation

说明:

运行mysql_secure_installation会执行几个设置:

【1】。为root用户设置密码

【2】。删除匿名账号

【3】。取消root用户远程登录

【4】。删除test库和对test库的访问权限

【5】。刷新授权表使修改生效

代码如下:

 [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):<–初次运行直接回车

 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]<– 是否设置root用户密码,输入y并回车或直接回车

 New password:<– 设置root用户的密码

 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]<–是否禁止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]<– 是否删除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]<– 是否重新加载权限表,直接回车

 … 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 ~]#

设置完,可以安装一个 MySQLWorkbench 就可以可视化操作数据库了。

3。关闭mysql数据库

sudo mysql.server stop

4。重启mysql数据库

sudo mysql.server restart

5。关于my.cnf

通过brew安装的mysql似乎默认并没有使用my.cnf,直接使用默认配置启动

my.cnf文件位置

mysql --help | grep 'Default options' -A 1

mysql会按照以上情况顺序加载mysql,所以就按需建立一个吧.

参考博客:

https://segmentfault.com/a/1190000007838188

https://www.jianshu.com/p/3996f6a2fa45

二。使用Sequel Pro连接操作数据库

注意:因数据库为弹性数据库。所以Navicat Premium不支持弹性数据库。所以应用Sequel Pro 。

1.安装Sequel Pro方式一:

下载网址:https://sequelpro.com/download

2.安装Sequel Pro方式二:

可用brew命令安装:brew cask install sequel-pro

图形界面:

Mac007--Mysq服务端&客户端安装的更多相关文章

  1. chrony时间同步 服务端 客户端 安装配置

    chrony时间同步 服务端 客户端 安装配置 原创内容http://www.cnblogs.com/elvi/p/7658021.html #!/bin/sh #运行环境 centos7 #chro ...

  2. NTP时间同步 服务端 客户端 自动化安装配置

    NTP时间同步 服务端 客户端 自动化安装配置 原创内容 http://www.cnblogs.com/elvi/p/7657994.html #!/bin/sh #运行环境 centos6.cent ...

  3. SSR服务端一键安装脚本

    支持新协议混淆,SSR服务端一键安装脚本   Shadowsocks-R 是项目 shadowsocks 的增强版,用于方便地产生各种协议接口.实现为在原来的协议外套一层编码和解码接口,不但可以伪装成 ...

  4. HubbleDotNet 最新绿色版,服务端免安装,基于eaglet 最后V1.2.8.9版本开发,bug修正,支持一键生成同步表

    HubbleDotNet 是一个基于.net framework 的开源免费的全文搜索数据库组件.开源协议是 Apache 2.0.HubbleDotNet提供了基于SQL的全文检索接口,使用者只需会 ...

  5. TCP/IP网络编程之基于TCP的服务端/客户端(一)

    理解TCP和UDP 根据数据传输方式的不同,基于网络协议的套接字一般分为TCP套接字和UDP套接字.因为TCP套接字是面向连接的,因此又称为基于流(stream)的套接字.TCP是Transmissi ...

  6. ORACLE服务端详细安装步骤(配图解)

    ORACLE服务端的安装及配置 l 将下载的安装包解压缩,双击[setup.exe]文件,系统检查监听参数,耐心等待,完成后出现如下界面,电子邮件可不填,"我希望..."建议不勾选 ...

  7. react服务端/客户端,同构代码心得

    FKP-REST是一套全栈javascript框架   react服务端/客户端,同构代码心得 作者:webkixi react服务端/客户端,同构代码心得 服务端,客户端同构一套代码,大前端的梦想, ...

  8. 基于JAX-WS的Web Service服务端/客户端 ;JAX-WS + Spring 开发webservice

    一.基于JAX-WS的Web Service服务端/客户端 下面描述的是在main函数中使用JAX-WS的Web Service的方法,不是在web工程里访问,在web工程里访问,参加第二节. JAX ...

  9. JAVA WEBSERVICE服务端&客户端的配置及调用(基于JDK)

    前言:我之前是从事C#开发的,因公司项目目前转战JAVA&ANDROID开发,由于对JAVA的各种不了解,遇到的也是重重困难.目前在做WEBSERVICE提供数据支持,看了网上相关大片的资料也 ...

随机推荐

  1. WPF的DataTrigger使用

    首先创建一个空的项目 然后看看前台写的代码,如下图所示 <Grid> <StackPanel HorizontalAlignment="Center" Verti ...

  2. mysql导出函数或者存储过程 设置显示方式

    mysql导出函数或者存储过程 mysqldump -hhostname -uusername -ppassword -ntd -R databasename > /app/backupflie ...

  3. 新特性2-lambda表达式

    最近几天学习了一下lambda表达式,看了不少博客,感觉有一篇博客总结的一句话总结的很好:lambda表达式是一段可以传递的代码,它的核心思想是将面向对象中的传递数据变成传递行为.其实以前也有传递行为 ...

  4. 2018-09-10-weekly

    Algorithm 删除链表的倒数第N个节点 What:给定一个链表,删除链表的倒数第 n 个节点,并且返回链表的头结点. How:这是一道典型的利用双指针法解题.首先让指针first指向头节点,然后 ...

  5. ArrayUtils工具类更加方便的操作数据

    不废话,上代码: package com.jxd; import org.apache.commons.lang3.ArrayUtils; public class TestArr { /** * A ...

  6. AOP技术介绍--(AOP技术基础)

    2.1 AOP技术起源        AOP技术的诞生并不算晚,早在1990年开始,来自Xerox Palo Alto Research Lab(即PARC)的研究人员就对面向对象思想的局限性进行了分 ...

  7. 多线程AQS

    参考: AQS原理分析 https://blog.csdn.net/javazejian/article/details/75043422 重入读写锁原理分析 https://blog.csdn.ne ...

  8. windows2008R2-AD域控组策略设置与其它相关设置

    防火墙设置 修改>计算机配置>策略>安全设置>高级安全windows防火墙>高级安全windows防火墙 修改入站规则 1.组名-文件和打印机共享(SMB-In)> ...

  9. pandas.Series函数用法

    class pandas.Series(data=None, index=None, dtype=None, name=None, copy=False, fastpath=False) e.g., ...

  10. NIO编程之多客户端聊天系统

    1. 服务端 import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; im ...