Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MySQL - User anlegen mit 'Grant'

Empfohlene Antworten

Veröffentlicht

Hallo zusammen,

ich versuche grad mir einen neuen MySQL-User anzulegen:

grant all on datenbank.* to 'user'@'localhost' identified by password 'daspasswort';

Funktioniert auch, das Problem ist nur, dass nun das Passwort in der User-Tabelle nicht verschlüsselt wird. Kann mir da jemand helfen?

DANKE

Sir Barry :marine

Hallo!

Du kannst die DB User auch händig füllen. Um das Passwort zu verschlüsseln verwendest Du das Schlüsselwort Passwort, danach dein unverschlüsseltes PW in Klammern!

(User werden bei MySQL immer in der DB User gespeichert!)

insert into user (host, user, password) values (localhost,user,PASSWORD('dein Passwort') );

so sollte es funktionieren!

Gruß, Klaus:)

Danke Klaus,

so hab ich eigentlich bisher meine User immer angelegt, aber das is ja nicht ganz die feine Art, liest man zumindest überall und GRANT find ich eigentlich schon ganz brauchbar.

(User werden in der DB 'mysql' in der Tabelle 'user' gespeichert ;-)

Jetzt mach ichs grad immer so, dass ich erst mit GRANT nen User mit seinen Rechten anleg und dann mit UPDATE das Passwort nochmal setze.

Das sollte aber doch nicht Sinn der Sache sein. Noch ne Idee woran das liegen könnte?

Gruß...

Sir Barry :confused:

Hast es denn schonmal mit

grant all on datenbank.* to 'user'@'localhost' identified by password PASSWORD('daspasswort');

probiert?

Müsste doch eigentlich klappen, oder täusch ich mich da jetzt? :confused:

ICQ

Ja,

das war eine meiner ersten Ideen ;-)

Dann krieg ich:

ERROR 1064: You have an error in your SQL syntax near 'PASSWORD('daspasswort')' at line 1

Hab mir dazu schon haufenweise Dokus durchgeschaut,... nix beschrieben... kann doch nicht sein, dass ich der einzige mit diesem Problem bin?!?! :P

Gruß...

Sir Barry

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.