Pagina 1 di 1

MySQL

Inviato: ven 31 mar 2006, 19:06
da mirko77
mi da questo errore:

Codice: Seleziona tutto

bash-3.00$ mysql_install_db
mkdir: cannot create directory `/var/lib/mysql//mysql': Permission denied
chmod: cannot access `/var/lib/mysql//mysql': Permission denied
mkdir: cannot create directory `/var/lib/mysql//test': Permission denied
chmod: cannot access `/var/lib/mysql//test': Permission denied
Installing all prepared tables
060331 19:02:38 [Warning] Can't create test file /var/lib/mysql/ToPoLiNuX.lower-
test
/usr/libexec/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13)
060331 19:02:38 [ERROR] Aborting

060331 19:02:38 [Note] /usr/libexec/mysqld: Shutdown complete

/usr/bin/mysql_create_system_tables: line 663: 29685 Broken pipe             cat
  <<END_OF_DATA
use mysql;
set table_type=myisam;
$c_d
$i_d

$c_h
$i_h

$c_u
$i_u

$c_f
$i_f

$c_t
$c_c

$c_ht
$c_hc
$c_hr
$c_hk

$c_tzn
$i_tzn
$c_tz
$i_tz
$c_tzt
$i_tzt
$c_tztt
$i_tztt
$c_tzls
$i_tzls
END_OF_DATA

Installation of system tables failed!

Examine the logs in /var/lib/mysql/ for more information.
You can also try to start the mysqld daemon with:
/usr/libexec/mysqld --skip-grant &
You can use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql/ that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
bash-3.00$ mysql_install_db
mkdir: cannot create directory `/var/lib/mysql//mysql': Permission denied
chmod: cannot access `/var/lib/mysql//mysql': Permission denied
mkdir: cannot create directory `/var/lib/mysql//test': Permission denied
chmod: cannot access `/var/lib/mysql//test': Permission denied
Installing all prepared tables
060331 19:03:30 [Warning] Can't create test file /var/lib/mysql/ToPoLiNuX.lower-
test
/usr/libexec/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13)
060331 19:03:30 [ERROR] Aborting

060331 19:03:30 [Note] /usr/libexec/mysqld: Shutdown complete

/usr/bin/mysql_create_system_tables: line 663: 29707 Broken pipe             cat
  <<END_OF_DATA
use mysql;
set table_type=myisam;
$c_d
$i_d

$c_h
$i_h

$c_u
$i_u

$c_f
$i_f

$c_t
$c_c

$c_ht
$c_hc
$c_hr
$c_hk

$c_tzn
$i_tzn
$c_tz
$i_tz
$c_tzt
$i_tzt
$c_tztt
$i_tztt
$c_tzls
$i_tzls
END_OF_DATA

Installation of system tables failed!

Examine the logs in /var/lib/mysql/ for more information.
You can also try to start the mysqld daemon with:
/usr/libexec/mysqld --skip-grant &
You can use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql/ that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
bash-3.00$ /usr/libexec/mysqld --skip-grant &
[1] 29709
060331 19:03:49 [Warning] Can't create test file /var/lib/mysql/ToPoLiNuX.lower-
test
/usr/libexec/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13)
060331 19:03:49 [ERROR] Aborting

060331 19:03:49 [Note] /usr/libexec/mysqld: Shutdown complete

Che faccio?

Inviato: ven 31 mar 2006, 21:00
da vanescar
bash-3.00$ mysql_install_db
ma io l'ho installato da root, credo che sia dovuto da questo, prova da root # mysql_install_db

Inviato: ven 31 mar 2006, 22:05
da mirko77
Ora che devo fare? :

Codice: Seleziona tutto

bash-3.00$ su -
Password: 
# mysql_install_db
Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h ToPoLiNuX password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
# 
Cosa devo fare per avviarlo ?

Inviato: ven 31 mar 2006, 23:10
da masalapianta
mirko77 ha scritto:Ora che devo fare?
prima di fare qualcunque cosa devi leggere quanto segue:
http://dev.mysql.com/doc/refman/5.0/en/installing.html
sai la documentazione ufficiale viene scritta dagli sviluppatori apposta; non e' che siccome le loro ragazze non gliela danno allora per passare il tempo si mettono a scrivere documentazione; ci perdono tempo proprio per permettere a chi vuole usare i loro programmi di installarli e configurarli correttamente; quindi perche' non leggerla PRIMA di cominciare a installare?

Inviato: ven 31 mar 2006, 23:13
da albatros
Se hai già copiato un file di configurazione tipo
/usr/local/mysql/support-files/my-medium.cnf in /etc/my.cnf (attenzione, ho usato i binari originali, non un pacchetto slack che potrebbe aver un percorso leggermente diverso, probabilmente in /usr e non in /usr/local)
puoi, come suggerisce lo stesso messaggio che hai riportato, avviare mysql con
/usr/bin/mysqld_safe &
Poi ti puoi connettere al server con mysql da linea di comando o con un'interfaccia grafica tipo phpmyadmin (ti richiede però apache, php e phpmyadmin installati) o ancora con openoffice.org base, che però non ho mai usato.

Inviato: ven 31 mar 2006, 23:56
da vanescar
mirko77 ha scritto:Ora che devo fare? :
Cosa devo fare per avviarlo ?
# cp /etc/my.huge.cnf /etc/my.cnf
# cd /var/lib
# chown -R mysql mysql/
# chgrp -R mysql mysql/
# /usr/bin/mysqladmin -u root password TUAPASSS
# reboot
# /usr/bin/mysql -p
Enter password:TUAPASSS
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2029 to server version: 4.1.14-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
quit
Bye
# funzionaa :wink: