Just nu i M3-nätverket
Jump to content

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'


Salieri

Recommended Posts

Hej,

 

jag kan inte få igång MySQL (jag kör Fedora Core 4)??? Jag får dessa meddelanden när jag kör följande komandon:

 

[root@c-280be253 bin]# mysqladmin versions

mysqladmin: connect to server at 'localhost' failed

error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'

Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

[root@c-280be253 bin]#

 

 

[root@c-280be253 bin]# mysql

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

[root@c-280be253 bin]#

 

[root@c-280be253 bin]# mysqld_safe &

[1] 21511

[root@c-280be253 bin]# Starting mysqld daemon with databases from /var/lib/mysql

STOPPING server from pid file /var/run/mysqld/mysqld.pid

050719 00:08:53 mysqld ended

 

Min my.cnf ser ut så här:

 

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

# Default to using old password format for compatibility with mysql 3.x

# clients (those using the mysqlclient10 compatibility package).

old_passwords=1

 

[mysql.server]

user=mysql

basedir=/var/lib

 

[mysqld]

socket=/var/lib/mysql/mysql.sock

 

[mysqld_safe]

err-log=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

 

Jag lyckas varken lokalisera mysql.sock eller starta MySQL...någon som kan hjälpa en nybörjare???

 

Tack på förhand

//Ola

 

Link to comment
Share on other sites

Du måste starta Mysql servern först

 

"service start mysqld" <- tror denna funkar på FC annars "/etc/init.d/mysqld start"

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...