Forgot root password for mysql, problem resetting

Hi folks,

I forgot my password for mariadb which I'm running as a drop-in replacement for mysql. Figured I'd just follow the standard reset directions to get myself out of the mess. I'm running Ubuntu 11.10.

I tried running this set of commands:

/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where User='root';
mysql> flush privileges;
mysql> quit
/etc/init.d/mysql stop
/etc/init.d/mysql start

Problem is, when I get to the step to run mysqld_safe, I get this message from terminal:

120730 18:47:37 mysqld_safe A mysqld process already exists

I ran a check, and after killing the mysql with /etc/init.d/mysql I get this:

user@server:/var/run$ sudo /etc/init.d/mysql stop
 * Stopping MariaDB database server mysqld                               [ OK ] 
user@server:/var/run$ sudo service mysql status
mysql start/running, process 31639

I'm not sure what is going on here. It seems I've got two mysql installations or I'm doing something wrong. I thought I'd fully uninstalled mysql when I installed mariadb. Just confused here, and could really use help to get in and change that blasted pw.

1 Reply

You might have had a second installation. I'd just try killing the process and starting up mysqld_safe again. Check your package manager for any other installations of mysqld or do a "locate mysqld" to see if you've got a secondary installation running. Even with multi-threading, you shouldn't have two mysqld processes running if you're stopping it through init.d.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct