If you say mysql.server start, you die immediately. Help me.

Asked 2 years ago, Updated 2 years ago, 30 views

I'm using MacBook Pro Retina Elkepitane.

I installed mysql with brew and ran it, but it didn't work, so I started mysql.server. And then

ERROR! The server quit without updating PID file (/usr/local/var/mysql/ParkJunui-MacBook-Pro.local.pid).

He dies with this error. So I searched the .err file

can't open and lock privilege tables table 'mysql.user' doesn't exist

It comes out like this. I googled

Mysql_install_db --user=mysql and asked me to rerun it.

[WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize

[ERROR] The data directory needs to be specified.

You can't get this messageHow should I solve it?

mysql

2022-09-22 21:12

1 Answers

When I see the last error message, they want me to specify a data directory. A data directory is the place where all databases are stored.

You can specify it using the --datadir=path option in mysql_install_d. mysql_install_d myql Korean manual

If you used homebrew, the data directory location would be /usr/local/var/mysql. I think we can take care of it as below.

And myql_install_d is said to have been deprecated. Follow the mysqld usage manual . But it's in English


2022-09-22 21:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.