mysql problem
James Gray
james at gray.net.au
Sat Apr 26 23:57:33 UTC 2008
On 26/04/2008, at 9:53 PM, Avi Greenbury wrote:
> On Sat, 26 Apr 2008 09:55:11 +1000
> James Gray <james at gray.net.au> wrote:
>>
>> Bottom line, "sudo mysql" can't hurt :)
>>
>
> No, it can.
>
> Unless an app _needs_ root privileges (and MySQL doesn't) there's no
> reason to run it as root, and good reasons not to.
You missed the point - the mysql client CAN log into a mysql instance
in the odd situation where there is not mysql root password. In that
situation, it CANT hurt, in fact, other than reloading the daemon to
bypass the grant tables, it's the ONLY way to get a mysql root login.
It's called "passwordless root" and can only be accessed by UID zero
(which is verified by the mysql client).
I agree though, once a root password has been set, the proper way to
log in (and only way) is to actually use the password; "mysql -u root -
p" for example.
Let's not all get wrapped up in this paranoid "OMG he ran mysql client
with root privs!!!" circus. There was a good reason I suggested it,
and clarified the logic in a follow-up. This isn't my first lap of
the block with MySQL. ;)
Cheers,
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2417 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080427/51d453a4/attachment.bin>
More information about the ubuntu-users
mailing list