List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:August 8 2001 11:04pm
Subject:Re: local MySQL server authenticating users by machine username
View as plain text  
At 2:50 PM -0700 8/8/01, Bennett Haselton wrote:
>The first page of the MySQL tutorial at:
>http://www.mysql.com/doc/C/o/Connecting-disconnecting.html
>
>says that when you connect to the MySQL server, it authenticates you 
>based on a username and password that you enter, unless the server 
>is also configured to allow "anonymous" access, in which case you 
>can log in with no username.
>
>Isn't it also true that if you connect to the MySQL server on your 
>local machine, the server authenticates you based on the username 
>that you're already logged in under?

Not quite.  The server has no idea who you're logged in as.
The mysql client program uses your login name as the default MySQL user name
if you don't specify any user name explicitly.

>
>I'm just trying out the MySQL server on my machine, and when I'm 
>logged to the machine as "bhaselto" and I invoke mysql (with no 
>username or password on the command line), I get the mysql prompt, 
>however I am not able to create new databases.  However, if I quit 
>mysql, then "su" to become root, and then invoke mysql again with no 
>username/password arguments, when I get the mysql prompt I am able 
>to create new databases.

You should be able to do the same by invoking mysql when logged in as
bhaselto like this:

	mysql -u root

>
>(If this is right, then should I send an update suggestion to the 
>author of the 
>http://www.mysql.com/doc/C/o/Connecting-disconnecting.html page?  Is 
>he or she on the list?)
>
>	-Bennett
>
>bennett@stripped     http://www.peacefire.org
>(425) 649 9024


-- 
Paul DuBois, paul@stripped
Thread
local MySQL server authenticating users by machine usernameBennett Haselton8 Aug
  • Re: local MySQL server authenticating users by machine usernamePaul DuBois9 Aug
    • Re: local MySQL server authenticating users by machine usernameBennett Haselton10 Aug
  • Re: local MySQL server authenticating users by machine usernameGerald Jensen9 Aug