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. beego跨域请求配置

    不说废话 在main函数前加入如下代码 func init() { //跨域设置 var FilterGateWay = func(ctx *context.Context) {ctx.Respons ...

  2. 如何布局您的PC站和移动站,并表达两者之间内容的对应关系

      如何布局您的PC站和移动站,并表达两者之间内容的对应关系 目前较流量的PC站与移动站配置方式有三种,百度站在搜索引擎角度将这三种分别称为跳转适配.代码适配和自适应,以下为这三种配置方式的名词解释及 ...

  3. yocto-sumo源码解析(六): setup_bitbake

    1. 创造日志handler: 在status_only模式,不需要日志以及UI # Ensure logging messages get sent to the UI as events hand ...

  4. 琴声不等式--jensen

    (来自百度百科) 1. 凹函数,不加权 2. 凹函数,加权 3. 凸函数,不加权 4. 凸函数,加权 应用 在EM算法Q函数的推导中,用到了第二个不等式(凹函数,加权)

  5. 机器学习基础 --- numpy的基本使用

    一.numpy的简介 numpy是Python的一种开源的数值计算扩展库.这种工具可用来存储和处理大型矩阵,比Python自身的嵌套列表(nested list structure)结构要高效的多(该 ...

  6. [leetcode-921-Minimum Add to Make Parentheses Valid]

    Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', ...

  7. 互评Alpha版本—SkyHunter

    1.根据NABCD评论作品:   N(Need,需求):飞机大战题材的游戏对80,90后的人来说算是童年的记忆,可以在闲暇之余打开电脑玩一会儿.但是面向初中生,高中生的话这种PC小游戏可能不会那么适合 ...

  8. java程序设计第二次实验报告

    北京电子科技学院(BESTI) 实验报告 课程:数据结构    班级:1352    姓名:何伟钦     学号:20135223 成绩:            指导教师:娄嘉鹏      实验日期: ...

  9. 20162314 Experiment 2 - Tree

    Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...

  10. 任务看板-Monday

    工作照