PhpMyAdmin

From DreamHost

Jump to: navigation, search

Note that the correct title of this article is phpMyAdmin. The first letter is rendered in uppercase due to a technical limitation.

Contents

Accessing phpMyAdmin

To use phpMyAdmin to access one of your MySQL databases simply go to that database's hostname on the web. For example, if your MySQL hostname was mysql.example.com, point your browser to http://mysql.example.com. You will then be prompted for a username and password.

phpMyAdmin is configured to use HTTP authentication against the database server. The user and password you enter should be a MySQL user / password that has access to the database you want to manage.

DreamHost phpMyAdmin Access Hack

If you want to access PhpMyAdmin to manipulate your database before your hostname is available via DNS, or if your hostname is no longer in the DNS system, there is a neat little "hack" you can use that does not require your hostname to be in the DNS system.

If your DreamHost-based MySQL hostname is mysql.yourdomain.tld, you can access databases for that hostname via the DreamHost installation of PhpMyAdmin using the url:

http://www.dreamhost.com/dh_phpmyadmin/mysql.yourdomain.tld/

Copying MySQL data

The following steps outline how to copy a table from one MySQL database to another:

Exporting the data

  1. Login to phpMyAdmin.
  2. Select the source database.
  3. Open the table you wish to export.
  4. Export the table as a file with a .sql extension.


Importing the data

  1. Select the destination database.
  2. Click the Import tab.
  3. Click Browse and locate the file with the .sql extension you saved earlier.
  4. Click OK and then Go.

The newly-imported table will appear in the list of tables.

Note on Dropping (Deleting) a Database

You cannot Drop a database on DreamHost using phpMyAdmin; you can "delete" a database using the Control Panel -> Goodies -> Manage MySQL screen. Even if you do this, a database created on DreamHost is never fully dropped by using the Control Panel -> Goodies -> Manage MySQL screen. If you login to the host with the appropriate credentials, via phpMyAdmin or the shell command line, you'll still find your database. Dreamhost does not completely delete the database as the result of a Control Panel action. Be careful!

If you no longer want a database you have set up on DreamHost, and you have any sensitive data in the database that you want to obliterate, you might consider dropping all the tables from the database so that the data can not be viewed in this manner.

See also

External link

Personal tools