Install mariaDB on Mac

I use mac ports to install mariaDB with the following command:

sudo port install mariadb-server

After the file is installed, I have no idea what will happen next?

I'm trying to find some kind of setup guide, but I failed, someone has some recommendations for the next steps after installation from Mac ports (for example, how to start and stop, configure, etc.).

+7
source share
3 answers

Install db

sudo -u _mysql /opt/local/lib/mariadb/bin/mysql_install_db 

Change root password

 /opt/local/lib/mariadb/bin/mysqladmin -u root password 'new-password' 

Alternatively, you can run:

 /opt/local/lib/mariadb/bin/mysql_secure_installation' 

You can start the MariaDB daemon with:

 cd /opt/local; /opt/local/lib/mariadb/bin/mysqld_safe --datadir='/opt/local/var/db/mariadb' 
+7
source

The configuration usually ends in / opt / local / somewhere ...

You probably need

 $ sudo port load mariadb-server 

to run it. AND

 $ sudo port unload mariadb-server 

to stop him.

This is exactly how macro files usually work - I have not tried this with mariadb specifically ...

Hope this helps a bit ...

+6
source

You can install it through Homebrew . It is very easy.

⚠️ You must have Homebrew installed

  2. $ brew update 3. $ brew search mariadb 4. $ brew install mariadb 

After installation, you need to activate it with:

 $ brew services start mariadb 

Or, if you do not want / need a background service, you can simply run:

 $ mysql.server start 
0
source

All Articles