- Brew Mariadb Uninstall
- Brew Mariadb Password
- Brew Mariadb Stop
- Mariadb Brewery
- Mariadb Brewing Company
- Brew Mariadb Logs
- Brew Mariadb Can't Connect
Brew services restart mariadb I saw the following error: 'MAC HOMEBREW Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with' So I changed the tc.log extesion to tc.log.txt and restart mariadb. Brew services restart mariadb and done! MariaDB appears to be 'running' according to brew services: /tmp/mysql.sock does not actually exist while MariaDB is running: When I unlink MariaDB and relink and restart MySQL, that file does exist. Licenses used by MariaDB. MariaDB is distributed under the GPL license, version 2. The MariaDB client libraries for C, Java and ODBC are distributed under the LGPL license, version 2.1 or later. The LGPL license allows you to distribute these MariaDB client libraries freely with any application.
MariaDB is an alternative to MySQL database which is more performant with a full open license, you can install it easily on macOS via Homebrew.
The first step is to install Homebrew on your computer and possibly to remove any older MySQL database server versions.
Once Homebrew is installed, on the command line:
Then start the server:
To automatically start the MariaDB Server every time on restart (also known as a background service):
To login as root (no password is initially set):
or just:
When MariaDB starts on the command line you are entered into an interactive session, you will also see the database version, to exit the session use keys control+c to exit.
For more info on the MariaDB install you can also run:
To update MariaDB
To remove MariaDB
phpMyAdmin Authentication
If you are using phpMyAdmin locally, you will need to create a database user and password as MariaDB uses ‘sudo’ to login as root on the command line – but if you use root & no password in phpMyadmin it will not authenticate.
Login to mysql via command line:
sudo mysql -uroot
Create a user for phpmyadmin, change username and password to suit:
Use that for phpMyadmin access.
THIS GUIDE IS OLD! Go to http://echo.co/blog/os-x-1010-yosemite-local-development-environment-apache-php-and-mysql-homebrew for the Yosemite version.
Xcode
Go to http://developer.apple.com/downloads, log in with your Apple ID (free) and download the newest version of either Command Line Tools (OS X Lion) for Xcode or Command Line Tools (OS X Mountain Lion) for Xcode. Run the installer in the dmg and you'll have the LLVM compiler, make, and other build tools.
XQuartz
Install XQuarts to satisfy a library dependency for PHP.
Open terminal and run the following steps in the command prompt to install brew and bring it up to date:
Edit ~/.bash_profile and put /usr/local/bin at the beginning. This command attempts to do this automatically:
Brew Mariadb Uninstall
MariaDB may use cmake as part of its compilation process, and cmake has java as a dependency. If this pops up during the MariaDB build, choose to Install:
Set up MariaDB, set to start on boot, and start now:
NOTE: These instructions are for PHP 5.3. If you want PHP 5.4, change all instances of php53 to php54, and 5.3 to 5.4. If you want to later switch from php53 to php54, you would need to run brew unlink php53 && brew link php54 for brew to symlink the appropriate files in /usr/local/bin.
Add the dupes and php taps:
Install PHP:
Brew Mariadb Password
Set timezone, and increase timeouts and memory values (this is a single command):
Add a PHP error log; without this, you may get Internal Server Errors if PHP has errors to write and no logs to write to (be sure to copy and paste the lines containing USERHOME through the last EOF as a single command):

Install PHP extensions and add configuration to php53:
Start PHP-FPM and start on boot:
Brew Mariadb Stop
Note that even though php-fpm.conf has _www as the user and group, it will run as your user because you're not loading the plist as root.
Also, php-fpm.conf is pre-configured to have min-servers, kind of like Apache, which are unnecessary on a laptop where you should never be loading more than 2 pages at a time. Consider changing pm = dynamic to pm = ondemand. The comments around that section will explain how to lower the maximum number of FPM processes, which I'd recommend setting to 2, and the timeout value to 5s. PHP-FPM will have to start processes more often, but it'll also kill idle processes when they're no longer needed, saving RAM.
Add the apache tap:
Due to a bug in OS X's apr-1-config tool, this will create symlinks for the non-existent OSX10.8.xctoolchain directory. You're welcome to try the following brew command without this, but you'll need to run this if it fails to install:
Mariadb Brewery
We'll use mod_fastcgi to run PHP with PHP-FPM:
Create the logs directory:
Mariadb Brewing Company
VirtualHosts (be sure to copy and paste the lines containing USERHOME through the last EOF as a single command):
Brew Mariadb Logs
If you read that closely, you'll see that it's set up to do MassVirtualHosts using the *.dev tld. For example, set up a web root at $HOME/Sites/project and you will be able to view it at http://project.dev without needing to create a separate VirtualHost. A custom log format is used, putting the domain name at the beginning of the line, so you can easily see the output as it related to a project.
Brew Mariadb Can't Connect
Restart Apache (if it was running) and set to start on boot:
