2

I'm getting a bizarre error running my mysql daemon as the user 'mysql' here is what the command spews out, now I've checked and the instance isn't running already :S So, I have no idea why it's displaying this output:

120729 18:54:28 [Note] Plugin 'FEDERATED' is disabled.
120729 18:54:28 InnoDB: The InnoDB memory heap is disabled
120729 18:54:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120729 18:54:28 InnoDB: Compressed tables use zlib 1.2.5
120729 18:54:28 InnoDB: Using Linux native AIO
120729 18:54:28 InnoDB: Initializing buffer pool, size = 128.0M
120729 18:54:28 InnoDB: Completed initialization of buffer pool
120729 18:54:28 InnoDB: highest supported file format is Barracuda.
120729 18:54:28  InnoDB: Waiting for the background threads to start
120729 18:54:29 InnoDB: 1.1.8 started; log sequence number 2929794
120729 18:54:29 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
120729 18:54:29 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
120729 18:54:29 [Note] Server socket created on IP: '0.0.0.0'.
120729 18:54:29 [ERROR] Can't start server : Bind on unix socket: No such file or directory
120729 18:54:29 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120729 18:54:29 [ERROR] Aborting

120729 18:54:29  InnoDB: Starting shutdown...
120729 18:54:30  InnoDB: Shutdown completed; log sequence number 2929794
120729 18:54:30 [Note] mysqld: Shutdown complete

Any help is greatly appreciated, thanks guys!

  • 2
    Did you try to configure another socket file? Does the file exist and have the correct rights? – Wolfram Jul 29 '12 at 17:03
  • Yeh, the file is there, but still getting this error :/ –  Jul 30 '12 at 01:52
  • That's tough. The only info we got is "no such file" and "is there another mysqld running". You say both are not the cause. Try [changing the socket file to a completely new location](http://dev.mysql.com/doc/refman/5.5/en/problems-with-mysql-sock.html). – Wolfram Jul 30 '12 at 13:26
  • Yeh, there's very little error outputs :/ it's baffling me, I've been wading through each error and I'm at this point, but my knowledge of MySQL's requirements is limited, so it's a learning experience I guess :P But yes, it's pretty difficult, I'm getting another error now, to do with 'World Writable Config Files'? And I have no clue what these are :S –  Jul 30 '12 at 15:57
  • World-writable means that they have permissions set that allow everyone to write that file (user, groups, other => the world). These files get ignored as they may be altered by a not really authorized person. Try `chmod 755 /etc/my.cnf` or whatever file is ignored. – Wolfram Jul 30 '12 at 16:39

1 Answers1

5

The problem is clear in the error messages:

120729 18:54:29 [ERROR] Can't start server : Bind on unix socket: No such file or directory
120729 18:54:29 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?

Most likely that socket doesn't actually exist. This is probably a simple typo.

By default the socket is located at /var/lib/mysql/mysql.sock on a Fedora box. So, in your /etc/my.cnf file you should have:

socket=/var/lib/mysql/mysql.sock
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • Thoughts on removing the redundant first line and extraneous log entry copy/paste? – Charlie May 23 '18 at 20:22
  • @Charlie What are you talking about? – Michael Hampton May 23 '18 at 20:24
  • Just my nice way of asking for the first three lines of the answer to be removed ;) I would do it myself but some people get upset when I edit answers like that. I don't think the three lines add much value and come off as a little rude. In my case, I didn't have this cnf line at all so there wasn't a typo; and having no socket specified at all makes it unlikely any other instance started, so the log messages aren't as clear as you might think. So maybe even change the fourth line to "The socket needs to be defined in the cnf file or via command line." – Charlie May 23 '18 at 21:10
  • Regardless, the answer solved my problem so I'm happy it's here – Charlie May 23 '18 at 21:11
  • @Charlie That is there to highlight which log entries are most relevant, out of the many that were posted. Not everyone is yet as good at reading logs as you and I are, and they can benefit from seeing which entries are most relevant to the problem. That said, if you believe it comes off as a little rude, then perhaps it could be reworded a bit. Feel free to suggest something. – Michael Hampton May 23 '18 at 22:19
  • I don't think OP was asking about the shutdown messages or info messages. I would be surprised if they glanced over the explicit errors. My suggestion is to remove them or, if you' insist on including them, preface the messages with "The following messages:" then follow up with "mean that...." – Charlie May 24 '18 at 00:31