0

I'm using MacOS Ventura 13.0 with the Apple M1 Max chip, and I would like (and tried) to use MySQL Workbench. Maybe this problem is related to the bug "Crash after a select" at mysql.com. However...

When in the Terminal[*] I run the command ps aux|grep mysql multiple time in a few seconds then the PID number constantly increases each time I run the command:

input$    ps aux|grep mysql
output$   30364 ttys000      0:00.00 grep mysql

(after few seconds) 
input$    ps aux|grep mysql
output$   30366 ttys000    0:00.00 grep mysql

(after few seconds)
input$    ps aux|grep mysql
output$   30368 ttys000    0:00.00 grep mysql

...

(after few minutes)
input$    ps aux|grep mysql
output$   36322 ttys000    0:00.00 grep mysql

...

(after few hours)
input$    ps aux|grep mysql
output$   71252 ttys000    0:00.00 grep mysql

...

It's very strange. Also, this doesn't allow me to close/kill all the running mysql processes because a new mysql process is created each few seconds, even using sudo killall -9 mysql. Furthermore, in the /tmp/ folder, each few seconds there are created and deleted the mysql.sock.lock and mysqlx.sock.lock files in an automatic way!

I read and tried many possible solutions** (e.g. this, this and this) including this one, but the mysql PID increasing continues to happen.

How can I solve the problem? Any advice?


Notes: I migrated from an old Intel-based Mac to an Arm-based Mac.

[*]

The Terminal, if this info can help you to help me, outputs this when I launch it:

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.

[**]

Here are a few things I tried in order to stop mysql to create/delete new processes and files, without success:

Attempt 1 - Using the System Settings widget, but the Start/Stop button of MySQL Workbench didn't worked at all. I also tried to deactivate mysqld_safe in System Settings > General > Login Items without success.

Attempt 2 - Installing and unistalling MySQL (Workbench Arm64 version) via homebrew (brew) and binary file (downloaded .pkg), and restarting the OS many times.

Attempt 3 - Using the Terminal:

(with mysql installed via homebrew)
$ brew services stop mysql
==> Downloading https://formulae.brew.sh/api/formula.json
Warning: Service `mysql` is not started.

$ mysql.server stop
ERROR! MySQL server PID file could not be found!

$ /usr/local/bin/mysql.server stop
-bash: /usr/local/bin/mysql.server: No such file or directory

$ sudo killall -9 mysql
Password: ******
No matching processes were found

Other

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

$ brew services start mysql
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/<MyUserName>/Library/LaunchAgents/homebrew.mxcl.mysql.plist` exited with 5.

$ sudo brew services start mysql
Warning: Taking root:admin ownership of some mysql paths:
  /opt/homebrew/Cellar/mysql/8.0.32/bin
  /opt/homebrew/Cellar/mysql/8.0.32/bin/mysqld_safe
  /opt/homebrew/opt/mysql
  /opt/homebrew/opt/mysql/bin
  /opt/homebrew/var/homebrew/linked/mysql
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: mysql must be run as non-root to start at user login!
==> Successfully started `mysql` (label: homebrew.mxcl.mysql)

$ mysqld_safe
2023-02-21T23:19:50.6NZ mysqld_safe Logging to '/opt/homebrew/var/mysql/<MyMacName>.lan.err'.
2023-02-21T23:19:50.6NZ mysqld_safe Starting mysqld daemon with databases from /opt/homebrew/var/mysql
2023-02-21T23:19:51.6NZ mysqld_safe mysqld from pid file /opt/homebrew/var/mysql/<MyMacName>.lan.pid ended

Shadow
  • 33,525
  • 10
  • 51
  • 64
user502052
  • 14,803
  • 30
  • 109
  • 188

1 Answers1

0

Solved, at least to make MySQL to work on my Arm64 Apple Silicon!

Among others, the problem was related to permission denied to mysql files and folders.

After having installed the pkg mysql-8.0.31-macos12-x86_64.dmg (on the Arm64 Apple Silicon), I followed this.

Now, it seems to work !

user502052
  • 14,803
  • 30
  • 109
  • 188