Privs problems MySQL4 2 users, @localhost and @computer.local

Status
Not open for further replies.

michaelsanford

Translator, Web Developer
I have 2 root users, one root@localhost and one root@al-Rahal.local (which is my correct rendezvous name).

Now, I've tried everything I can think of to change the second root's password, but I just can't. I've tried:

• mysqladmin -u root password new_password
but that only changes root@localhost

• mysql> set password for root@al-Rahal.local=password('new password');
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-Rahal.local=password('new password')' at line 1

Can I safely delete this root user without it affecting root's privileges? I'm always prompted for the root@localhost's password anyway, so it seems that it only asks that row for privileges.

Also, when I make the user for my shell user, can I safely use only amras@localhost and not bother making an amras@al-Rahal.loca[/emaill] as well?

Similarly, to access this database from another computer on my LAN, can I just use that terminal's (static) IP address, or should I use that computer's rendezvous name (since I may try to access it from outside my WAN)? Nice and complicated...

Thanks!
 
Figured out the problem. I have to format any host with a hyphen this way:

GRANT ALL PRIVILEGES ON *.* TO AMRAS@'al-Rahal.local';

(quotes around the part AFTER the @, not the whole username/host identifier).
 
Status
Not open for further replies.
Back
Top