Databases :: MySql :: create mysql.sock |
|||
| By: Squibi |
Date: 07/04/2003 00:00:00 |
Points: 75 | Status: Answered Quality : Excellent |
|
I accidently erased the mysql.sock file from the /tmp directory. How do I recreate this file in another directory. I know that I can just use a my.cnf file. but when I do this I get an error. I have the following global /etc/my.cnf file [client] port=3306 socket=/usr/tmp/mysql.sock [mysqld] port=3306 socket=/usr/tmp/mysql.sock set-variable = key_buffer_size=16M set-variable = max_allowed_packet=1M [mysqldump] quick I get the following error when attempting to start the server mysqld --user=mysql & [2] 27866 030407 9:04:18 Can't start server : Bind on unix socket: Address already in use 030407 9:04:18 Do you already have another mysqld server running on socket: /usr/tmp/mysql.sock ? 030407 9:04:18 Aborting 030407 9:04:18 mysqld: Shutdown Complete This by the way is an installation that has been working and is not new. I just happened to kill the /tmp directory |
|||
| By: TheFalklands | Date: 07/04/2003 00:55:00 | Type : Comment |
|
| first you stop the mysql daemon (mysqld) : /etc/init.d/mysql stop or /etc/init.d/mysqld stop or killall mysqld (the hard way :)) then you veritfy that mysql user (mysql for you) have write autorisations on /usr/tmp and finally : /etc/init.d/mysql start or /etc/init.d/mysqld start |
|||
| By: Squibi | Date: 07/04/2003 02:17:00 | Type : Comment |
|
| Now I get this (i've already checked my permissions.. I believe) [root@bristlebane bin]# 030407 12:19:57 InnoDB: Started 030407 12:19:57 mysqld: Can't create/write to file '/root/mysql/var/bristlebane.pid' (Errcode: 13) 030407 12:19:57 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist 030407 12:19:57 Aborting 030407 12:19:57 InnoDB: Starting shutdown... 030407 12:19:59 InnoDB: Shutdown completed 030407 12:19:59 mysqld: Shutdown Complete |
|||
| By: VGR | Date: 07/04/2003 02:46:00 | Type : Answer |
|
| and in /etc/my.cnf : where is the datadir= line ? mysql DB not found -> big problem mysql.sock erased --> no problem at all, just restart the mysqld |
|||
| By: Squibi | Date: 07/04/2003 04:02:00 | Type : Comment |
|
| nice... the added datadir was the trick. word to the wise.. symbolic links do not work when trying to fool around with mysql.sock :P |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








