Skip to Content

Changing Passwords on Your VPS: SSH, MySQL, phpMyAdmin

If you are using a Bryght Hosting VPS, you have access to the full power of the Unix command line. This means you have some Unix passwords to track in addition to your Drupal site passwords.

The most important are: SSH, MySQL and phpMyAdmin

For convenient reference, we have some barebones documentation on how to do this. Consult the relevant Unix man page for full details.  

How To Change your SSH or PuTTY password

There is no such thing as a SSH password; you just use your regular unix password to login via SSH or PuTTY. This password is changed via the regular Unix passwd command.

  1. Login to your VPS via SSH
  2. passwd
  3. You will be prompted to enter your old password for verification, and then a new password.

How To Change your MySQL password

  1. Login to your VPS via SSH
  2. Login to your mysql database: mysql -uUserName -p  DatabaseName
  3. at the "mysql>" prompt, type:SET PASSWORD = PASSWORD("YourNewPassword");
  4. Change any software or files that depends on the password such as Drupal's settings.php

How to change your phpMyAdmin password

We have configured the phpMyAdmin user ID for you. Here's how to change myadmin's password. 

  1. Login to your VPS via SSH
  2. htpasswd /var/www/.htpasswd myadmin

If you have added other user IDs, you will have to change them using the htpasswd command as well.

How to manually change a Drupal username password

Drupal provides a way to recover your email via a password (it will send you a one-time login URL where you can change your password), but if email isn't sending to an address that exists, it may have gone into your spam folder, or email might not be sending out correctly. If that's the case, send us a support request noting the issue and the IP address of your VPS.

If the email address no longer exists and you want to manually reset your password, the instructions to do that via MySQL follow:

  1. Login to your VPS via SSH
  2. mysql -uUserName -p DatabaseName
  3. If you know the user ID, at "mysql>" prompt, type:UPDATE users SET pass = MD5('yournewpassword') WHERE uid = 1; If you don't know the user ID number but you know the user name, instead type UPDATE users SET pass = MD5('yournewpassword') WHERE name = 'YourDrupalUserName';