Passwords

Assume the following have completed:

GRANT ALL ON test1.* TO 'johnQ'@'localhost' IDENTIFIED BY 'pass1';
GRANT ALL ON test2.* TO 'johnQ'@'localhost' IDENTIFIED BY 'pass2';

User johnQ has a query that joins tables from test1 to tables from test2. How should he log in?

a) Using ‘pass1’.
b) Using ‘pass2’.
c) Using ‘pass1’ and ‘pass2’, separated by a colon.
d) It can’t be done; he must change the two passwords to match.
e) Other (explain)

Answer: b) Using ‘pass2’. Passwords are specific to the user/host combination, not to the table.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.