`sudo apt-get install mariadb`. The MacOS ™® way.
Сначала вас просят сделать:
```
lovegood:~ byte$ brew install mariadb
Warning: It appears you have Macports or Fink installed
Software installed with other package managers causes known problems for
Homebrew. If formula fail to build uninstall Macports/Fink and reinstall any
affected formula.
Also installing dependencies: readline
==> Downloading ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz
######################################################################## 100.0%
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file vi_mode.c
patching file callback.c
==> ./configure --prefix=/usr/local/Cellar/readline/6.2.1 --mandir=/usr/local/Ce
==> make install
==> Caveats
This formula is keg-only, so it was not symlinked into /usr/local.
OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.
Generally there are no consequences of this for you.
If you build your own software and it requires this formula, you'll need
to add its lib & include paths to your build variables:
LDFLAGS: -L/usr/local/Cellar/readline/6.2.1/lib
CPPFLAGS: -I/usr/local/Cellar/readline/6.2.1/include
==> Summary
/usr/local/Cellar/readline/6.2.1: 32 files, 2.1M, built in 31 seconds
==> Downloading http://ftp.osuosl.org/pub/mariadb/mariadb-5.2.6/kvm-tarbake-jaun
######################################################################## 100.0%
==> ./configure --without-docs --without-debug --disable-dependency-tracking --p
==> make install
==> Caveats
Set up databases with:
unset TMPDIR
mysql_install_db
If this is your first install, automatically load on login with:
cp /usr/local/Cellar/mariadb/5.2.6/com.mysql.mysqld.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
If this is an upgrade and you already have the com.mysql.mysqld.plist loaded:
launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
cp /usr/local/Cellar/mariadb/5.2.6/com.mysql.mysqld.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
Note on upgrading:
We overwrite any existing com.mysql.mysqld.plist in ~/Library/LaunchAgents
if we are upgrading because previous versions of this brew created the
plist with a version specific program argument.
Or start manually with:
mysql.server start
Warning: m4 macros were installed to "share/aclocal".
Homebrew does not append "/usr/local/share/aclocal"
to "/usr/share/aclocal/dirlist". If an autoconf script you use
requires these m4 macros, you'll need to add this path manually.
==> Summary
/usr/local/Cellar/mariadb/5.2.6: 231 files, 44M, built in 10.9 minutes
lovegood:~ byte$
```
Ну а потом, конечно:
```
➜ ~ mysql_install_db
Installing MariaDB/MySQL system tables in '/usr/local/var/mysql' ...
141002 15:06:20 [Note] InnoDB: Using mutexes to ref count buffer pool pages
141002 15:06:20 [Note] InnoDB: The InnoDB memory heap is disabled
141002 15:06:20 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
141002 15:06:20 [Note] InnoDB: Compressed tables use zlib 1.2.5
141002 15:06:20 [Note] InnoDB: Using CPU crc32 instructions
141002 15:06:20 [Note] InnoDB: Initializing buffer pool, size = 128.0M
141002 15:06:20 [Note] InnoDB: Completed initialization of buffer pool
141002 15:06:20 [Note] InnoDB: Highest supported file format is Barracuda.
141002 15:06:20 [Note] InnoDB: 128 rollback segment(s) are active.
141002 15:06:20 [Note] InnoDB: Waiting for purge to start
141002 15:06:20 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.19-67.0 started; log sequence number 1616707
141002 15:06:21 [Note] InnoDB: FTS optimize thread exiting.
141002 15:06:21 [Note] InnoDB: Starting shutdown...
141002 15:06:22 [Note] InnoDB: Shutdown completed; log sequence number 1616717
OK
Filling help tables...
141002 15:06:22 [Note] InnoDB: Using mutexes to ref count buffer pool pages
141002 15:06:22 [Note] InnoDB: The InnoDB memory heap is disabled
141002 15:06:22 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
141002 15:06:22 [Note] InnoDB: Compressed tables use zlib 1.2.5
141002 15:06:22 [Note] InnoDB: Using CPU crc32 instructions
141002 15:06:22 [Note] InnoDB: Initializing buffer pool, size = 128.0M
141002 15:06:22 [Note] InnoDB: Completed initialization of buffer pool
141002 15:06:22 [Note] InnoDB: Highest supported file format is Barracuda.
141002 15:06:22 [Note] InnoDB: 128 rollback segment(s) are active.
141002 15:06:22 [Note] InnoDB: Waiting for purge to start
141002 15:06:23 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.19-67.0 started; log sequence number 1616717
141002 15:06:23 [Note] InnoDB: FTS optimize thread exiting.
141002 15:06:23 [Note] InnoDB: Starting shutdown...
141002 15:06:25 [Note] InnoDB: Shutdown completed; log sequence number 1616727
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
'/usr/local/Cellar/mariadb/10.0.13/bin/mysqladmin' -u root password 'new-password'
'/usr/local/Cellar/mariadb/10.0.13/bin/mysqladmin' -u root -h Kostiantyns-MacBook-Pro.local password 'new-password'
Alternatively you can run:
'/usr/local/Cellar/mariadb/10.0.13/bin/mysql_secure_installation'
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.
You can start the MariaDB daemon with:
cd '/usr/local/Cellar/mariadb/10.0.13' ; /usr/local/Cellar/mariadb/10.0.13/bin/mysqld_safe --datadir='/usr/local/var/mysql'
You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/local/Cellar/mariadb/10.0.13/mysql-test' ; perl mysql-test-run.pl
Please report any problems at http://mariadb.org/jira
The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Support MariaDB development by buying support/new features from
SkySQL Ab. You can contact us about this at sales@skysql.com.
Alternatively consider joining our community based development effort:
http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
```
Пиздец, сколько же всего читать.