visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: create mysql.sock


By: Squibi U.S.A.  Date: 07/04/2003 00:00:00  English  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 English  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 English  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 English  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 English  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

EContact
browser fav
page generated in 298.447130 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page