1

I installed MariaDB on macOS High Sierra via Homebrew and I try to make it run with native Apache and PHP from the system.

I can start the mysql server correctly with the command: mysql.server start

But when I try to access the database on Adminer or Phpmyadmin with the host 'localhost' I have the following error

No such file or directory

However if I try to connect by replacing 'localhost' with '127.0.0.1' it works and I can access the database.

Does anyone know how to make access work with 'localhost' ? I saw that it was a socket problem (mysql.sock) but impossible to solve it.

If anyone can help me I would be grateful !

Thanks !

blemee
  • 11
  • 2
  • Possible duplicate of [How to bind localhost to 127.0.0.1 on Mac?](https://stackoverflow.com/questions/37425150/how-to-bind-localhost-to-127-0-0-1-on-mac) – Hackerman Jun 28 '18 at 21:46
  • No because I can access to my Apache server with both localhost and 127.0.0.1. The problem occurs when trying to access to mysql... – blemee Jun 29 '18 at 06:45
  • Then I think that you have to create another user...you are connecting with `root@127.0.0.1` right...if you run this query `select * from mysql.user`you can see the current user list for your database server. – Hackerman Jun 29 '18 at 12:31

0 Answers0