Use /go/mysqlreset when you have lost the MariaDB root password and need to set a new one. It stops the database, starts it again in a special mode that skips the password check, sets the new password, and then starts it normally again. It also saves the new password where GoAdmio and the root user expect to find it. If you still know the current root password, use mysqlset, which does not stop the database. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
/go/mysqlreset 'NewStr0ngPassw0rd'
Use a password made of letters and numbers only. See Arguments.
Arguments
| Position | Argument | Required | Notes |
|---|---|---|---|
| 1 | <new-password> |
Yes | The new MariaDB root password. Without it, the command stops with exit status 1 and prints nothing. |
The password goes unchanged into a SQL command, a sed command, a PHP file, and a settings file. Characters such as ', ", \, $, /, and & can break one of these steps, which can leave GoAdmio with a password that doesn’t match the database. Use letters and numbers.
The password is part of the command line, so it can appear in the process list and in your shell history for a short time.
Examples
# Reset the root password
/go/mysqlreset 'NewStr0ngPassw0rd'
# Check that the new password works
mariadb -u root -p -e "select 1"
# Check that GoAdmio's configuration has the same password
sudo grep DBPass /usr/local/goadmio/include/config/config.php
# Check that MariaDB is running normally
systemctl status mariadb
Output
MySQL ROOT password has been changed successfully.
This line is printed every time, even if the password was not changed. Test it yourself:
mariadb -u root -p -e "select 1"
See the full reference at /go/mysqlset and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
