|
Home
Web Hosting Guide
Compare Hosting Plans
Basic Hosting Plan
Professional Hosting Plan
Extreme Hosting Plan
Email Only Hosting
Web Forwarding
Advanced Features
Hosting Control Panel
SSL Certificates
Hosting Order Page
WISDOM
The Essence of Knowledge is Having it to Apply it. |
How to administer your MySQL Database
Loading a large MySQL dump file Uploading data from a file into a MySQL database You have a few different options when it comes to administering your MySQL
Database:
1. The easiest way is to use our PhpMyAdmin tool. This tool provides a robust web based interface. You can perform just about any operation such as executing queries, backups, restores, table creation and much more. You can access PhpMyAdmin by clicking on your database name in the MySQL Databases section and then click on the PhpMyAdmin link. Or you can access it from your browser at: http://phpmyadmin.hcpanel.com 2. Use a MySQL GUI client such as MySQL GUI or MySQLCC both available from the downloads section of http://www.mysql.com. Remember to use port 3306 when connecting. 3. Use the MySQL command line interface. This takes a little know how to use, but it is the most flexible by far. To install, you must install the MySQL 3.23.52 Server which is a free download from http://www.mysql.com. Remember to use port 3306 when connecting.
Because PhpMyAdmin is not a reliable tool for loading large amounts of data
into a database, the mysql CLI must be used. To do so, simply install the MySQL
server on your machine (available from mysql.com). You do not actually need to
run the server, you just need the CLI included with the distribution. Once
installed, you can simply run the following
command:
c:\mysql\bin>mysql -h <mysqlX.hcpanel.com> -u <username> -p <database_name> < c:\database_dump.sql Just alter the command to reflect the database your are loading and the correct paths to the files referenced. After this is run you will need to enter your password and wait. Depending on the size of the database, this command can take anywhere from a minute or two all the way up to an hour or two.
Follow these steps to upload data from a text file to a MySQL
database:
1. Enter the Admin, http://phpmyadmin.hcpanel.com 2. On the left select the table you want to upload data in to. 3) On the top select the “SQL” text link. 4) On the bottom select the link that says “Insert data from a text file into table” 5) Press the “Browse” button and select the file that has your database data in it. 6) Select the appropriate settings for your test file: a. If you want to replace the data info check the “Replace” box b. In the “Fields terminated by” select the correct character that separates the fields in the text files. 7) Select “Data Local” for Load Method 8) Press the “submit” button 9) The Admin will show you how many rows were uploaded and you are done uploading the text file. |
||||||||