I created a user per the first command but cannot logon via localhost (linux). This link mysqldoc indicates that I need to create a second user by the same name, but using the syntax in the second block of commands.
mysql> CREATE USER 'myuser'@'%' IDENTIFIED BY '4myuser';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL ON my_upload.* TO 'myuser'@'%' IDENTIFIED BY '4myuser';
Query OK, 0 rows affected (0.00 sec)
So I tried that as below, and it indeed worked. But are these two separate users? If I change the pw for one, will the other one sync, or are they truly separate users?
mysql> CREATE USER 'myuser'@'localhost' IDENTIFIED BY '4myuser';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON my_upload.* TO 'myuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)
User@%would allow access from all locations.User@localhostwould only allow access from localhost. They are two different users with two different passwords (though you can set them to the same password, but if you update one password the other will not auto-update)