0

When I run the following command:

SELECT user, host, password, plugin FROM mysql.user WHERE user='user_123';

this is what I get:

+----------+---------------------------------------+-------------------------------------------+-----------------------+
| user | host | password | plugin |
+----------+---------------------------------------+-------------------------------------------+-----------------------+
| user_123 | IPv4-address-1 | *775F9B443B3F45EC0042CE69872E7CF2D20D7FB4 | mysql_native_password |
| user_123 | IPv4-address-2 | *775F9B443B3F45EC0042CE69872E7CF2D20D7FB4 | mysql_native_password |
<snip>
| user_123 | domain-1 | *775F9B443B3F45EC0042CE69872E7CF2D20D7FB4 | mysql_native_password |
| user_123 | domain-2 | *775F9B443B3F45EC0042CE69872E7CF2D20D7FB4 | mysql_native_password |
<snip>
| user_123 | % | *775F9B443B3F45EC0042CE69872E7CF2D20D7FB4 | mysql_native_password |
| user_123 | * | *775F9B443B3F45EC0042CE69872E7CF2D20D7FB4 | mysql_native_password |
+----------+---------------------------------------+-------------------------------------------+-----------------------+

Q) I know that % stands for the wildcard, but what is the difference between % and *?

asked Jan 8, 2021 at 2:44

1 Answer 1

3

Per create user % has a wildcard meaning. _ also matches a single character like the like expression.

* has no meaning and was probably put there by someone not familiar with what they are doing. Recommend dropping this use.

answered Jan 8, 2021 at 2:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.