Assigning Anonymous Account Passwords

Nasza ocena:

5
Wyświetleń: 784
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Assigning Anonymous Account Passwords - strona 1

Fragment notatki:

Assigning Anonymous Account Passwords
The mysql commands in the following instructions include a -p option based on the assumption that
you have set the root account passwords using the preceding instructions and must specify that
password when connecting to the server.
To assign passwords to the anonymous accounts, connect to the server as root, then use either SET
PASSWORD or UPDATE. Be sure to encrypt the password using the PASSWORD() [1283] function.
To use SET PASSWORD on Windows, do this:
shell mysql -u root -p
Enter password: (enter root password here)
mysql SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
To use SET PASSWORD on Unix, do this:
shell mysql -u root -p
Enter password: (enter root password here)
mysql SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
mysql SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');
To set the anonymous-user account passwords with a single UPDATE statement, do this (on any
platform):
shell mysql -u root -p
Enter password: (enter root password here)
mysql UPDATE mysql.user SET Password = PASSWORD('newpwd')
- WHERE User = '';
mysql FLUSH PRIVILEGES;
The FLUSH statement causes the server to reread the grant tables. Without it, the password change
remains unnoticed by the server until you restart it.
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz