Home / Misc /

Setting Up MariaDB on macOS

  1. install homebrew
  2. install MariaDB
  3. initialize mariadb and set permissions for phpmyadmin access
  4. Then from within mysql (replace MyNewPass with actual password - note that it's cached in your home directory)

    UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'MyNewPass' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
  5. as of this writing, the default paths for mariadb conf files are
  6. create a conf file (obviously adjust paths as necessary):
  7. edit the new conf file:
  8. add this line....
  9. ... so it looks like this:

    [mysqld]
    bind-address    = 0.0.0.0
    port            = 3306
    socket          = /tmp/mysql.sock
  10. install phpMyAdmin to your webserver to administer the mysql database
  11. I did this:

    1. copy config.sample.inc.php to config.inc.php
    2. edit settings in there (I only needed what was already uncommented)
    3. use cookie for login mode as it will prompt you when you go to site then

      $cfg['Servers'][$i]['auth_type'] = 'cookie';
      /* Server parameters */
      $cfg['Servers'][$i]['host'] = '127.0.0.1';
      $cfg['Servers'][$i]['connect_type'] = 'tcp';
    4. it worked like that
  12. Alternatively, it looks as if you can go to phpmyadminurl.com/setup and generate a conf file there, but then be sure to give it the same config.inc.php filename in the root directory of phpmyadmin. (easier if it works)
  13. Log on through phpmyadmin

this document last modified: October 06 2017 21:42

Home / Misc /