Question
Can't restore MySQL root privileges
Hello everyone!
I manage a droplet on DigitalOcean running Ubuntu 12.04 LTS (GNU Linux 3.2.0-24-virtual i686) and need to run some MySQL Events which requires root privileges that I don’t have on my user. In first place, I didn’t create the droplet and don’t know if the “root” account even exists. But even so, I am trying to change the root password.
I tried to follow some steps mentioned in many different places in the community, as here and here and in this tutorial too, but no results. The problem is: in every try, some command are not present on my ubuntu distro.
For example, the command returns:
root@droplet:~# sudo mysqld --skip-grant-tables &
[1] 5097
root@droplet:~# sudo: mysqld: command not found
root@droplet:~# sudo mysqladmin password 123newpass
sudo: mysqladmin: command not found
root@droplet:~# sudo mysqld_safe --skip-grant-tables &
[1] 5948
root@droplet:~# sudo: mysql_safe: command not found
Just to inform, the command "mysql"
works fine. And to stop/start my MySQL and Apache I use the following command:
root@droplet:~# /opt/lampp/lampp start
How can I fix it? What should I do to give root privileges?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
I think you should check where mysql is: whereis mysql
or whereis mysql_safe or locate all mysql: locate mysql