Wednesday, May 04, 2005

After fighting with mySQL for quite some time, and getting an array of errors, this seems to have fixed it.
root@mgmt# /usr/libexec/mysqld --user mysql
050504 11:25:43 Can't start server : Bind on unix socket: Address already in use
050504 11:25:43 Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
050504 11:25:43 Aborting

050504 11:25:43 /usr/libexec/mysqld: Shutdown Complete
This was the most persistent problem. (There were others)

I finally found something at http://dev.mysql.com/doc/mysql/en/starting-server.html that mentioned " When the mysqld server starts, it changes location to the data directory. This is where it expects to find databases and where it expects to write log files. On Unix, the server also writes the pid (process ID) file in the data directory." So that made me think about the permissions of the directory of /usr/libexec/mysqld. They were:
[root@mgmt mysql]# ll /var/lib
drwxr-xr-x 4 root mysql 4096 May 4 11:16 mysql

So mysql didn't have access to write to that directory.

So I did:
[root@mgmt mysql]# chmod 775 /var/lib/mysql/

And now mysqld starts happily:
[root@mgmt mysql]# /usr/libexec/mysqld --user mysql
/usr/libexec/mysqld: ready for connections

So what I don't know is: what does the 775 permissions hurt?

0 Comments:

Post a Comment

<< Home