How to Reset Lost Mautic Administrator Password

If you have forgotten or lost your Mautic Administrator Password, or if after an update your login has stopped working. Mautic can send you an email with a link for you to create a new password.
But what if your email settings are missing or do not work propely anymore? Bad news, there is no way to recover it or change it from the UI.

However, if you have SSH access to your Mautic instance, you can directly modify the database, you won’t be able to see the stored password, but you can overwrite the existing password or even better, add a new user directly into the database here’s how:

First log into your Mautic server or VPS with SSH.

Then log in to your MySQL console:

mysql -u root

List the databases on your server

MariaDB [(none)]> show databases;

You will get something similar to this:

| Database
| information_schema |
| mautic     
| mysql      
| performance_schema |
4 rows in set (0.01 sec)

Check the name of your database, probably “mautic”

Now select your Mautic database with

MariaDB [(none)]> use mautic;

The mysql console promt should change to:

MariaDB >

List all the users in your Mautic instance

MariaDB > select id, username from users;

Take note of the last listed user’s ID.

Now let’s add a new user and password, copy and paste the entirety of the following code in one take, but do not issue the command just yet!

MariaDB >

INSERT INTO `users` (`id`, `role_id`, `is_published`, `date_added`, `created_by`, `created_by_user`, `date_modified`, `modified_by`, `modified_by_user`, `checked_out`, `checked_out_by`, `checked_out_by_user`, `username`, `password`, `first_name`, `last_name`, `email`, `position`, `timezone`, `locale`, `last_login`, `last_active`, `online_status`, `preferences`)
VALUES (2, 1, 1, '2015-04-01 15:15:07', 1, 'Nobody', NULL, NULL, NULL, NULL, NULL, NULL, 'madmin', '$2y$13$VkE7UjFetqAM13oT4v/VYOfRCGrJ4hbr0zuwRZo6KVfDnNb16WFwy', 'Administrator', 'Uuser', '', NULL, NULL, NULL, NULL, NULL, 'offline', 'N;');

Before issuing the command (before you hit enter) Change the number 2 above (in bold) with the last ID you noted just before, plus 1.

Now list again all the users in your Mautic instance

MariaDB > select id, username from users;

A new user should have appeared at the end of the list, with name “madmin”

If so, you can now exit the MySQL console

MariaDB > exit;

You should now be able to login to your Mautic instance with:
User: madmin
Pass: madmin

NOTE: Thank you Chad Windnagle: drmmr763/user.sql

Further troubleshooting: If you still can’t login, try these other things:

  • Clear the Mautic cache
  • Reboot your Mautic server or VPS
  • Clear cache/cookies in your browser
  • Alternatively: Use PHPMyAdmin

If the command

mysql -u root

fails, try instead

mysql -u root -p

and then type your MySQL root password when prompted.

Hope this Mautic tutorial was helpful to you, If it was, please say “Worked for me!” in the comments below.

If it didn’t work for you, ask any questions or post any trouble below and I’ll try to help you.

NOTE: This guide is designed for Ubuntu using MariaDB with the MariaDB authentication plugin installed.

Yosu Cadilla

Hi, thank you for reading this article, hope you found it useful.

My name is Yosu Cadilla, I’ve been both a Marketer since 1996 and a Systems Administrator since 2000, switching back and forth and mixing both trades. Since discovering Mautic, I’ve been specializing in large Mautic deployments as well as Mautic for agencies. Nowadays all my clients are Mautic related.

If you are planning on deploying Mautic on a large scale, or if you are undecided about Mautic being a good fit for your organization… let’s have a chat!