1、查看mariadb包信息

# brew info mariadb

mariadb: stable 10.2.6 (bottled)
Drop-in replacement for MySQL
https://mariadb.org/
Conflicts with: mariadb-connector-c, mysql, mysql-cluster, mysql-connector-c, mytop, percona-server
/usr/local/Cellar/mariadb/10.1.23 (594 files, 155.5MB) *
Poured from bottle on 2017-05-14 at 17:49:24
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mariadb.rb
==> Dependencies
Build: cmake ✔
Required: openssl ✔
==> Options
--with-archive-storage-engine
Compile with the ARCHIVE storage engine enabled
--with-bench
Keep benchmark app when installing
--with-blackhole-storage-engine
Compile with the BLACKHOLE storage engine enabled
--with-embedded
Build the embedded server
--with-libedit
Compile with editline wrapper instead of readline
--with-local-infile
Build with local infile loading support
--with-test
Keep test when installing
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly. MySQL is configured to only allow connections from localhost by default To connect:
mysql -uroot To have launchd start mariadb now and restart at login:
brew services start mariadb
Or, if you don't want/need a background service you can just run:
mysql.server start

2、安装mariadb

# brew install mariadb

3、运行Installer

# unset TMPDIR
# cd /usr/local/Cellar/mariadb/10.1.23/
# mysql_install_db

4、启动服务(包信息中有说明如何启动)

后台启动,并且开机自启动
# brew services start mariadb
==> Tapping homebrew/services
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services'...
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 10 (delta 0), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (10/10), done.
Tapped 0 formulae (37 files, 51.1KB)
==> Successfully started `mariadb` (label: homebrew.mxcl.mariadb) 前台启动
# mysql.server start
Starting MySQL
.170529 21:36:17 mysqld_safe Logging to '/usr/local/var/mysql/bogon.err'.
170529 21:36:17 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
SUCCESS!

5、Secure the Installation

# mysql_secure_installation

6、查看版本

# mysql -uroot -p
MariaDB [(none)]> select @@version;
+-----------------+
| @@version |
+-----------------+
| 10.1.23-MariaDB |
+-----------------+
1 row in set (0.00 sec)

Mac上安装mariadb的更多相关文章

  1. 在Mac上安装IntelliJ IDEA

    这篇文章旨在介绍如何在Mac系统上安装IntelliJ IDEA,至于IntelliJ IDEA的介绍和使用方法,大家另行查阅,本篇的文章不再详细阐述. 简短解说,IntelliJ IDEA是可以用来 ...

  2. Mac上安装brew

    用过ubuntu系统的都知道,上面有一个命令apt-get 很方便可以快速的安装很多软件 特别lamp环境 都是一键安装. 在mac上也有类似的命令 brew brew用法可以访问官网地址  http ...

  3. mac 上安装服务,查看服务,重启和关闭

    首先了解下的Mac的 homebrew ,官网:https://brew.sh/index_zh-cn.html 简单的说: Homebrew 能干什么? 答:使用 Homebrew 安装 Apple ...

  4. Mac上安装brew 包管理工具

    Mac 上的包管理工具对于开发者来说是一件非常方便的工具,能够有效的对包进行管理. 所以这篇博客就来简单的讲一下brew 的安装和一些基础命令. brew 全称叫做Homebrew . 1. 首先来说 ...

  5. Mac上安装Charles进行抓包全流程设置

    安装 -- 官网下载最新版的Charles版本,按照提示安装即可 破解 -- https://blog.csdn.net/qq_25821067/article/details/79848589. M ...

  6. 【mac上安装&配置&使用git】

    转自:https://www.jianshu.com/p/7edb6b838a2e 目录 安装git 创建ssh key.配置git 提交本地项目到GitHub 一.安装Git MAC 上安装Git主 ...

  7. Mac上安装PHP、Apache、MySQL

    Mac自带php5.6版本,要升级到php7.3 步骤如下 1,brew 安装php ,如果没有安装,访问https://brew.sh/index_zh-cn安装在终端输入以下内容,不用指定安装ph ...

  8. Mac上安装第三方应用显示包资源破坏解决办法

    Mac上安装第三方应用显示包资源破坏解决办法 步骤1:Spotlight搜索(快捷键:command+空格或右上角搜索的符号):搜索 “终端”步骤2:直接复制粘贴 sudo spctl --maste ...

  9. 002-docker安装-mac上安装docker,17.06在CentOS7 64位机器上安装

    一.mac上安装docker 1.下载 通过这个链接下载:https://download.docker.com/mac/stable/Docker.dmg 2.安装 将 Moby 的鲸鱼图标拖拽到  ...

随机推荐

  1. 关于jsp中引用css外部样式无效时的处理方法

    今天做项目遇到的一个小问题,如下所示: <link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet ...

  2. Dede织梦验证码不显示,织梦后台登陆验证码不显示解决方法

    关于"织梦验证码不显示"的解决方法 "织梦验证码无法显示出来"的问题分析? 1.之前显示正常,但是换了服务器后就不能够正常显示:(这种通常是网站程序经过迁移后所 ...

  3. python FTP服务器实现(Python3)

    创建一个ftp.py文件(Linux环境),插入以下代码: from pyftpdlib.authorizers import DummyAuthorizer from pyftpdlib.handl ...

  4. java中重要的多线程工具类

    前言 之前学多线程的时候没有学习线程的同步工具类(辅助类).ps:当时觉得暂时用不上,认为是挺高深的知识点就没去管了.. 在前几天,朋友发了一篇比较好的Semaphore文章过来,然后在浏览博客的时候 ...

  5. “Hello World!”团队第五周第七次会议

    博客内容: 一.会议时间 二.会议地点 三.会议成员 四.会议内容 五.todo list 六.会议照片 七.燃尽图 八.checkout&push代码 一.会议时间 2017年11月16日  ...

  6. Linux基础入门--01~03

  7. Struts2框架学习

    Struts功能详解——ActionMapping对象 ActionMapping描述了struts中用户请求路径和Action的映射关系,在struts中每个ActionMapping都是通过pat ...

  8. System 类的使用

    /*System 系统类 主要用于获取系统的属性数据.System类常用的方法: arraycopy(Object src, int srcPos, Object dest, int destPos, ...

  9. c#学习路线及目录导航

    一 很久前的想法 转眼间,2018年已经过了四分之一,从我进入学校选择计算机专业到现在工作,已经过去了4年之久了.这一路走来经历了很多的曲折,对软件开发这个职业有了许多新的认识,我主要是从事NET领域 ...

  10. 【CS231N】6、神经网络动态部分:损失函数等

    一.疑问 二.知识点 1. 损失函数可视化 ​ 损失函数一般都是定义在高维度的空间中,这样要将其可视化就很困难.然而办法还是有的,在1个维度或者2个维度的方向上对高维空间进行切片,例如,随机生成一个权 ...