phpMyAdmin

The BlueHost control panel provides a number of different tools that can be used to backup, restore and edit a MySQL database. phpMyAdmin is my preferred tool for these tasks.

WARNING

If you do not feel confident about what you are doing, please have someone with more expertise backup, restore or edit your database. An error could cause your site to stop functioning.

If you are a current or former Basically Brilliant client, contact us about services we can provide you.

Starting phpMyAdmin

  • Login to your BlueHost control panel.
  • Find the Database panel and click on the phpMyAdmin panel. (It's the 3rd from left).

cp-database.jpg

  • In the new window that opens you need to find the database for the application you want to work with. It will be listed under your username in the left column. Click on the database name. Do not do anything to the information_schema database. This database is required for internal use.

phpmyadmin1.jpg

  • The next window shows the database tables in the left column. The top right hand part of the window has links to functions such as Export and Import.

phpmyadmin2.jpg

Backup

  • Once you have found your database (see previous section) click on the Export link at the top of the page.
  • (See next image for reference). Adjust the export settings as follows:
    • Make sure all tables are selected (Select All - Top Left of window)
    • Radio button for SQL should be selected (Left side of window)
    • If this is a backup - you need to be able to restore database to current state - then it is safest if all check marks are checked in Structure section on right (circled in red in image below).
    • At bottom of window check the “Save as file” box on left. Choose a compression method. Gzipped creates the smallest archives is typical on Linux systems. You do not change anything in the template name box. A standard file dialog will be displayed after you click on “Go”. You can then save the backup to your local computer.

phpmyadmin3-a.jpg

Restore

Restoring a backup is similar to making the backup. Review the backup instructions.

  • Click on the Import button (top) for the restore dialog window.
  • Use the browse button to find the backup on your local computer.
  • Click on Go.

import_sql.jpg

Export to Excel (or CSV)

Exporting to Excel is similar to creating a backup. You may want to review the backup procedure before you begin. The backup procedure selects all tables in a database before exporting. An export to Excel must select a single table in the database to be exported.

  • Select the database containing the table you wish to export (see Backup procedure).
  • Find the table to be exported in the list of database tables in left column list. Select (click on) the databse to be exported.
  • Click on the Export button at top of window.
  • The choices available may be different than in the following window depending on the version of phpMyAdmin that has been installed. However, all will include options for CSV.
  • The options on the right will be different depending on which export format has been selected by the radio buttons on the left.
  • Choose the CSV for Excel or Microsoft Excel options if available. If you must use the plain CSV format because the Excel options are not available, make sure you indicate that fields are terminated by a comma in the right hand panel (the default is a semi-colon).

export_csv.jpg

  • Click on the “Save as file” check box at bottom left and then on the Go link to save the file to your local computer. You do not need to save a compression method unless the file is very large.

Import from Excel (CSV, Tab)

You must select a table in your MySQL database that you want to replace or modify before you import your data.

Although phpMyAdmin may support Excel export formats, you must import from a CSV formated file (or SQL).

  • After choosing your database and table, click on the Import link at the top of the window in phpMyAdmin.
  • Click on the browse button and find the CSV file to be imported on your computer.
  • If your file has column names in the first row, change the value in the field “Number of records (queries) to skip from start” to 1.
  • In the “Options” section under “Format of imported file”
    • Choose whether you want to replace the table with the imported data. The answer is probably yes, but it is possible to just add new data to the table.
    • Make sure you change the “Fields terminated by” box to comma ”,”
    • Column names can be left blank if you selected skip first row above.
    • Click Go

import_csv-a.jpg

 
hosting/bluehost/phpmyadmin.txt · Last modified: 2008-11-06 10:33 am (external edit)
Recent changes RSS feed Creative Commons License Driven by DokuWiki
Basically Brilliant! Home
Basically Brilliant! Blog