Pagina 1 di 1

Mysql (mysql.sock)

Inviato: ven 14 lug 2006, 13:13
da LordFire
buongiorno a tutti sentite io ho la slack 10.2 e mi da un errore con il mysql cosa che a me serve anche per lavoro!

io purtroppo non capisco il perkè su windows va alla grande e su linux no!
nel senso io configuro apache correttamente, php correttamente funziona tutto ma quando per esempio scrivo mysql sulla shell per avviarlo mi da il seguente errore:

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

e se provo ad avviare il server mi da tale errore:

root@slackware:/var/lib/mysql# /etc/rc.d/rc.mysqld start
root@slackware:/var/lib/mysql# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysql/mysql.pid
060714 13:00:01 mysqld ended


io non capiscoil motivo, eppure sul file /etc/my.cnf è impostata la porta 3306 e la directory dove andare a pescare la socket quindi /var/lib/mysql/mysql.sock

anche se creo io il file mi da lo stesso problema, ed oltretutto faccio NOTARE BENE che ho provato anche a mettere la slack 10.0 ma mi da lo stesso errore, e metto in evidenza anche che io installo mysql con il pacchetto precompilato (.tgz) del seguente link http://www.nymphomatic.org/mirror/linux ... 6-1kjz.tgz

ATTENZIONE QUESTO PACCHETTO LO HA INSTALLATO UN MIO STESSO AMICO SEMPRE SULLA SLACK 10.2 E FUNZIONA AL PRIMO AVVIO! quindi il pacchetto è corretto!

N:B. ho provato molte soluzione che descrive google ma non sono quelle giuste per la mia release!

bene penso di avervi dato tutte le informazioni che vi servivano, spero che potrere aiutarmi voi sistemisti in slackware, ciao e grazie!

Inviato: ven 14 lug 2006, 13:21
da francogdn
Bando alle polemiche...

Hai lanciato il comando mysql_install_db?

Ci puoi postare il contenuto di eventuali file con estensione .err sotto /var/lib/mysql/?

Inviato: ven 14 lug 2006, 13:44
da chrix
se usi mysql 4.x

verifica che l'utente mysql esiste
-> /usr/bin/mysql_install_db
-> cd /var/lib/
->chown mysql mysql/*
->chown mysql mysql/.
-> /usr/bin/mysqld_safe &
==> poi imposta la passwd con mysqldamin

se usi mysql 5.x
verifica che l'utente mysql esiste

-> su mysql
-> /usr/bin/mysql_install_db
-> cd /var/lib/
->chown mysql mysql/*
->chown mysql mysql/.
-> /usr/bin/mysqld_safe &
==> poi imposta la passwd con mysqldamin

dovrebbe andare

GRAZIE A TUTTI!!!!!!!!

Inviato: ven 14 lug 2006, 22:02
da LordFire
grazie grazie grazie davvero... ho risolto tutto come dice il signor chrix!


la ringrazio tante!

:D :D :D :D :D :D :D :D :D 8) 8) 8) 8) 8) 8) 8) 8) 8) :!: :!: :!: :!: :!: :!:

Inviato: dom 16 lug 2006, 22:20
da chrix
PREGO !

Inviato: gio 31 ago 2006, 17:35
da rosanero
salve gente io ho lo stesso problema di lordfire
ho provato a fare come dici tu ma al comando cd/varlib/ mi dice no such file or directory
esiste la directory var ma non la directory varlib...sapete il xke?

Inviato: gio 31 ago 2006, 17:38
da chrix
rosanero ha scritto:salve gente io ho lo stesso problema di lordfire
ho provato a fare come dici tu ma al comando cd/varlib/ mi dice no such file or directory
esiste la directory var ma non la directory varlib...sapete il xke?
scusa ma avresti dovuto accorgertene è un errore di battitura... infatti la directory è

/var/lib

ciao!

Inviato: gio 31 ago 2006, 17:40
da rosanero
:roll: hai ragione me ne sarei dovuto accorgere eheh
grazie dell'aiutooo

Inviato: gio 31 ago 2006, 17:44
da chrix
non c'è di che!

non riesco a fare partire mysql

Inviato: lun 15 gen 2007, 18:59
da xabras
Non riesco a far partire mysql installato da tgz è una 9.1 il pacchetto è il 4.0.27 ho installato con mysql_install_db ho cambiato il gruppo e l'utente di mysql ma quando gli do mysqld_safe mi dice mysql ended

questo il .err in /var/lib/mysql


070115 19:26:57 mysqld started
070115 19:26:57 InnoDB: Started
070115 19:26:57 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
070115 19:26:57 Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
070115 19:26:57 Aborting

070115 19:26:57 InnoDB: Starting shutdown...
070115 19:26:59 InnoDB: Shutdown completed
070115 19:26:59 /usr/libexec/mysqld: Shutdown Complete

070115 19:26:59 mysqld ended

Inviato: lun 15 gen 2007, 20:17
da chrix
se usi mysql 4.x
verifica che il file rc.mysqld sia eseguilibile
verifica che l'utente mysql esiste
verifica che il file my.cnf esiste:
se no :

Codice: Seleziona tutto

#cp /etc/my-small.cnf /etc/my.cnf
e configuralo appositamente:
settando user password, il_path_al_socket,/porta a seconda di quello che usi tu ( connessione via socket o via tcp)

Codice: Seleziona tutto

# /usr/bin/mysql_install_db 
# cd /var/lib/ 
#chown mysql mysql/* 
#chown mysql mysql/. 
# /usr/bin/mysqld_safe & 
==> poi imposta la passwd con mysqldamin

Codice: Seleziona tutto

# /usr/bin/mysqladmin -u nome_utente password la_tua_password

Inviato: gio 1 feb 2007, 14:42
da Unicondor
Anche io ho un problema quando lancio il comando

mysqld_safe &

si blocca e se vedo il file di errore è il seguente

root@server:/var/lib/mysql# cat server.err
070201 14:21:42 mysqld started
070201 14:21:43 InnoDB: Started
070201 14:21:44 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
070201 14:21:44 Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
070201 14:21:44 Aborting

070201 14:21:44 InnoDB: Starting shutdown...
070201 14:21:46 InnoDB: Shutdown completed
070201 14:21:46 /usr/libexec/mysqld: Shutdown Complete

070201 14:21:46 mysqld ended


mentre questo è il mio my.cnf

root@server:/var/lib/mysql# cat /etc/my.cnf
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/run/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /var/run/mysql/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
net_buffer_length = 2K
thread_stack = 64K

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1

# Uncomment the following if you want to log updates
#log-bin

# Uncomment the following if you are NOT using BDB tables
#skip-bdb

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout


da cosa puo dipendere
Vi ringrazio in anticipo
Unicondor

Inviato: gio 1 feb 2007, 17:17
da chrix
La soluzione c'è in questo all'inizio l'hai letta?

Inviato: gio 1 feb 2007, 17:45
da Unicondor
ho provato a afre cio' che hai detto ma quando faccio :

root@server:/var/lib# chmod mysql mysql/*
chmod: invalid mode string: `mysql'

mi da questo errore , per il resto ho controllato tutto cio' che hai scritto e credo che sia tutto ok

Inviato: gio 1 feb 2007, 20:56
da chrix
ah già scusa è chown invece di chmod e questo era scritta all'inizio del thread!!!