Skip to content
Install PHP and MariaDB

Install PHP and MariaDB

Install PHP and MariaDB

1brew install php
1brew install mariadb
1brew install node
1A "/etc/my.cnf" from another install may interfere with a Homebrew-built
2server starting up correctly.
3
4MySQL is configured to only allow connections from localhost by default
5
6To start mariadb now and restart at login:
7  brew services start mariadb
8Or, if you don't want/need a background service you can just run:
9  /opt/homebrew/opt/mariadb/bin/mariadbd-safe --datadir\=/opt/homebrew/var/mysql

Add local admin user to MariaDB

1CREATE USER 'admin'@'localhost' IDENTIFIED BY 'some_pass';
2GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
3FLUSH PRIVILEGES;