Accessing Grafana for the First Time

When you set up Grafana for the first time, you will need to log in to the web interface. Here’s how to do it:

Default Login Credentials

Grafana comes with preset login credentials:

  • Username: admin
  • Password: admin

These credentials are used to access the Grafana login page, typically located at http://localhost:3000/login.

Steps to Log In

  1. Open your web browser and navigate to the Grafana URL (e.g., http://localhost:3000).
  2. Enter the default credentials: Use admin for both the username and password fields.
  3. Change the Password: Upon your first successful login, Grafana will prompt you to change the default password. It is crucial to set a strong, unique password to enhance security.

Changing the Default Password

When prompted to change your password:

  • Enter a new, strong password in the "New password" field.
  • Re-enter the same password in the "Confirm new password" field.
  • Click "Submit" to save your new credentials.

Common Login Issues

Here are some common problems you might encounter when logging in:

  • Forgotten Password: If you forget your password, you can reset it by editing the grafana.ini configuration file located in /etc/grafana/ or /usr/share/grafana/conf/. Look for the [security] section and update the admin_password line with a new password. After saving the changes, restart Grafana using:
    sudo systemctl restart grafana-server
  • Incorrect Credentials: Ensure that you are entering the username and password correctly, as they are case-sensitive.
  • Browser Issues: If you experience login loops or errors, try clearing your browser's cache and cookies or use an incognito window.

Conclusion

Using the default credentials provides immediate access, but remember to change them promptly to avoid security risks. Once logged in, you can start monitoring your MySQL database and other data sources through Grafana.