MySQLInitConf » Cronologia » Versione 1
Amministratore Truelite, 26-01-2006 17:27
Migrated mysql page
| 1 | 1 | Amministratore Truelite | = Configurazione di base per MySQL = |
|---|---|---|---|
| 2 | |||
| 3 | La configurazione di base di Debian crea il database con l'utente root sprovvisto di password. Per questo motivo il primo passo da fare immediatamente dopo l'installazione è impostare una password per esso, questo si fa con il comando: |
||
| 4 | |||
| 5 | {{{ |
||
| 6 | /usr/bin/mysqladmin -u root password NuovaPassword |
||
| 7 | }}} |
||
| 8 | |||
| 9 | dopo di che si potrà verificare che l'accesso è possibile con la nuova password con: |
||
| 10 | |||
| 11 | {{{ |
||
| 12 | server:~# mysql -u root -p |
||
| 13 | Enter password: |
||
| 14 | Welcome to the MySQL monitor. Commands end with ; or \g. |
||
| 15 | Your MySQL connection id is 9 to server version: 4.0.24_Debian-5-log |
||
| 16 | |||
| 17 | Type 'help;' or '\h' for help. Type '\c' to clear the buffer. |
||
| 18 | |||
| 19 | mysql> show databases; |
||
| 20 | +-------------+ |
||
| 21 | | Database | |
||
| 22 | +-------------+ |
||
| 23 | | mysql | |
||
| 24 | | test | |
||
| 25 | +-------------+ |
||
| 26 | 2 rows in set (0.00 sec) |
||
| 27 | |||
| 28 | mysql> \q |
||
| 29 | Bye |
||
| 30 | server:~# |
||
| 31 | }}} |
||
| 32 | |||
| 33 | Si tenga presente infine che le ultime versioni del pacchetto Debian non richiedono più un intervento manuale per abilitare l'ascolto su localhost in quanto la riga: |
||
| 34 | |||
| 35 | {{{ |
||
| 36 | bind-address = 127.0.0.1 |
||
| 37 | }}} |
||
| 38 | |||
| 39 | è già presente in '''/etc/my.cnf'''. |