|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Junior Member
Iscritto dal: Jul 2005
Messaggi: 14
|
mysql
ho installato mysql su una macchina con la gentoo linux.
riesco a creare database tabelle ecc..... quando da shell do il comando (come root): mysql -h 'host' -u 'username' -p 'nomedatabase' mi compare .. Enter password:.... come da copione... la inserisco e mi dice: ERROR 1045: Access denied for user: 'andrea@localhost' (Using password: YES) ....cosi' non riesco neanche a usare mysql query browser.... mi sa che o non ho capito qualcosa...o che c'è qualche file di configurazione... aiuto grazie |
|
|
|
|
|
#2 | |
|
Senior Member
Iscritto dal: Mar 2002
Città: Italy/Usa
Messaggi: 2817
|
Quote:
allora, se ti colleghi in locale, non hai bisogno dell'opzione -h per indicare l'host; inoltre, dopo l'opzione -p non scrivere niente, dai solo invio e metti la password. Una volta loggato poi scegli che database usare. N.B: prima che un utente possa utilizzare il database creato da root, devi garantirgli l'accesso con la clausola GRANT(che ha delle opzioni per la lettura, scrittura, modifica etc..).
__________________
"Utilizzando atomi pentavalenti drogheremo il silicio di tipo n; Utilizzando atomi trivalenti drogheremo il silicio di tipo p; Utilizzando della cannabis ci drogheremo noi e vedremo il silicio fare cose impossibili" - DSDT-HowTo |
|
|
|
|
|
|
#3 | |
|
Junior Member
Iscritto dal: Jul 2005
Messaggi: 14
|
Quote:
io voglio connettermi in remoto con mysql query browser...(non riesco, perchè penso sia un problema di password e username) ho provato cosi, ecco gli errori: pinguserver andrea # mysql -h localhost -u andrea -p Enter password: ERROR 1045: Access denied for user: 'andrea@localhost' (Using password: YES) pinguserver andrea # mysql -u andrea -p Enter password: ERROR 1045: Access denied for user: 'andrea@localhost' (Using password: YES) |
|
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Sep 2004
Messaggi: 3967
|
hai provato a dargli il comando grant al tuo user?
anche se però mi sembra di aver letto di un altro utente con questo problema,e la causa risiedeva nel file di configurazione di mysql. Provo a cercartelo
__________________
Dai wafer di silicio nasce: LoHacker... il primo biscotto Geek
|
|
|
|
|
|
#5 |
|
Senior Member
Iscritto dal: Sep 2004
Messaggi: 3967
|
__________________
Dai wafer di silicio nasce: LoHacker... il primo biscotto Geek
|
|
|
|
|
|
#6 |
|
Junior Member
Iscritto dal: Jul 2005
Messaggi: 14
|
non sono ancora riuscito
non riesco a connettermi in remoto a mysql con mysql query browser.... non riesco neanche a fare mysql -h host -u user -p... mi fa : password..... la inserisco e poi errore.... per chiarezza host io metto l'indirizzo del computer sul quale c'è mysql server adesso ho toccato qualcosa nel file my.cnf... potete dargli un'occhiata... [client] password = cane port = 3306 socket = /var/run/mysqld/mysqld.sock [safe_mysqld] err-log = /var/log/mysql/mysql.err [mysqld] #skip-innodb user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock log-error = /var/log/mysql/mysqld.err # If set, mysql logs all queries(general query log). This will be deprecated in # 5.0. This logs all queries, even error queries and is slow. # log = /var/log/mysql/mysql.log # # If you really need logging, use rather binary logging. Especially when doing # replication. Read # file:/usr/share/doc/mysql-*/manual.html.gz#Replication # You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old logs # from $hostname-bin.01 up to $hostname-bin.09 while the slave server is # running. # Before doing that, check which logfile slave curently uses by running # mysql> SHOW SLAVE STATUS # To list logfiles on master do: # mysql> SHOW MASTER LOGS Then use PURGE for those not needed anymore only! Never remove the files # manually! # # Also consult RESET MASTER and RESET SLAVE commands before doing any changes # mysql> RESET MASTER - Deletes all binary logs listed in the index # file, resetting the binlog index file to be empty. # mysql> RESET SLAVE - Makes the slave forget its replication position in # the master logs. # mysql> SET SQL_LOG_BIN=0 - this turns off logging (execute on MASTER only) # mysql> SET SQL_LOG_BIN=1 - this turns on logging (execute on MASTER only) # # log-bin # set-variable = binlog-do-db=non_existant # set-variable = binlog-ignore-db=database_name # # server-id has to unique for each master or slave in your network, # lets use last number from IP address # server-id = 207 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/english skip-locking set-variable = key_buffer=16M set-variable = max_allowed_packet=1M set-variable = thread_stack=128K # keep secure by default! bind-address = 127.0.0.1 port = 3306 # this can make it even more secure: #skip-networking [mysqldump] quick set-variable = max_allowed_packet=1M [mysql] #no-auto-rehash # faster start of mysql but no tab completition [isamchk] set-variable = key_buffer=16M |
|
|
|
|
|
#7 |
|
Senior Member
Iscritto dal: Sep 2004
Messaggi: 3967
|
come suggerito nel link che avevo postato, prova nel file di conf di mysql:
1) o commenti la riga relativa a bind address 2) al posto di 127.0.0.1 metti l'ip reale del pc dove sta mysql, es. 192.168.1.1
__________________
Dai wafer di silicio nasce: LoHacker... il primo biscotto Geek
|
|
|
|
|
|
#8 |
|
Junior Member
Iscritto dal: Jul 2005
Messaggi: 14
|
andrea@pinguserver ~ $ mysql -h 192.168.0.3 -u andrea -p
Enter password: ERROR 1045: Access denied for user: 'andrea@pinguserver' (Using password: YES) andrea@pinguserver ~ $ mysql -h localhost -u andrea -p Enter password: ERROR 1045: Access denied for user: 'andrea@localhost' (Using password: YES) andrea@pinguserver ~ $ su Password: pinguserver andrea # mysql -h 192.168.0.3 -u andrea -p Enter password: ERROR 1045: Access denied for user: 'andrea@pinguserver' (Using password: YES) pinguserver andrea # mysql -h localhost -u andrea -p Enter password: ERROR 1045: Access denied for user: 'andrea@localhost' (Using password: YES) pinguserver andrea # mi spiegate perchè non riesco a dare questo comando??? in cosa sbaglio??? vi ringrazio |
|
|
|
|
|
#9 |
|
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
Mi fai vedere l'istruzione grant che hai usato per la creazione dell'utente ?
|
|
|
|
|
|
#10 |
|
Junior Member
Iscritto dal: Jul 2005
Messaggi: 14
|
esattamente com'è che funziona l'istruzione di grant..??
io non l'ho usata ancora perchè ignoravo dipendesse da questa cosa.... mi dici gentilmente la sintassi ? |
|
|
|
|
|
#11 |
|
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
|
|
|
|
|
|
#12 |
|
Junior Member
Iscritto dal: Jul 2005
Messaggi: 14
|
ciao mi potete aiutare??
vi spiego bene cosa devo fare ... devo connettermi con java al database che ho fatto con mysql. è da circa 20 giorni che provo...creo utenti vari e con java carico il driver:com.mysql.jdbc.Driver tutto ok...quando metto la stringa per la connessione...: jdbc:mysql://host:3306/pingudb?user=nome&password=passwd mi da sempre errore , non si connette come dovrebbe .... quindi tutto quello che penso si debba fare è creare la giusta utenza con i giusti permessi...no??? grazie posso usare anche mysql administrator... |
|
|
|
|
|
#13 |
|
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
GRANT ALL ON *.* TO 'nome'@'%' IDENTIFIED BY 'passwd';
Con questo crei praticamente un utente root |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 09:34.



















