MySQL / MariaDB shuts down after exactly 1 minute 42 seconds - mysql

I've installed Homestead via VirtualBox and Vagrant on macOS Sierra. Everything works, except for some mysterious reason MySQL shuts itself down after the box has been up for longer than 1 minute 42 seconds...
I'm able to use MySQL without issue for the first 1 minute 42 seconds, but then suddenly the service shuts down and refuses further connections.
I tailed /var/log/syslog after the server came up, and the following syslog entries appearing:
Dec 10 20:02:25 homestead systemd[1]: mariadb.service: Start operation timed out. Terminating.
Dec 10 20:02:25 homestead mysqld[1611]: 2016-12-10 20:02:25 140574075632384 [Note] /usr/sbin/mysqld: Normal shutdown
Dec 10 20:02:25 homestead mysqld[1611]: 2016-12-10 20:02:25 140574075632384 [Note] Event Scheduler: Purging the queue. 0 events
Dec 10 20:02:25 homestead kernel: [ 100.520787] audit_printk_skb: 15 callbacks suppressed
Dec 10 20:02:25 homestead kernel: [ 100.520844] audit: type=1400 audit(1481400145.309:17): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1611 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=113 ouid=0
Dec 10 20:02:25 homestead mysqld[1611]: 2016-12-10 20:02:25 140573193234176 [Note] InnoDB: FTS optimize thread exiting.
Dec 10 20:02:25 homestead mysqld[1611]: 2016-12-10 20:02:25 140574075632384 [Note] InnoDB: Starting shutdown...
Dec 10 20:02:25 homestead systemd[1]: Started Session 4 of user vagrant.
Dec 10 20:02:26 homestead mysqld[1611]: 2016-12-10 20:02:26 140574075632384 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
Dec 10 20:02:27 homestead mysqld[1611]: 2016-12-10 20:02:27 140574075632384 [Note] InnoDB: Shutdown completed; log sequence number 1355249813
Dec 10 20:02:27 homestead mysqld[1611]: 2016-12-10 20:02:27 140574075632384 [Note] /usr/sbin/mysqld: Shutdown complete
Dec 10 20:02:27 homestead kernel: [ 102.937893] audit: type=1400 audit(1481400147.726:18): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=2030 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=113 ouid=0
Dec 10 20:02:27 homestead kernel: [ 102.938561] audit: type=1400 audit(1481400147.726:19): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1611 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=113 ouid=0
Dec 10 20:02:27 homestead systemd[1]: Failed to start MariaDB database server.
Dec 10 20:02:27 homestead systemd[1]: mariadb.service: Unit entered failed state.
Dec 10 20:02:27 homestead systemd[1]: mariadb.service: Failed with result 'timeout'.
Dec 10 20:02:27 homestead systemd[1]: Reached target Multi-User System.
Dec 10 20:02:27 homestead systemd[1]: Starting Notify bootloader that boot was successful...
Dec 10 20:02:27 homestead systemd[1]: Reached target Graphical Interface.
Dec 10 20:02:27 homestead systemd[1]: Starting Update UTMP about System Runlevel Changes...
Dec 10 20:02:27 homestead systemd[1]: Started Update UTMP about System Runlevel Changes.
Dec 10 20:02:27 homestead snap[2063]: Ignoring 'booted' on classic
Dec 10 20:02:27 homestead systemd[1]: Started Notify bootloader that boot was successful.
Dec 10 20:02:27 homestead systemd[1]: Startup finished in 5.989s (kernel) + 1min 36.860s (userspace) = 1min 42.850s.
The first line, where it says mariadb.service, gets logged the moment I get kicked out of MySQL. But I have no idea why.
It looks like the logs are implying MySQL / MariaDB are still trying to start up after the box has been brought up - even though I've been able to connect to them by this point without issue. Then some mystery timeout is hit, and the whole thing shuts down.
Can anyone help me interpret this...? Thanks!

Finally figured it out - AppArmor seems to be causing the problem.
By following the steps outlined here, I was able to resolve the issue, and MySQL no longer shuts down unexpected.

Related

mysql - failed unable to start

I don't know why this error
Error message:
root#li1714-176:/data/mysql# systemctl status mysqld.service
● mysqld.service - LSB: start and stop MySQL
Loaded: loaded (/etc/init.d/mysqld; generated)
Active: failed (Result: exit-code) since Wed 2020-03-25 08:47:34 CST; 23min ago
Docs: man:systemd-sysv-generator(8)
Process: 3776 ExecStart=/etc/init.d/mysqld start (code=exited, status=1/FAILURE)
Mar 25 08:47:32 li1714-176 systemd[1]: Starting LSB: start and stop MySQL...
Mar 25 08:47:32 li1714-176 mysqld[3776]: Starting MySQL
Mar 25 08:47:34 li1714-176 mysqld[3776]: .. * The server quit without updating PID file (/data/mysql/mysql.pid).
Mar 25 08:47:34 li1714-176 systemd[1]: mysqld.service: Control process exited, code=exited status=1
Mar 25 08:47:34 li1714-176 systemd[1]: mysqld.service: Failed with result 'exit-code'.
Mar 25 08:47:34 li1714-176 systemd[1]: Failed to start LSB: start and stop MySQL.
Mar 25 09:31:52 li1714-176 rsyslogd[588]: file '7' write error: No space left on device [v8.32.0 try http://www.rsyslog.com/e/2027 ]
Mar 25 09:31:52 li1714-176 rsyslogd[588]: action 'action 2' (module 'builtin:omfile') message lost, could not be processed. Check for additional error messa
Mar 25 09:31:52 li1714-176 rsyslogd[588]: file '7' write error: No space left on device [v8.32.0 try http://www.rsyslog.com/e/2027 ]
Mar 25 09:31:54 li1714-176 sshd[8551]: Failed password for invalid user mk from 170.231.57.142 port 6220 ssh2
Mar 25 09:31:54 li1714-176 sshd[8551]: Received disconnect from 170.231.57.142 port 6220:11: Bye Bye [preauth]
Mar 25 09:31:54 li1714-176 sshd[8551]: Disconnected from invalid user mk 170.231.57.142 port 6220 [preauth]
journalctl -u mysqld.service error:
Mar 25 06:40:19 li1714-176 systemd[1]: Starting LSB: start and stop MySQL...
Mar 25 06:40:19 li1714-176 mysqld[751]: Starting MySQL
Mar 25 06:40:21 li1714-176 mysqld[751]: .. * The server quit without updating PID file (/data/mysql/mysql.pid).
Mar 25 06:40:21 li1714-176 systemd[1]: mysqld.service: Control process exited, code=exited status=1
Mar 25 06:40:21 li1714-176 systemd[1]: mysqld.service: Failed with result 'exit-code'.
Mar 25 06:40:21 li1714-176 systemd[1]: Failed to start LSB: start and stop MySQL.
Mar 25 08:47:32 li1714-176 systemd[1]: Starting LSB: start and stop MySQL...
Mar 25 08:47:32 li1714-176 mysqld[3776]: Starting MySQL
Mar 25 08:47:34 li1714-176 mysqld[3776]: .. * The server quit without updating PID file (/data/mysql/mysql.pid).
Mar 25 08:47:34 li1714-176 systemd[1]: mysqld.service: Control process exited, code=exited status=1
Mar 25 08:47:34 li1714-176 systemd[1]: mysqld.service: Failed with result 'exit-code'.
Mar 25 08:47:34 li1714-176 systemd[1]: Failed to start LSB: start and stop MySQL.
Mar 25 09:31:40 li1714-176 systemd[1]: Starting LSB: start and stop MySQL...
Mar 25 09:31:40 li1714-176 mysqld[7625]: Starting MySQL
Mar 25 09:31:42 li1714-176 mysqld[7625]: .. * The server quit without updating PID file (/data/mysql/mysql.pid).
How to free up more space.
I want to start or extract the database normally
Given rsyslog is complaining about 'No space left on device' I suspect that mysql will have the same problem. It needs space to work as well.
journalctl -u mysqld.service
to see mysql errors, though it is probably also having limited recording due to out of space.
Fix the amount of free space on your storage and make all your programs happy.

Failed to start LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon

I am using MySQL Percona XtraDB Cluster with 3 node and MySQL service in one node did not work because of disk full. after fix the issue we try to start MySQL on this node but the following error occur: (before this issue all node had been working fine)
$ sudo /etc/init.d/mysql start
[....] Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
failed!
$ sudo systemctl status mysql.service
● mysql.service - LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon
Loaded: loaded (/etc/init.d/mysql; generated)
Drop-In: /etc/systemd/system/mysql.service.d
└─override.conf
Active: failed (Result: exit-code) since Tue 2020-03-24 11:57:55 +0430; 1h 2min ago
Docs: man:systemd-sysv-generator(8)
Process: 19397 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
Mar 24 11:57:47 server-3 systemd[1]: Starting LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon...
Mar 24 11:57:47 server-3 mysql[19397]: * Starting MySQL (Percona XtraDB Cluster) database server mysqld
Mar 24 11:57:55 server-3 mysql[19397]: * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
Mar 24 11:57:55 server-3 mysql[19397]: ...fail!
Mar 24 11:57:55 server-3 systemd[1]: mysql.service: Control process exited, code=exited status=1
Mar 24 11:57:55 server-3 systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 24 11:57:55 server-3 systemd[1]: Failed to start LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon.
Operating System: Ubuntu 18.04.2 LTS
mysql Ver 14.14 Distrib 5.7.25-28, for debian-linux-gnu (x86_64) using 7.0
also please find journalctl log in below:
$ sudo journalctl -xe
Journal file /var/log/journal/7e072ef87bdf452f8a9684d905f87daf/user-1863206337.journal is truncated, ignoring file.
Mar 24 19:05:22 server-3 pmm-agent[30366]: INFO[2020-03-24T19:05:22.235+04:30] time="2020-03-24T19:05:22+04:30" level=error msg="Error pinging mysqld: dial tcp 1
Mar 24 19:05:22 server-3 mysql[6820]: * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
Mar 24 19:05:22 server-3 mysql[6820]: ...fail!
Mar 24 19:05:22 server-3 systemd[1]: mysql.service: Control process exited, code=exited status=1
Mar 24 19:05:22 server-3 systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 24 19:05:22 server-3 systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 24 19:05:22 server-3 systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 24 19:05:22 server-3 systemd[1]: Failed to start LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has failed.
--
-- The result is RESULT.
Mar 24 19:05:22 server-3 sudo[6779]: pam_unix(sudo:session): session closed for user root
Mar 24 19:05:22 server-3 kernel: ACPI Error: SMBus/IPMI/GenericSerialBus write requires Buffer of length 66, found length 32 (20170831/exfield-427)
Mar 24 19:05:22 server-3 kernel: No Local Variables are initialized for Method [_PMM]
Mar 24 19:05:22 server-3 kernel: No Arguments are initialized for method [_PMM]
Mar 24 19:05:22 server-3 kernel: ACPI Error: Method parse/execution failed \_SB.PMI0._PMM, AE_AML_BUFFER_LIMIT (20170831/psparse-550)
Mar 24 19:05:22 server-3 kernel: ACPI Exception: AE_AML_BUFFER_LIMIT, Evaluating _PMM (20170831/power_meter-338)
Mar 24 19:05:23 server-3 snmpd[1805]: Connection from UDP: [192.168.2.10]:54620->[192.168.8.3]:161
Mar 24 19:05:23 server-3 snmpd[1805]: Connection from UDP: [192.168.2.10]:54647->[192.168.8.3]:161
Mar 24 19:05:25 server-3 pmm-agent[30366]: INFO[2020-03-24T19:05:25.550+04:30] time="2020-03-24T19:05:25+04:30" level=error msg="Error pinging mysqld: dial tcp 1
Mar 24 19:05:26 server-3 snmpd[1805]: Connection from UDP: [192.168.2.10]:55485->[192.168.8.3]:161
Mar 24 19:05:26 server-3 snmpd[1805]: Connection from UDP: [192.168.2.10]:55500->[192.168.8.3]:161
Mar 24 19:05:27 server-3 pmm-agent[30366]: INFO[2020-03-24T19:05:27.235+04:30] time="2020-03-24T19:05:27+04:30" level=error msg="Error pinging mysqld: dial tcp 1
Mar 24 19:05:27 server-3 kernel: ACPI Error: SMBus/IPMI/GenericSerialBus write requires Buffer of length 66, found length 32 (20170831/exfield-427)
Mar 24 19:05:27 server-3 kernel: No Local Variables are initialized for Method [_PMM]
Mar 24 19:05:27 server-3 kernel: No Arguments are initialized for method [_PMM]
Mar 24 19:05:27 server-3 kernel: ACPI Error: Method parse/execution failed \_SB.PMI0._PMM, AE_AML_BUFFER_LIMIT (20170831/psparse-550)
Mar 24 19:05:27 server-3 kernel: ACPI Exception: AE_AML_BUFFER_LIMIT, Evaluating _PMM (20170831/power_meter-338)
Mar 24 19:05:30 server-3 pmm-agent[30366]: INFO[2020-03-24T19:05:30.550+04:30] time="2020-03-24T19:05:30+04:30" level=error msg="Error pinging mysqld: dial tcp 1
Mar 24 19:05:31 server-3 pmm-agent[30366]: ERRO[2020-03-24T19:05:31.438+04:30] cannot select ##slow_query_log_file: dial tcp 127.0.0.1:3306: connect: connection
Mar 24 19:05:32 server-3 pmm-agent[30366]: INFO[2020-03-24T19:05:32.234+04:30] time="2020-03-24T19:05:32+04:30" level=error msg="Error pinging mysqld: dial tcp 1
Mar 24 19:05:32 server-3 kernel: ACPI Error: SMBus/IPMI/GenericSerialBus write requires Buffer of length 66, found length 32 (20170831/exfield-427)
Mar 24 19:05:32 server-3 kernel: No Local Variables are initialized for Method [_PMM]
Mar 24 19:05:32 server-3 kernel: No Arguments are initialized for method [_PMM]
Mar 24 19:05:32 server-3 kernel: ACPI Error: Method parse/execution failed \_SB.PMI0._PMM, AE_AML_BUFFER_LIMIT (20170831/psparse-550)
Mar 24 19:05:32 server-3 kernel: ACPI Exception: AE_AML_BUFFER_LIMIT, Evaluating _PMM (20170831/power_meter-338)
Mar 24 19:05:35 server-3 pmm-agent[30366]: INFO[2020-03-24T19:05:35.550+04:30] time="2020-03-24T19:05:35+04:30" level=error msg="Error pinging mysqld: dial tcp 1
Mar 24 19:05:36 server-3 sudo[7805]: admin_user : problem with defaults entries ; TTY=pts/0 ; PWD=/etc/systemd/system/mysql.service.d ; USER=root ;
Mar 24 19:05:36 server-3 sudo[7805]: admin_user : TTY=pts/0 ; PWD=/etc/systemd/system/mysql.service.d ; USER=root ; COMMAND=/bin/journalctl -xe
Mar 24 19:05:36 server-3 sudo[7805]: pam_unix(sudo:session): session opened for user root by admin_user(uid=0)
and please find mysqld.log in below:
/var/log$ sudo tail -n50 mysqld.log
2020-03-23T20:44:32.844540Z 36 [ERROR] WSREP: Node consistency compromised, aborting...
2020-03-23T20:44:32.844642Z 13 [ERROR] WSREP: Failed to apply trx: source: 89d92e92-6638-11e9-bdcb-7f2c26717188 version: 4 local: 0 state: APPLYING flags: 1 conn_id: 26113114 trx_id: 5580550846 seqnos (l: 151018291, g: 793430465, s: 793430462, d: 793430355, ts: 33700460567224654)
2020-03-23T20:44:32.844671Z 13 [ERROR] WSREP: Failed to apply trx 793430465 4 times
2020-03-23T20:44:32.844683Z 13 [ERROR] WSREP: Node consistency compromised, aborting...
2020-03-23T20:44:33.255602Z 21 [Note] WSREP: (c0cb4c75, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers: tcp://192.168.8.1:4567 tcp://192.168.8.2:4567
2020-03-23T20:44:37.817120Z 21 [Note] WSREP: declaring node with index 0 suspected, timeout PT5S (evs.suspect_timeout)
2020-03-23T20:44:37.817139Z 21 [Note] WSREP: declaring node with index 1 suspected, timeout PT5S (evs.suspect_timeout)
2020-03-23T20:44:37.817147Z 21 [Note] WSREP: evs::proto(c0cb4c75, LEAVING, view_id(REG,82cab7cb,31)) suspecting node: 82cab7cb
2020-03-23T20:44:37.817152Z 21 [Note] WSREP: evs::proto(c0cb4c75, LEAVING, view_id(REG,82cab7cb,31)) suspected node without join message, declaring inactive
2020-03-23T20:44:37.817158Z 21 [Note] WSREP: evs::proto(c0cb4c75, LEAVING, view_id(REG,82cab7cb,31)) suspecting node: 89d92e92
2020-03-23T20:44:37.817161Z 21 [Note] WSREP: evs::proto(c0cb4c75, LEAVING, view_id(REG,82cab7cb,31)) suspected node without join message, declaring inactive
2020-03-23T20:44:37.817182Z 21 [Note] WSREP: Current view of cluster as seen by this node
view (view_id(NON_PRIM,82cab7cb,31)
memb {
c0cb4c75,0
}
joined {
}
left {
}
partitioned {
82cab7cb,0
89d92e92,0
}
)
2020-03-23T20:44:37.817203Z 21 [Note] WSREP: Current view of cluster as seen by this node
view ((empty))
2020-03-23T20:44:37.817358Z 21 [Note] WSREP: gcomm: closed
2020-03-23T20:44:37.817463Z 0 [Note] WSREP: New COMPONENT: primary = no, bootstrap = no, my_idx = 0, memb_num = 1
2020-03-23T20:44:37.817504Z 0 [Note] WSREP: Flow-control interval: [10000, 10000]
2020-03-23T20:44:37.817515Z 0 [Note] WSREP: Trying to continue unpaused monitor
2020-03-23T20:44:37.817522Z 0 [Note] WSREP: Received NON-PRIMARY.
2020-03-23T20:44:37.817524Z 13 [ERROR] WSREP: non-standard exception
2020-03-23T20:44:37.817530Z 0 [Note] WSREP: Shifting DONOR/DESYNCED -> OPEN (TO: 793430465)
2020-03-23T20:44:37.817568Z 13 [Note] WSREP: applier thread exiting (code:8)
2020-03-23T20:44:37.817584Z 13 [Note] WSREP: Starting Shutdown
2020-03-23T20:44:37.817587Z 0 [Note] WSREP: Received self-leave message.
2020-03-23T20:44:37.817529Z 36 [ERROR] WSREP: non-standard exception
2020-03-23T20:44:37.817643Z 36 [Note] WSREP: applier thread exiting (code:8)
2020-03-23T20:44:37.817656Z 36 [Note] WSREP: Starting Shutdown
2020-03-23T20:44:37.817759Z 0 [Note] WSREP: Received shutdown signal. Will sleep for 10 secs before initiating shutdown. pxc_maint_mode switched to SHUTDOWN
2020-03-23T20:44:37.817813Z 0 [Note] WSREP: Flow-control interval: [10000, 10000]
2020-03-23T20:44:37.817841Z 0 [Note] WSREP: Trying to continue unpaused monitor
2020-03-23T20:44:37.817852Z 0 [Note] WSREP: Received SELF-LEAVE. Closing connection.
2020-03-23T20:44:37.817860Z 0 [Note] WSREP: Shifting OPEN -> CLOSED (TO: 793430465)
2020-03-23T20:44:37.817870Z 0 [Note] WSREP: RECV thread exiting 0: Success
2020-03-23T20:44:37.818185Z 21 [Note] WSREP: recv_thread() joined.
2020-03-23T20:44:37.818192Z 21 [Note] WSREP: Closing replication queue.
2020-03-23T20:44:37.818195Z 21 [Note] WSREP: Closing slave action queue.
2020-03-23T20:44:37.818247Z 21 [Note] WSREP: /usr/sbin/mysqld: Terminated.
How to start MySQL in this node?
thanks in advance.
As your myslqd.log shows, the disk full condition has left your node in a state, where it can find no way to achieve consistency with the cluster.
This implies, that you have to remove the node from the cluster, empty it out and then re-add it like a new node.

Can't Start MySQL Service Ubuntu

After editing /etc/mysql/mysql.conf.d/mysqld.cnf to change my bind address to allow external connections to my MySQL database, I tried restarting the MySQL service to get the following error:
ubuntu#resonance:/var/www/html$ sudo service mysql start
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
upon typing both of those commands, I get the following:
Nov 15 17:45:06 resonance systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Nov 15 17:45:06 resonance systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Nov 15 17:45:06 resonance audit[24219]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/24219/status" pid=24219 com
Nov 15 17:45:06 resonance audit[24219]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=24
Nov 15 17:45:06 resonance audit[24219]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/24219/status" pid=24219 com
Nov 15 17:45:06 resonance kernel: audit: type=1400 audit(1510767906.536:98): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="
Nov 15 17:45:06 resonance kernel: audit: type=1400 audit(1510767906.536:99): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="
Nov 15 17:45:06 resonance kernel: audit: type=1400 audit(1510767906.536:100): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name=
Nov 15 17:45:08 resonance systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Nov 15 17:45:26 resonance dhclient[1326]: DHCPREQUEST of 10.2.6.251 on ens3 to 10.2.11.18 port 67 (xid=0x7d5eaaff)
Nov 15 17:45:26 resonance dhclient[1326]: DHCPACK of 10.2.6.251 from 10.2.11.18
Nov 15 17:45:26 resonance root[24322]: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1
Nov 15 17:45:26 resonance dhclient[1326]: bound to 10.2.6.251 -- renewal in 53 seconds.
and
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start-post) since Wed 2017-11-15 17:46:38 UTC; 84ms ago
Process: 24586 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 24595 (mysqld); : 24596 (mysql-systemd-s)
Tasks: 3
Memory: 1.4M
CPU: 86ms
CGroup: /system.slice/mysql.service
├─24595 /usr/sbin/mysqld
└─control
├─24596 /bin/bash /usr/share/mysql/mysql-systemd-start post
└─24601 sleep 1
Nov 15 17:46:38 resonance systemd[1]: Starting MySQL Community Server...
any idea what I'm doing wrong? This is the file I changed:
https://pastebin.com/pevhYMNK
EDIT
So I tried changing the bind IP back to 127.0.0.1 and it started working again. What do I have to do to allow external connections? I really need it working.
You should comment out bind-address and skip-netwroking lines in your config and then restart.

MySQL Server 5.7 failed to start on Fedora Core 24

I have a relatively new install of MySQL 5.7 server on Fedora Core 24 that will not start up.
I had successfully moved the datadir to /data02/mysql/ from the default and started up the database just fine a couple of time, even loaded a 7GB database into it from a mysqldump.
Now I'm getting the below error "Job for mysqld.service failed because the control process exited with error code."
The MySQL Error log seems to suggest this is the issue
2016-08-27T04:57:06.855134Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2016-08-27T04:57:06.855195Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2016-08-27T04:57:06.855201Z 0 [ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
2016-08-27T04:57:06.855220Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
I have verified that:
partition /data02 is read/write
chown is set to mysql:mysql recursively on all files in /data02/mysql
chmod is set to 755 on /data02/mysql recursively.
NOTE: I did try 777 and that did not work either
pid file and mysql.sock are in locations that should be writeable.
Here's the directory listing showing 777 permissions
[root#localhost data02]# ls -al /data02/mysql
total 910768
drwxrwxrwx. 6 mysql mysql 4096 Aug 10 10:35 .
drwxrwxrwx. 6 root root 4096 Aug 14 03:19 ..
-rwxrwxrwx. 1 mysql mysql 56 Aug 4 03:47 auto.cnf
-rwxrwxrwx. 1 mysql mysql 1680 Aug 4 03:47 ca-key.pem
-rwxrwxrwx. 1 mysql mysql 1075 Aug 4 03:47 ca.pem
-rwxrwxrwx. 1 mysql mysql 1079 Aug 4 03:47 client-cert.pem
-rwxrwxrwx. 1 mysql mysql 1680 Aug 4 03:47 client-key.pem
-rwxrwxrwx. 1 mysql mysql 485738 Aug 10 10:35 ib_buffer_pool
-rwxrwxrwx. 1 mysql mysql 817889280 Aug 10 10:40 ibdata1
-rwxrwxrwx. 1 mysql mysql 50331648 Aug 10 10:38 ib_logfile0
-rwxrwxrwx. 1 mysql mysql 50331648 Aug 10 10:22 ib_logfile1
-rwxrwxrwx. 1 mysql mysql 12582912 Aug 4 22:38 ibtmp1
drwxrwxrwx. 2 mysql mysql 4096 Aug 4 03:47 mysql
-rwxrwxrwx. 1 mysql mysql 7 Aug 4 03:47 mysql_upgrade_info
drwxrwxrwx. 2 mysql mysql 4096 Aug 4 03:47 performance_schema
-rwxrwxrwx. 1 mysql mysql 1680 Aug 4 03:47 private_key.pem
-rwxrwxrwx. 1 mysql mysql 452 Aug 4 03:47 public_key.pem
-rwxrwxrwx. 1 mysql mysql 1079 Aug 4 03:47 server-cert.pem
-rwxrwxrwx. 1 mysql mysql 1676 Aug 4 03:47 server-key.pem
drwxrwxrwx. 2 mysql mysql 12288 Aug 4 03:47 sys
drwxrwxrwx. 2 mysql mysql 4096 Aug 4 22:55 test_tmp
Here's the server config
[root#localhost data02]# cat /etc/my.cnf.d/community-mysql-server.cnf
[server]
[mysqld]
datadir=/data02/mysql
socket=/data02/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
innodb_buffer_pool_size = 5G
I'm launching the process as 'root' but it starts up as 'mysql' as it should.
It last worked on Aug 10th. But was shutdown since then, An OS Patching had been run since then, but that's all to my knowledge.
Here's the startup cmds executed.
[root#localhost ~]# systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
[root#localhost ~]# systemctl status mysqld.service
● mysqld.service - MySQL 5.7 database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: inactive (dead) (Result: exit-code) since Sat 2016-08-27 04:26:52 UTC; 40s ago
Process: 5100 ExecStart=/usr/libexec/mysqld --daemonize --basedir=/usr --pid-file=/var/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
Process: 5066 ExecStartPre=/usr/libexec/mysql-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Process: 5043 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
Aug 27 04:26:52 localhost.localdomain systemd[1]: Failed to start MySQL 5.7 database server.
Aug 27 04:26:52 localhost.localdomain systemd[1]: mysqld.service: Unit entered failed state.
Aug 27 04:26:52 localhost.localdomain systemd[1]: mysqld.service: Failed with result 'exit-code'.
Aug 27 04:26:52 localhost.localdomain systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
Aug 27 04:26:52 localhost.localdomain systemd[1]: Stopped MySQL 5.7 database server.
Aug 27 04:26:52 localhost.localdomain systemd[1]: mysqld.service: Start request repeated too quickly.
Aug 27 04:26:52 localhost.localdomain systemd[1]: Failed to start MySQL 5.7 database server.

enabling event scheduler causes mysql silent failure

I'm using mysqld Ver 5.5.22-0ubuntu1 for debian-linux-gnu on x86_64 ((Ubuntu)) under Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-24-generic x86_64). Updates are current.
I had two events that were working fine, and then a power outage knocked the server out. Since then, mysql will not start if event_scheduler=ENABLED in /etc/mysql/my.cnf:
# service mysql restart
mysql stop/waiting
start: Job failed to start
I dropped both events and the event table is empty.
/var/log/mysql.err is completely empty.
There must be some events queued up somewhere but I can't seem to find them. Any assistance would be greatly appreciated.
Edit: /var/log/mysql/error.log doesn't give a whole lot more information:
130624 11:31:46 [Note] /usr/sbin/mysqld: Normal shutdown
130624 11:31:46 [Note] Event Scheduler: Purging the queue. 0 events
130624 11:31:48 [Warning] /usr/sbin/mysqld: Forcing close of thread 475 user: 'root'
130624 11:31:48 InnoDB: Starting shutdown...
130624 11:31:49 InnoDB: Shutdown completed; log sequence number 7222402477
130624 11:31:49 [Note] /usr/sbin/mysqld: Shutdown complete
Here's syslog for the same time period:
Jun 24 11:31:49 earth kernel: [4569993.677493] type=1400 audit(1372098709.303:19): apparmor="DENIED" operation="open" parent=1 profile="/usr/sbin/mysqld" name="/run/mysqld/mysqld.pid" pid=20660 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=102 ouid=102
Jun 24 11:31:49 earth kernel: [4569993.697382] type=1400 audit(1372098709.323:20): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=20666 comm="apparmor_parser"
Jun 24 11:31:49 earth kernel: [4569993.722622] init: mysql main process (20670) terminated with status 1
Jun 24 11:31:49 earth kernel: [4569993.722650] init: mysql main process ended, respawning
Jun 24 11:31:50 earth kernel: [4569994.727981] init: mysql post-start process (20671) terminated with status 1
Jun 24 11:31:50 earth kernel: [4569994.737481] type=1400 audit(1372098710.363:21): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=20694 comm="apparmor_parser"
Jun 24 11:31:50 earth kernel: [4569994.762575] init: mysql main process (20698) terminated with status 1
Jun 24 11:31:50 earth kernel: [4569994.762602] init: mysql main process ended, respawning
Jun 24 11:31:51 earth kernel: [4569995.767984] init: mysql post-start process (20699) terminated with status 1
Jun 24 11:31:51 earth kernel: [4569995.777498] type=1400 audit(1372098711.403:22): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=20722 comm="apparmor_parser"
Jun 24 11:31:51 earth kernel: [4569995.802326] init: mysql main process (20726) terminated with status 1
Jun 24 11:31:51 earth kernel: [4569995.802354] init: mysql respawning too fast, stopped
On newer debian installs the mysql error log goes to syslog by default. Check in /var/log/ there should be mysqld startup logs and maybe some errors related to the mysql.event table.