MySQL server crashing on launch on Ubuntu server
So, whenever I try to launch/install MySQL server it crashes with this log
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13 - Permission denied)
2019-01-15T05:42:42.237951Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T05:42:42.239858Z 0 [Note] mysqld (mysqld 5.7.24-0ubuntu0.18.04.1) starting as process 25348 ...
2019-01-15T05:42:42.242935Z 0 [ERROR] failed to set datadir to /var/lib/mysql/
2019-01-15T05:42:42.242951Z 0 [ERROR] Aborting
2019-01-15T05:42:42.242968Z 0 [Note] Binlog end
2019-01-15T05:42:42.243042Z 0 [Note] mysqld: Shutdown complete
Now, this folder its talking about, /var/lib/mysql now wait. alot of my apps are crashing on startup talking about var being "world writeable". and I remember accidentally running chmod -R 777 on /var. so, I think it's a problem with the entirety of /var. if anyone can somehow figure out the original permissions with this and can help me fix this, I will be VERY grateful when I run ls -la /var I get
ep1c_m1n10n@vault1:/$ ls -la /var
total 64
drwxrwxrwx 16 root root 4096 Aug 18 23:35 .
drwxr-xr-x 29 root root 4096 Jan 15 05:15 ..
drwx------ 2 root root 4096 Jan 14 06:25 backups
drwx------ 17 root root 4096 Jan 15 02:53 cache
drwx------ 2 root root 4096 Jan 15 04:56 crash
drwx------ 51 root root 4096 Jan 15 05:11 lib
drwx--S--- 2 root staff 4096 Apr 24 2018 local
lrwxrwxrwx 1 root root 9 Apr 26 2018 lock -> /run/lock
drwx------ 19 root syslog 4096 Jan 15 04:56 log
drwx--S--- 2 root mail 4096 Apr 26 2018 mail
drwx------ 3 root root 4096 Nov 29 01:42 opt
lrwxrwxrwx 1 root root 4 Apr 26 2018 run -> /run
drwx------ 3 root root 4096 Jul 16 2018 snap
drwx------ 8 root root 4096 Jan 13 12:17 spool
drwx------ 10 root root 4096 Jan 15 05:39 tmp
drwx------ 3 root bin 4096 Jul 16 19:42 usermin
drwx------ 5 root bin 4096 Jan 15 04:49 webmin
drwxrwxrwx 3 root root 4096 Jul 16 2018 www
permissions mysql
add a comment |
So, whenever I try to launch/install MySQL server it crashes with this log
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13 - Permission denied)
2019-01-15T05:42:42.237951Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T05:42:42.239858Z 0 [Note] mysqld (mysqld 5.7.24-0ubuntu0.18.04.1) starting as process 25348 ...
2019-01-15T05:42:42.242935Z 0 [ERROR] failed to set datadir to /var/lib/mysql/
2019-01-15T05:42:42.242951Z 0 [ERROR] Aborting
2019-01-15T05:42:42.242968Z 0 [Note] Binlog end
2019-01-15T05:42:42.243042Z 0 [Note] mysqld: Shutdown complete
Now, this folder its talking about, /var/lib/mysql now wait. alot of my apps are crashing on startup talking about var being "world writeable". and I remember accidentally running chmod -R 777 on /var. so, I think it's a problem with the entirety of /var. if anyone can somehow figure out the original permissions with this and can help me fix this, I will be VERY grateful when I run ls -la /var I get
ep1c_m1n10n@vault1:/$ ls -la /var
total 64
drwxrwxrwx 16 root root 4096 Aug 18 23:35 .
drwxr-xr-x 29 root root 4096 Jan 15 05:15 ..
drwx------ 2 root root 4096 Jan 14 06:25 backups
drwx------ 17 root root 4096 Jan 15 02:53 cache
drwx------ 2 root root 4096 Jan 15 04:56 crash
drwx------ 51 root root 4096 Jan 15 05:11 lib
drwx--S--- 2 root staff 4096 Apr 24 2018 local
lrwxrwxrwx 1 root root 9 Apr 26 2018 lock -> /run/lock
drwx------ 19 root syslog 4096 Jan 15 04:56 log
drwx--S--- 2 root mail 4096 Apr 26 2018 mail
drwx------ 3 root root 4096 Nov 29 01:42 opt
lrwxrwxrwx 1 root root 4 Apr 26 2018 run -> /run
drwx------ 3 root root 4096 Jul 16 2018 snap
drwx------ 8 root root 4096 Jan 13 12:17 spool
drwx------ 10 root root 4096 Jan 15 05:39 tmp
drwx------ 3 root bin 4096 Jul 16 19:42 usermin
drwx------ 5 root bin 4096 Jan 15 04:49 webmin
drwxrwxrwx 3 root root 4096 Jul 16 2018 www
permissions mysql
add a comment |
So, whenever I try to launch/install MySQL server it crashes with this log
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13 - Permission denied)
2019-01-15T05:42:42.237951Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T05:42:42.239858Z 0 [Note] mysqld (mysqld 5.7.24-0ubuntu0.18.04.1) starting as process 25348 ...
2019-01-15T05:42:42.242935Z 0 [ERROR] failed to set datadir to /var/lib/mysql/
2019-01-15T05:42:42.242951Z 0 [ERROR] Aborting
2019-01-15T05:42:42.242968Z 0 [Note] Binlog end
2019-01-15T05:42:42.243042Z 0 [Note] mysqld: Shutdown complete
Now, this folder its talking about, /var/lib/mysql now wait. alot of my apps are crashing on startup talking about var being "world writeable". and I remember accidentally running chmod -R 777 on /var. so, I think it's a problem with the entirety of /var. if anyone can somehow figure out the original permissions with this and can help me fix this, I will be VERY grateful when I run ls -la /var I get
ep1c_m1n10n@vault1:/$ ls -la /var
total 64
drwxrwxrwx 16 root root 4096 Aug 18 23:35 .
drwxr-xr-x 29 root root 4096 Jan 15 05:15 ..
drwx------ 2 root root 4096 Jan 14 06:25 backups
drwx------ 17 root root 4096 Jan 15 02:53 cache
drwx------ 2 root root 4096 Jan 15 04:56 crash
drwx------ 51 root root 4096 Jan 15 05:11 lib
drwx--S--- 2 root staff 4096 Apr 24 2018 local
lrwxrwxrwx 1 root root 9 Apr 26 2018 lock -> /run/lock
drwx------ 19 root syslog 4096 Jan 15 04:56 log
drwx--S--- 2 root mail 4096 Apr 26 2018 mail
drwx------ 3 root root 4096 Nov 29 01:42 opt
lrwxrwxrwx 1 root root 4 Apr 26 2018 run -> /run
drwx------ 3 root root 4096 Jul 16 2018 snap
drwx------ 8 root root 4096 Jan 13 12:17 spool
drwx------ 10 root root 4096 Jan 15 05:39 tmp
drwx------ 3 root bin 4096 Jul 16 19:42 usermin
drwx------ 5 root bin 4096 Jan 15 04:49 webmin
drwxrwxrwx 3 root root 4096 Jul 16 2018 www
permissions mysql
So, whenever I try to launch/install MySQL server it crashes with this log
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13 - Permission denied)
2019-01-15T05:42:42.237951Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T05:42:42.239858Z 0 [Note] mysqld (mysqld 5.7.24-0ubuntu0.18.04.1) starting as process 25348 ...
2019-01-15T05:42:42.242935Z 0 [ERROR] failed to set datadir to /var/lib/mysql/
2019-01-15T05:42:42.242951Z 0 [ERROR] Aborting
2019-01-15T05:42:42.242968Z 0 [Note] Binlog end
2019-01-15T05:42:42.243042Z 0 [Note] mysqld: Shutdown complete
Now, this folder its talking about, /var/lib/mysql now wait. alot of my apps are crashing on startup talking about var being "world writeable". and I remember accidentally running chmod -R 777 on /var. so, I think it's a problem with the entirety of /var. if anyone can somehow figure out the original permissions with this and can help me fix this, I will be VERY grateful when I run ls -la /var I get
ep1c_m1n10n@vault1:/$ ls -la /var
total 64
drwxrwxrwx 16 root root 4096 Aug 18 23:35 .
drwxr-xr-x 29 root root 4096 Jan 15 05:15 ..
drwx------ 2 root root 4096 Jan 14 06:25 backups
drwx------ 17 root root 4096 Jan 15 02:53 cache
drwx------ 2 root root 4096 Jan 15 04:56 crash
drwx------ 51 root root 4096 Jan 15 05:11 lib
drwx--S--- 2 root staff 4096 Apr 24 2018 local
lrwxrwxrwx 1 root root 9 Apr 26 2018 lock -> /run/lock
drwx------ 19 root syslog 4096 Jan 15 04:56 log
drwx--S--- 2 root mail 4096 Apr 26 2018 mail
drwx------ 3 root root 4096 Nov 29 01:42 opt
lrwxrwxrwx 1 root root 4 Apr 26 2018 run -> /run
drwx------ 3 root root 4096 Jul 16 2018 snap
drwx------ 8 root root 4096 Jan 13 12:17 spool
drwx------ 10 root root 4096 Jan 15 05:39 tmp
drwx------ 3 root bin 4096 Jul 16 19:42 usermin
drwx------ 5 root bin 4096 Jan 15 04:49 webmin
drwxrwxrwx 3 root root 4096 Jul 16 2018 www
permissions mysql
permissions mysql
edited Jan 15 at 17:00
Codito ergo sum
1,5043825
1,5043825
asked Jan 15 at 5:49
Ep1c_M1n10nEp1c_M1n10n
31
31
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
To begin with /var needs to be
drwxr-xr-x 12 root root 4096 Mar 23 2016 var
The contents of /var that we both have I have this:
drwxrwsr-x 2 root staff 4096 Apr 11 2014 local
drwxr-xr-x 2 root root 4096 Apr 16 2014 opt
lrwxrwxrwx 1 root root 9 Jun 13 2014 lock -> /run/lock
lrwxrwxrwx 1 root root 4 Jun 13 2014 run -> /run
drwxrwsrwt 2 root mail 4096 Apr 10 2016 mail
drwxr-xr-x 6 root root 4096 Aug 2 2016 spool
drwxr-xr-x 11 root root 4096 Aug 2 2016 cache
drwxr-xr-x 57 root root 4096 Jul 25 2017 lib
drwxrwxrwt 2 root root 4096 Jul 27 06:25 crash
drwxr-xr-x 2 root root 4096 Jul 28 06:25 backups
drwxrwxrwt 2 root root 4096 Nov 7 14:55 tmp
drwxrwxr-x 12 root syslog 4096 Nov 19 06:25 log
- My www is a sym,link so not including that one.
chmod -R 777 on /var
You did more than that. Lots of files amd directories you show do not have 777 set.
hmm, i might have changed some things with permissions while copy/pasting stuff from the internet trying to fix this. but the problems started after i set /var to 777. samba and proftpd broke at the same time
– Ep1c_M1n10n
Jan 15 at 8:29
setting /var to drwxr-xr-x or 755 made it work
– Ep1c_M1n10n
Jan 16 at 3:35
Pfew ;) glad you got it working again
– Rinzwind
Jan 16 at 8:15
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109825%2fmysql-server-crashing-on-launch-on-ubuntu-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
To begin with /var needs to be
drwxr-xr-x 12 root root 4096 Mar 23 2016 var
The contents of /var that we both have I have this:
drwxrwsr-x 2 root staff 4096 Apr 11 2014 local
drwxr-xr-x 2 root root 4096 Apr 16 2014 opt
lrwxrwxrwx 1 root root 9 Jun 13 2014 lock -> /run/lock
lrwxrwxrwx 1 root root 4 Jun 13 2014 run -> /run
drwxrwsrwt 2 root mail 4096 Apr 10 2016 mail
drwxr-xr-x 6 root root 4096 Aug 2 2016 spool
drwxr-xr-x 11 root root 4096 Aug 2 2016 cache
drwxr-xr-x 57 root root 4096 Jul 25 2017 lib
drwxrwxrwt 2 root root 4096 Jul 27 06:25 crash
drwxr-xr-x 2 root root 4096 Jul 28 06:25 backups
drwxrwxrwt 2 root root 4096 Nov 7 14:55 tmp
drwxrwxr-x 12 root syslog 4096 Nov 19 06:25 log
- My www is a sym,link so not including that one.
chmod -R 777 on /var
You did more than that. Lots of files amd directories you show do not have 777 set.
hmm, i might have changed some things with permissions while copy/pasting stuff from the internet trying to fix this. but the problems started after i set /var to 777. samba and proftpd broke at the same time
– Ep1c_M1n10n
Jan 15 at 8:29
setting /var to drwxr-xr-x or 755 made it work
– Ep1c_M1n10n
Jan 16 at 3:35
Pfew ;) glad you got it working again
– Rinzwind
Jan 16 at 8:15
add a comment |
To begin with /var needs to be
drwxr-xr-x 12 root root 4096 Mar 23 2016 var
The contents of /var that we both have I have this:
drwxrwsr-x 2 root staff 4096 Apr 11 2014 local
drwxr-xr-x 2 root root 4096 Apr 16 2014 opt
lrwxrwxrwx 1 root root 9 Jun 13 2014 lock -> /run/lock
lrwxrwxrwx 1 root root 4 Jun 13 2014 run -> /run
drwxrwsrwt 2 root mail 4096 Apr 10 2016 mail
drwxr-xr-x 6 root root 4096 Aug 2 2016 spool
drwxr-xr-x 11 root root 4096 Aug 2 2016 cache
drwxr-xr-x 57 root root 4096 Jul 25 2017 lib
drwxrwxrwt 2 root root 4096 Jul 27 06:25 crash
drwxr-xr-x 2 root root 4096 Jul 28 06:25 backups
drwxrwxrwt 2 root root 4096 Nov 7 14:55 tmp
drwxrwxr-x 12 root syslog 4096 Nov 19 06:25 log
- My www is a sym,link so not including that one.
chmod -R 777 on /var
You did more than that. Lots of files amd directories you show do not have 777 set.
hmm, i might have changed some things with permissions while copy/pasting stuff from the internet trying to fix this. but the problems started after i set /var to 777. samba and proftpd broke at the same time
– Ep1c_M1n10n
Jan 15 at 8:29
setting /var to drwxr-xr-x or 755 made it work
– Ep1c_M1n10n
Jan 16 at 3:35
Pfew ;) glad you got it working again
– Rinzwind
Jan 16 at 8:15
add a comment |
To begin with /var needs to be
drwxr-xr-x 12 root root 4096 Mar 23 2016 var
The contents of /var that we both have I have this:
drwxrwsr-x 2 root staff 4096 Apr 11 2014 local
drwxr-xr-x 2 root root 4096 Apr 16 2014 opt
lrwxrwxrwx 1 root root 9 Jun 13 2014 lock -> /run/lock
lrwxrwxrwx 1 root root 4 Jun 13 2014 run -> /run
drwxrwsrwt 2 root mail 4096 Apr 10 2016 mail
drwxr-xr-x 6 root root 4096 Aug 2 2016 spool
drwxr-xr-x 11 root root 4096 Aug 2 2016 cache
drwxr-xr-x 57 root root 4096 Jul 25 2017 lib
drwxrwxrwt 2 root root 4096 Jul 27 06:25 crash
drwxr-xr-x 2 root root 4096 Jul 28 06:25 backups
drwxrwxrwt 2 root root 4096 Nov 7 14:55 tmp
drwxrwxr-x 12 root syslog 4096 Nov 19 06:25 log
- My www is a sym,link so not including that one.
chmod -R 777 on /var
You did more than that. Lots of files amd directories you show do not have 777 set.
To begin with /var needs to be
drwxr-xr-x 12 root root 4096 Mar 23 2016 var
The contents of /var that we both have I have this:
drwxrwsr-x 2 root staff 4096 Apr 11 2014 local
drwxr-xr-x 2 root root 4096 Apr 16 2014 opt
lrwxrwxrwx 1 root root 9 Jun 13 2014 lock -> /run/lock
lrwxrwxrwx 1 root root 4 Jun 13 2014 run -> /run
drwxrwsrwt 2 root mail 4096 Apr 10 2016 mail
drwxr-xr-x 6 root root 4096 Aug 2 2016 spool
drwxr-xr-x 11 root root 4096 Aug 2 2016 cache
drwxr-xr-x 57 root root 4096 Jul 25 2017 lib
drwxrwxrwt 2 root root 4096 Jul 27 06:25 crash
drwxr-xr-x 2 root root 4096 Jul 28 06:25 backups
drwxrwxrwt 2 root root 4096 Nov 7 14:55 tmp
drwxrwxr-x 12 root syslog 4096 Nov 19 06:25 log
- My www is a sym,link so not including that one.
chmod -R 777 on /var
You did more than that. Lots of files amd directories you show do not have 777 set.
answered Jan 15 at 7:56
RinzwindRinzwind
207k28398528
207k28398528
hmm, i might have changed some things with permissions while copy/pasting stuff from the internet trying to fix this. but the problems started after i set /var to 777. samba and proftpd broke at the same time
– Ep1c_M1n10n
Jan 15 at 8:29
setting /var to drwxr-xr-x or 755 made it work
– Ep1c_M1n10n
Jan 16 at 3:35
Pfew ;) glad you got it working again
– Rinzwind
Jan 16 at 8:15
add a comment |
hmm, i might have changed some things with permissions while copy/pasting stuff from the internet trying to fix this. but the problems started after i set /var to 777. samba and proftpd broke at the same time
– Ep1c_M1n10n
Jan 15 at 8:29
setting /var to drwxr-xr-x or 755 made it work
– Ep1c_M1n10n
Jan 16 at 3:35
Pfew ;) glad you got it working again
– Rinzwind
Jan 16 at 8:15
hmm, i might have changed some things with permissions while copy/pasting stuff from the internet trying to fix this. but the problems started after i set /var to 777. samba and proftpd broke at the same time
– Ep1c_M1n10n
Jan 15 at 8:29
hmm, i might have changed some things with permissions while copy/pasting stuff from the internet trying to fix this. but the problems started after i set /var to 777. samba and proftpd broke at the same time
– Ep1c_M1n10n
Jan 15 at 8:29
setting /var to drwxr-xr-x or 755 made it work
– Ep1c_M1n10n
Jan 16 at 3:35
setting /var to drwxr-xr-x or 755 made it work
– Ep1c_M1n10n
Jan 16 at 3:35
Pfew ;) glad you got it working again
– Rinzwind
Jan 16 at 8:15
Pfew ;) glad you got it working again
– Rinzwind
Jan 16 at 8:15
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109825%2fmysql-server-crashing-on-launch-on-ubuntu-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown