MySQL Forums
Forum List  »  Newbie

Cannot login into MariaDB after restarting the machine
Posted by: Victor Vitu
Date: July 23, 2024 07:30AM

I'm using MacOS Sonoma 14.5 and trying to login in mariadb via terminal. However, when I execute

```sh
mariadb -uroot -password
```

It is returning

```error
ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mysql.sock' (2)
```

I searched online and the solution to this would be to generate a `mysql.sock` file by executing

```sh
brew services start mariadb
# OR brew services restart mariadb
```

However, I tried it, as you can see below:

```sh
$ brew services restart mariadb
Stopping `mariadb`... (might take a while)
==> Successfully stopped `mariadb` (label: homebrew.mxcl.mariadb)
==> Successfully started `mariadb` (label: homebrew.mxcl.mariadb)
```

Still, not any `mysql.sock` file is generated inside the `/tmp` folder and I can't login in the `mariadb` database.

```sh
victorcosta@Victors-MacBook-Pro:/tmp $ cd /tmp
victorcosta@Victors-MacBook-Pro:/tmp $ ls
com.apple.launchd.6mj6GfdTiF powerlog
```

So, how can I connect to `mariadb`?

Options: ReplyQuote


Subject
Written By
Posted
Cannot login into MariaDB after restarting the machine
July 23, 2024 07:30AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.