`

JoyentJoyent

Knowledge Base

9.2. Adding MySQL Users

If you’d like to set up a separate MySQL user, do the following (you can also use these steps to modify any existing MySQL users):

Note: The separate MySQL user will be able to access whatever database you choose, but the user will not be able to create any new databases.

  1. Login to Webmin (go to https://webmin.server.textdrive.com/ and replace server with the name of your server)

    Note: You'll need to substitute server with the name of the actual server for your account.

  2. In the Servers section, click Virtualmin Virtual Servers
  3. Under Domain name, click the link for the domain you’d like to add a mysql user to.
  4. On the Edit Server page, click Edit Mail and FTP Users
  5. Click Add a user to this domain to add a new MySQL user
  6. In the Username field, enter an appropriate user name for your MySQL user.
    Note: User names can be no longer than 16 characters. If your user name isn’t unique, Webmin will create one based on a combination of the user name you just entered and your primary username (e.g., mysql-primaryuser).
  7. In the Real name field, enter a name for your user (this name can be whatever you want and does not have the same restrictions as your Username).
  8. In the password field, enter a password for your MySQL user (make sure it’s not the same as your Username, see here for guidance.)
  9. Leave SFTP/SCP and FTP/FTP-SSL login enabled? set to No
  10. Leave SubVersion login enabled? set to No
  11. Leave DAV login enabled? set to No
  12. For MySQL login enabled?, select Yes
  13. Under Accessible MySQL databases, select the databases you want this user to be able to access
  14. For Primary email address enabled?, select No
  15. For Home and mail quota, select the radio button next to the empty field and then enter 1 (since this user is just for MySQL, you don't need a high quota)
  16. Click Create

You’ve now created a user with MySQL access.