Joyent

Translations of this page:

Manage MySQL databases

Creating a MySQL database

To create a new database through Virtualmin, do the following:

Database names are case sensitive and can only contain alphanumeric characters and underscores. Other characters, like periods, will cause an error.

The name of the database is created by pre-pending the Mailbox name prefix to the name you give. There is a 64 character limit on database names (hard coded in MySQL).

  1. Sign in to Virtualmin (see Account logins and important URLs).
  2. Select a domain from the drop-down in the left-hand navigation (your main domain should be already selected when you first login to Virtualmin). This is the domain that you'll add a new database to.
  3. Click Edit Databases. You should now see a list of your current databases on the Edit Databases page.
  4. Click Create a new database.
  5. In the Database name field enter a name for your database
    • Database names will automatically be prefixed with your main user name. On secondary domains, the first part of the domain name is inserted as a second prefix after the user name (e.g., username_domainname_dbname ).
  6. For Database server type, select MySQL.
  7. For Character set for MySQL database, choose a character set for your database (the default is UTF-8 Unicode).
  8. Click Create Your database has now been created.
  9. Click Return to database list to see your list of databases

You should now see your newly created database listed under Database name.

Note: When accessing a database using a domain-username login, there is a 16 character limit to MySQL usernames. Check the MySQL login suggested by Virtualmin under Edit Mail and FTP Users > User > Other Users Permisions.

Deleting a MySQL database

To delete a database through Virtualmin, do the following:

  1. Sign in to Virtualmin (see Account logins and important URLs).
  2. Select a domain from the drop-down in the left-hand navigation (your main domain should be already selected when you first login to Virtualmin). This is the domain that you'll add a new database to.
  3. Click Edit Databases. You should now see a list of your current databases on the Edit Databases page.
  4. Select the database you want to delete from the left-hand column and click Delete Selected. You will now see a confirmation screen verifying that you want to delete this database.
  5. Click Delete Now Your MySQL database should now be deleted. Click Return to database list if you wish to return to your list of databases for this domain.

Using phpMyAdmin

While Virtualmin does provide for some very rudimentary controls to view and modify tables, it's best to turn to phpMyAdmin and its powerful features. See Account logins and important URLs on how to access phpMyAdmin - and there is also link to phpMyAdmin within Virtualmin, when you click Other Tools and phpMyAdmin.

However you have to use Virtualmin to create the database

 
shared/kb/manage-mysql.txt · Last modified: 2009/02/16 23:46 by kadlugan
 
Recent changes RSS feed Creative Commons License Driven by DokuWiki