View previous topic :: View next topic |
Author |
Message |
3PO Veteran
Joined: 26 Nov 2006 Posts: 1110 Location: Schwabenländle
|
Posted: Sun Jul 10, 2016 5:19 pm Post subject: [MySQL] Frage zum Login via MYSQL_PWD |
|
|
Hallo Zusammen,
ich habe ein kleines Problem mit dem Login in MySQL.
Folgendes funktioniert:
Code: | server01 ~ # mysql -u epg2vdr -pepg -D epg2vdr -e "SHOW GRANTS;"
Warning: Using a password on the command line interface can be insecure.
+-----------------------------------------------------------------------------+
| Grants for epg2vdr@localhost |
+-----------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'epg2vdr'@'localhost' IDENTIFIED BY PASSWORD <secret> |
| GRANT ALL PRIVILEGES ON `epg2vdr`.* TO 'epg2vdr'@'localhost' |
+-----------------------------------------------------------------------------+
server01 ~ # |
Und folgendes funktioniert nicht:
Code: | server01 ~ # export MYSQL_PWD='epg'
server01 ~ # mysql -u epg2vdr -D epg2vdr -e "SHOW GRANTS;"
ERROR 1045 (28000): Access denied for user 'epg2vdr'@'localhost' (using password: YES)
server01 ~ # |
Was aber seltsam ist, ist dass es auf einem anderen PC funktioniert:
Code: | vdr01_64 ~ # export MYSQL_PWD=epg
vdr01_64 ~ # mysql -u epg2vdr -e "SHOW GRANTS;"
+-----------------------------------------------------------------------------+
| Grants for epg2vdr@localhost |
+-----------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'epg2vdr'@'localhost' IDENTIFIED BY PASSWORD <secret> |
| GRANT ALL PRIVILEGES ON `epg2vdr`.* TO 'epg2vdr'@'localhost' |
+-----------------------------------------------------------------------------+
vdr01_64 ~ # |
Hat Jemand eine Idee wo da der Denkfehler liegen könnte? |
|
Back to top |
|
|
3PO Veteran
Joined: 26 Nov 2006 Posts: 1110 Location: Schwabenländle
|
Posted: Sun Jul 10, 2016 7:19 pm Post subject: |
|
|
Gelöst!
Ich hatte irgendwann mal eine "~/.my.cnf" erstellt und wenn die existiert, geht wohl das exportieren nicht. |
|
Back to top |
|
|
|