So you’ve created a virtual server in your Virtualmin powered VPS to host your website. And your application; whether it’s WordPress, Joomla or Prosper202; there’s a big chance it needs a MySQL database to function. This tutorial and video above shows you how find MySQL username and password for your virtual server.
On default settings, Virtualmin automatically creates a MySQL database and a MySQL user for each virtual server you create. The database name and the username is almost always same as administrative username for the server. There are occurrences they are slightly different when the domain name is longer. And the password for MySQL user is automatically generated when you create the server. The video above and steps below shows you how to find MySQL database name, MySQL username and MySQL password for your domain or sub domain and change the MySQL password if necessary.
First, you must login to Virtualmin with your domain’s administrative user account or VPS root user account. It is recommended to use administrative user account than using root account because root account is too powerful. You’ll be taken to Webmin interface when you logged in. (1) Switch to Virtualmin by clicking Virtualmin button in top of left side bar.
Once in the Virtualmin interface, (2) select the domain name from the drop down menu. Your domain will be selected by default if you only have one domain. And then (3) click Edit Databases from the sidebar.
You’ll be taken to a page where you have few options to manage your server. You can see MySQL database name on the table along with database type and link to manage your database. But what we’re looking for isn’t here. You need to (4) switch to Passwords tab by clicking Passwords from the navigation menu. And then (5) click the magnifier icon to view password for MySQL user. You can also change the password using this page.
If you’re migrating your website to a VPS with Virtualmin, Edit Databases page will also help you migrate your MySQL database to VPS easily.
Once you find the MySQL password for user, you can use it on your application and complete the installation.