HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

mysql does not start: error 13 on bin file (permissions are set correctly)

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
errorfilepermissionsbinaremysqldoesstartnotcorrectly

Problem

I just renamed the hostname and rebooted the server and now mysql 5.6 wont start.
(debian 7 + dotdeb)

150312 20:40:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql.mnt
2015-03-12 20:40:15 13855 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)

2015-03-12 20:40:15 13855 [Warning] Buffered warning: Changed limits: table_cache: 431 (requested 2000)

^G/usr/sbin/mysqld: File '/var/export/websrvDB.log/websrvDB-bin.index' not found (Errcode: 13 - Permission denied)
2015-03-12 20:40:15 13855 [ERROR] Aborting

2015-03-12 20:40:15 13855 [Note] Binlog end
2015-03-12 20:40:15 13855 [Note] /usr/sbin/mysqld: Shutdown complete


but it doesn't make sense

/var/export/websrvDB.log has mysql:mysql 700 and all files in there have 600 and mysql:mysql

all other ownerships also look fine and the server starts when I turn of the binlog.

there are 134files in the log folder with quite some GB. the .index files seems to have all of them correctly included. I am also puzzled by the ^G in the logfile, it appears every time.

Can anyone please help, thank you.

cd /var/export/websrvDB.log ; ls -l

```
total 134170264
-rw------- 1 mysql mysql 143 Feb 23 19:45 websrvDB-bin.000001
-rw------- 1 mysql mysql 12634 Feb 24 18:21 websrvDB-bin.000002
-rw------- 1 mysql mysql 1087177258 Feb 24 20:23 websrvDB-bin.000003
-rw------- 1 mysql mysql 1121509434 Feb 24 22:44 websrvDB-bin.000004
-rw------- 1 mysql mysql 1186530117 Feb 25 00:18 websrvDB-bin.000005
-rw------- 1 mysql mysql 1091943807 Feb 25 01:38 websrvDB-bin.000006
-rw------- 1 mysql mysql 1082287219 Feb 25 03:17 websrvDB-bin.000007
-rw------- 1 mysql mysql 1098320416 Feb 25 05:00 websrvDB-bin.000008
-rw------- 1 mysql mysql 1081566516 Feb 25 06:42 websrvDB-bin.000009
-rw------- 1 mysql mysql 1076875987 Feb 25 08:25 websrvDB-bin.000010
-rw------- 1 mysql mysql 1095260241 Feb 25 10:11 websrvDB-bin.000011
-rw------- 1 mysql mysql 1115154789 Feb 25 11:49 websrvDB-bin.000

Solution

Personally, I am not all that comfortable with the Permissions you have.

Since mysqld is not running, try the following

cd /var/export/websrvDB.log
mkdir junk
cd junk
mv ../websrvDB-bin.* .
cd ..
service mysql start
ls -l websrvDB-bin.*


mysqld should start up and create a new binary log and index file. Look at the permissions of websrvDB-bin.000001 and websrvDB-bin.index and those should be the correct permissions.

You should also do this

chmod -R 644 /var/export/websrvDB.log


and try restarting MySQL

Code Snippets

cd /var/export/websrvDB.log
mkdir junk
cd junk
mv ../websrvDB-bin.* .
cd ..
service mysql start
ls -l websrvDB-bin.*
chmod -R 644 /var/export/websrvDB.log

Context

StackExchange Database Administrators Q#95123, answer score: 2

Revisions (0)

No revisions yet.