I am not able to run mysql.
I get the error when I try to run mysql -u root -p
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
And when I try to sudo mysql.server start
I got another error.
ERROR! The server quit without updating PID file (/opt/homebrew/var/mysql/RFL723.local.pid).
I tried completely removing and reinstalling mysql@8.0.33
and mysql@5.7
many time.
attaching some log
2023-07-26T19:33:30.6NZ mysqld_safe Logging to '/opt/homebrew/var/mysql/RFL723.local.err'.
2023-07-26T19:33:30.6NZ mysqld_safe Starting mysqld daemon with databases from /opt/homebrew/var/mysql
2023-07-26T19:33:30.321526Z 0 [System] [MY-010116] [Server] /opt/homebrew/opt/mysql/bin/mysqld (mysqld 8.0.33) starting as process 61538
2023-07-26T19:33:30.322613Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /opt/homebrew/var/mysql/ is case insensitive
2023-07-26T19:33:30.322621Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2023-07-26T19:33:30.322658Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-07-26T19:33:30.322729Z 0 [System] [MY-010910] [Server] /opt/homebrew/opt/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.33) Homebrew.
2023-07-26T19:33:30.6NZ mysqld_safe mysqld from pid file /opt/homebrew/var/mysql/RFL723.local.pid ended
2023-07-26T19:33:40.6NZ mysqld_safe Logging to '/opt/homebrew/var/mysql/RFL723.local.err'.
2023-07-26T19:33:40.6NZ mysqld_safe Starting mysqld daemon with databases from /opt/homebrew/var/mysql
2023-07-26T19:33:40.600285Z 0 [System] [MY-010116] [Server] /opt/homebrew/opt/mysql/bin/mysqld (mysqld 8.0.33) starting as process 61645
2023-07-26T19:33:40.601389Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /opt/homebrew/var/mysql/ is case insensitive
2023-07-26T19:33:40.601396Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2023-07-26T19:33:40.601435Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-07-26T19:33:40.601505Z 0 [System] [MY-010910] [Server] /opt/homebrew/opt/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.33) Homebrew.
2023-07-26T19:33:40.6NZ mysqld_safe mysqld from pid file /opt/homebrew/var/mysql/RFL723.local.pid ended
2023-07-26T19:33:50.6NZ mysqld_safe Logging to '/opt/homebrew/var/mysql/RFL723.local.err'.
2023-07-26T19:33:50.6NZ mysqld_safe Starting mysqld daemon with databases from /opt/homebrew/var/mysql
2023-07-26T19:33:50.880612Z 0 [System] [MY-010116] [Server] /opt/homebrew/opt/mysql/bin/mysqld (mysqld 8.0.33) starting as process 61751
2023-07-26T19:33:50.881695Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /opt/homebrew/var/mysql/ is case insensitive
2023-07-26T19:33:50.881707Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2023-07-26T19:33:50.881740Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-07-26T19:33:50.881814Z 0 [System] [MY-010910] [Server] /opt/homebrew/opt/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.33) Homebrew.
2023-07-26T19:33:50.6NZ mysqld_safe mysqld from pid file /opt/homebrew/var/mysql/RFL723.local.pid ended
Current OS: 13.5 (22G74) Mac M2