how to emulate "su mysql" in ubuntu?
Patrick Doyle
wpdster at gmail.com
Wed Jul 28 15:56:58 UTC 2010
On Wed, Jul 28, 2010 at 11:52 AM, Robert P. J. Day
<rpjday at crashcourse.ca> wrote:
> On Wed, 28 Jul 2010, Steve Flynn wrote:
>
>> On Wed, Jul 28, 2010 at 4:29 PM, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>> >
>> > i just know i'm going to regret asking this, but how can i
>> > emulate the effect of doing "su mysql" in ubuntu? i'm trying to
>> > recover a damaged mysql db and in the list of instructions is the
>> > note that you have to run the mysql server in rescue mode as the
>> > mysql user, so the page instructs one to "su mysql" first.
>> >
>> > well, if i was on fedora, that would be easy. but what's the
>> > equivalent on ubuntu? is it simple? or will it require editing
>> > /etc/sudoers and so on?
>>
>> What's wrong with "su - mysql"? I presume you know the mysql password.
>
> that was the first thing i tried, but that requires knowing the
> login password for the "mysql" account and there is none. unless
> i've completely forgotten how user accounts work, a lot of the
> standard accounts are system or pseudo-user accounts which don't
> support a login session and therefore cannot be logged into.
>
I see that sudo takes a -u argument, perhaps
$ sudo -u mysql /bin/sh
might do the trick.
--wpd
More information about the ubuntu-users
mailing list