1

I have a CentOS 5.6 x86 installed. I have full access to mysql but it seems I have forgotten Linux root password. How I can access the root via MySQL? Is it even possible? Update: MySQL Version is 5.0.77

1

I am not a MySQL expert but I don't believe that MySQL allows you to execute arbitrary (shell) commands.

Furthermore MySQL would have to run as root which I hope it doesn't.

So in order to achieve that you would probably need two exploits: One hacking MySQL itself and giving you shell access and another for becoming root: a local root exploit (privilege escalation). You probably don't want to do either of them.

You can easily reset the password by booting the system with the kernel parameter init=/bin/bash or by booting from another medium (CD/DVD/USB), chrooting into the installed system and call passwd there.

But the whole story seems strange to me. Who does not have SSH access with keys instead of a password?

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.