- MariaDB Cookbook
- Daniel Bartholomew
- 355字
- 2021-07-16 12:19:22
Installing MariaDB on Mac OS X
Installing MariaDB on Mac OS X is similar to installing it on Linux (refer to the previous recipe), with one important difference: the MariaDB developers do not provide the installer; instead, it is provided by the brew project.
Getting ready
In order to install MariaDB on Mac OS X, we must first install Xcode from the Mac App Store. Once that is installed, we need to install and configure brew
. The complete set of instructions for how to do this are on the brew website, http://brew.sh/, but the basic command is:
ruby -e \ "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
After installing brew, we will run the following doctor
command to make sure that everything is set up properly:
brew doctor
When the doctor
command finds an issue, and it might find several, it will print out a suggested fix for each one. To ensure that brew
is happy, we need to follow the instructions until the doctor
command gives us the following message:
Your system is ready to brew.
How to do it…
Let's get started by following the ensuing steps:
- Run the following commands in our terminal:
brew update brew install mariadb
- If there are any dependencies, they will be installed first, and then brew will download the latest stable MariaDB source code tarball, compile it, and then install it.
- Once the installation has finished, link the MariaDB startup
plist
to theLaunchAgents
directory as follows, so that MariaDB will start automatically:ln -sfv /usr/local/opt/mariadb/*.plist \ ~/Library/LaunchAgents
- To start MariaDB, use the following
launchctl
command to load theplist
file:launchctl load \ ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
- To stop MariaDB, unload the
plist
file:launchctl unload \ ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
How it works...
The brew installer works like a Linux package manager. Many open source software packages can be installed with it, including MariaDB.
The brew installer does not set a password for the root user, so the first thing that we should do after getting MariaDB running on Mac OS X is to run the mysql_secure_installation
script. For more information, refer to the Securing MariaDB with mysql_secure_installation recipe in Chapter 13, MariaDB Security.
- Learn ECMAScript(Second Edition)
- 高手是如何做產(chǎn)品設(shè)計(jì)的(全2冊)
- 自制編譯器
- Interactive Data Visualization with Python
- 深入淺出WPF
- 程序員考試案例梳理、真題透解與強(qiáng)化訓(xùn)練
- Scratch 3游戲與人工智能編程完全自學(xué)教程
- Linux環(huán)境編程:從應(yīng)用到內(nèi)核
- C語言程序設(shè)計(jì)案例精粹
- Advanced Oracle PL/SQL Developer's Guide(Second Edition)
- Swift細(xì)致入門與最佳實(shí)踐
- 單片機(jī)C語言程序設(shè)計(jì)實(shí)訓(xùn)100例
- Java程序設(shè)計(jì)案例教程
- Unity&VR游戲美術(shù)設(shè)計(jì)實(shí)戰(zhàn)
- 深入理解C指針