MYSQL server instance 8.0.13 automatically turned off and on randomly
Asked Answered
U

5

9

I have installed mysql 8.0.13 server with mysql community edition on Mac OS (10.14.1) Mojava. Next day i was unable to connect with mysql server. I start mysql instance and it turned to OFF mode as shown in figure.

enter image description here

I tried multiple solutions like;

  1. Update file com.oracle.oss.mysql.mysqld.plist keepAlive attribute to true

  2. change connection timeout from 180 to 280.

  3. No port is listening to 3306

  4. Firewall disable

Kindly tell what could be the issue?

Unearned answered 10/11, 2018 at 19:46 Comment(0)
U
2

This worked for me in MAC...

open Terminal and write the following

This will check all the instances that are currently running.

1) ps -ef | grep mysql

If you found any process Id with the above command.

2) sudo kill -9 [PID]

Where [PID] is the process id next to username like 5098

so it will be kill 5098

now you will restart again using the mysql server pane or by command

mysql.server start

Unearned answered 10/11, 2018 at 21:13 Comment(0)
K
1

None of these solutions worked for me. So, I attempted to debug the best I could, and I finally solved it.

Finding the problem

Open your terminal and run mysqld to attempt to start up the server. Check the logs and see the error encountered; this is your real issue.

Fixing the problem (permissions)

For me, the problem was permissions. To solve this, run the following: chown -R <username> <mysql-data-directory> where <username> is your username on the device and <mysql-data-directory> is where the mysql data directory is located (for me it was /usr/local/mysql/data)

Kleiman answered 13/6 at 14:20 Comment(0)
M
0

Make sure it is configured to connect on 3306. Sometimes MySQL configured itself on non-default port like 3307 or other. You can check by using following command.

SHOW GLOBAL VARIABLES LIKE 'PORT';

Mesenchyme answered 10/11, 2018 at 19:55 Comment(1)
yes it is listening to port 3306. but the issue is that is suddenly turns off again. when i try to start using system preference.Unearned
H
0

I ran into this issue as well on Ubuntu and it was because I had different versions in different locations. So a find to kill and remove them freed up the default port and it was happy ever after...haha

Hamadryad answered 22/6, 2020 at 18:44 Comment(0)
G
0

Not entirely sure why it worked, but I thought I'd share (because killing/stopping and restarting didn't work for me):

I've downloaded the tool DBngin and noticed that I had a MariaDB and a PostgreSQL DB running. After I'd stopped these processes, MySQL worked fine.

Genetics answered 16/7, 2020 at 12:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.