1

I want to change the max_allowed_packet value, but when setting permissions for my.cnf to 777, I get (as expected):

Warning: World-writable config file '/etc/my.cnf' is ignored

If I set it to anything less than that (600, 644, 700, 775, all tried...), the mysqld service fails to start.

EDIT: I now have its permissions set to 644

EDIT: The error log when the service fails to restart is:

110814 16:05:57 [Note] /usr/libexec/mysqld: Normal shutdown

110814 16:05:57 InnoDB: Starting shutdown...

110814 16:05:59 InnoDB: Shutdown completed; log sequence number 0 47678

110814 16:05:59 [Note] /usr/libexec/mysqld: Shutdown complete

110814 16:05:59 mysqld_safe mysqld from pid file/var/run/mysqld/mysqld.pid ended

EDIT: The previous error messages I had provided were produced only when permissions for my.cnf were 777. Now that they are at 644, this is all I get.

I believe this has to do with the permissions set to some files, as I found many files being set to 777. I don't know much, but I know that's bad. :) Thing is though, I don't know where to start looking and fixing.

The system all this is done on is CentOS 5.6.

If anyone has any suggestions about this, it will be highly appreciated.

EDIT: This has finally gotten solved. It was achieved by changing the bind-address inside my.cnf from the actual IP to 127.0.0.1 . No other action was required. Thank you all for your help.

4
  • 2
    Reinstall. Your installation is totally wrecked. Solving these issues is not worth the time. And read the FAQ as this is a site for advanced system administrators-
    – mailq
    Aug 14, 2011 at 21:12
  • 1
    These error messages?! Can't find tables, tables of wrong format, probably not only the config has changed permissions. I'll bet there are more when these problems are fixed.
    – mailq
    Aug 14, 2011 at 21:28
  • 2
    Your edit doesn't include the relevant logs. It shows the shutdown, which is in common with the old logs, but not what causes the shutdown. We need the startup logs, beginning with mysqld_safe Starting mysqld daemon .... Aug 14, 2011 at 21:48
  • My localhost.localdomain.err file does not seem to store anything further. I just now again tried restarting the service and it did not register anything new. Would I also need to look elsewhere?
    – Menelaos
    Aug 14, 2011 at 21:55

2 Answers 2

2

First off, I'll echo Shane's comments about permissions. Never, ever set anything 0777 (or 0666). If you think you need those permissions, quite frankly, you are Doing It Wrong.

Now, onto your problem. The logs are fairly clear, if you mentally filter out the things that don't scream [ERROR] at you. The first line, in particular, actually gives you the answer:

Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

"Please run mysql_upgrade to create it" is pretty much all you need to know. Run that tool and it should update your mysql schema for awesome winnage.

4
  • Thanks. I have a tendency to jump into things without reading and I learn the hard way. I have now edited the post, to reflect the actual error messages I get when setting permissions for my.cnf to 644. The previous error messages were when having permissions as 777. Not the case without it.
    – Menelaos
    Aug 14, 2011 at 21:47
  • I did the upgrade but it didn't solve the issue. I know it's deeper than that and I probably will have to resort to a reinstall in the end, but for now I have found a way to override the issue and can continue with my work. And now I know to avoid 777 like the plague. Thanks again.
    – Menelaos
    Aug 15, 2011 at 6:41
  • "Never, ever set anything 0777 (or 0666). If you think you need those permissions, quite frankly, you are Doing It Wrong." So how does one "do it right" in this case? Oct 12, 2021 at 22:07
  • You'll want to ask a new question if the existing answers do not provide sufficient information to assist you. Bear in mind that the question has been heavily edited since this answer was written.
    – womble
    Oct 13, 2021 at 9:36
5

Don't change the permissions from their defaults - it's refusing to use that config file to protect you from yourself.

Fix the permissions (644 is probably where it should be), then if it continues to error, edit the new error into your question.

1
  • I know. I'm learning the hard way. I did that and have edited the error messages accordingly. Looking into the mysqld.pid now...
    – Menelaos
    Aug 14, 2011 at 21:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .