Adding a user and associated privileges the hard way?)
from a command prompt:
#>mysql
At the 'mysql>' prompt:
use mysql;
insert into host values ("<hostname/ip>", "%", "Y", "Y", "Y", "Y", "Y","Y");
insert into user values ("<hostname/ip>", "<username>",
password("<password>"), "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y");
NOTE: The "Y" fields above define the privilages that the user or host has
to select/insert/drop/etc tables from the database. Please see the user &
host table headers if you need to change these.
*exit mysql by typing 'quit'*
For host/user/pass changes to take effect, you need to reload the MySQL
grant tables. To do this, type:
"mysqladmin reload" from the shell prompt.
Wouldn't it be better to use the 'GRANT' command to do this? Coming from an Oracle background, this mysql mentatality of directly manipulating grant tables is highly disconcerting.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.