I installed mariadb on MacOS using homewbrew and used a database, but when I restarted my PC, I tried to start mariadb again. I received an error message

I referred to various sites, but I still couldn't start it.
If anyone has experience like this, I'd like to get some tips for starting mariadb

Error message
$mysql.server start
Starting MariaDB
.191121 06:19:07 mysqld_safe Logging to '/usr/local/var/mysql/MBP-AY.local.err'.
191121 06:19:07 mysqld_safe Starting mysqld daemon with databases from/usr/local/var/mysql
/usr/local/bin/mysql.server: line 264: kill: (27551)-No such process
$mysql.server stop
 ERROR! MariaDB server PID file could not be found!
$mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
$brew services restart mariadb
Stopping `mariadb` ... (might take a while)
==>Successfully stopped `mariadb` (label: homebrew.mxcl.mariadb)
==>Successfully started `mariadb` (label: homebrew.mxcl.mariadb)

A similar message was displayed when starting after re-installing with homebrew.

Supplemental information (FW/tool version etc.)

mariadb Ver 15.1 Distrib 10.4.10-MariaDB, for osx10.15 (x86_64) using readline 5.1

  • Answer # 1


    Reinstall homebrew

    Reinstall mariadb

    Reinstall homebrew

    We originally installed mariadb with homebrew and the installed mariadb wasn't functioning properly, so we tried to reinstall the package management tool itself. (Remarks: A permission error occurred when re-installing homebrew, so an error occurred when trying to grant authority with the chown command. When checked, the security setting of mac seems to be the cause and the security setting is set from recovery mode. (The chown command was enabled by changing it, and the permission error was also solved.) Reinstall mariadb

    As you have pointed out, we deleted the configuration folder created during the Maria db installation again and reinstalled it. Thank you for your cooperation


    Countermeasures for permission error when installing Homebrew

    For beginners Mac: Operation not permitted solution

    Uninstall mariadb installed with homebrew

    Mysql cannot be started (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2))

  • Answer # 2

    Did you really erase everything and reinstall! ?

  • Answer # 3

    What about starting withbrew services start mariadb?