Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
creare utenti in mysql
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
conte
n00b
n00b


Joined: 30 Nov 2003
Posts: 46

PostPosted: Sun Mar 07, 2004 5:17 pm    Post subject: creare utenti in mysql Reply with quote

Salve a tutti o fatto unn bel giretto nel forum ma non trovo nulla volevo come fare per creare utenti in mysql e come fare un bind verso la scheda di rete.
Premetto sono andato nel file /etc/mysql/my.conf a modificare la voce bind

bind-address = 127.0.0.1
#bind-address = 10.0.0.2
port = 3306

solamente che facendo un nmap non vedo la porta 3306

visto che non trovo nulla nel forum pensavo che sarebbe carino metterlo tank
Back to top
View user's profile Send private message
Sparker
l33t
l33t


Joined: 28 Aug 2003
Posts: 992

PostPosted: Sun Mar 07, 2004 8:52 pm    Post subject: Reply with quote

Per gli utenti devei solo dare i privilegi usando GRANT:
GRANT create,select,insert,eccetera TO utente@host IDENTIFIED BY 'password'
(ora non ricordo la sintassi corretta)
Back to top
View user's profile Send private message
theo_
n00b
n00b


Joined: 11 Feb 2004
Posts: 30
Location: Vicenza - Italy

PostPosted: Mon Mar 08, 2004 6:18 am    Post subject: Reply with quote

Per amore della precisione i passaggi corretti per addare un utente sono i seguenti:
Code:

# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 314 to server version: 4.0.17

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

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> grant all privileges on nomedatabase.* to utente@host identified by 'tuapassword';
Query OK, 0 rows affected (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)



Ovviamente prima di questo devi aver creato il tuo database da console con
Code:

# mysqladmin -u root -p create nomedatabase


theo.
Back to top
View user's profile Send private message
b10m
Apprentice
Apprentice


Joined: 04 Aug 2003
Posts: 204
Location: Monza

PostPosted: Mon Mar 08, 2004 7:55 am    Post subject: Re: creare utenti in mysql Reply with quote

conte wrote:

solamente che facendo un nmap non vedo la porta 3306


Sicuro di non avere le iptables attive? Se non bindi la scheda di rete dovrebbe rendere servizio disponibile su tutte le interfacce. A me funzona senza modifiche
Back to top
View user's profile Send private message
BlueRaven
Apprentice
Apprentice


Joined: 12 May 2003
Posts: 254

PostPosted: Mon Mar 08, 2004 11:14 am    Post subject: Re: creare utenti in mysql Reply with quote

conte wrote:
solamente che facendo un nmap non vedo la porta 3306


Ovviamente, l'nmap lo fai dalla stessa macchina, vero?
Altrimenti, essendo il MySQL in ascolto soltanto sul localhost, è un po' dura che te la faccia vedere. :-)
A parte questo, se il bind a localhost ti serve per impedire accessi via rete, è molto più pratico inserire nel my.cnf la direttiva
Code:
skip-networking

sotto le opzioni relative a mysqld.
In questo modo il layer di rete non viene avviato, ma puoi ugualmente interagire col DB attraverso l'apposito socket.
Back to top
View user's profile Send private message
khazad-dum
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 148
Location: Moria

PostPosted: Mon Mar 08, 2004 10:10 pm    Post subject: Reply with quote

Io per creare utenti uso:

Code:

DB = nome del database
TABLE = nome delle tabelle
PASSWORD = password dell'utente

mysql> GRANT ALL PRIVILEGES ON $DB.$TABLE TO $UTENTE@localhost IDENTIFIED BY '$PASSWORD' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;


Ciao
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum