Localization of MySql Database?

brichant

Verified User
Joined
Oct 24, 2007
Messages
8
Location
Ciney, Belgium
Hello everyone and sorry if it seems stupid but this is the first time I am trying to put something on a web site.

I have built a small application with EasyPhp on my PC. It uses Php and MySql.
I do not know where I have to put the MySql files to get it work on my site. DirectAdmin seems to suggest to build the MySql database "on the fly" but I would rather upload what I build with EasyPhp.

Thanks in advance

Miguel
 
You can't just upload your database because it's in a directory protected under the root user. And because the MySQL daemon needs to be notified that the database exists on the server.

You can export it on your local machine; that creates a mysql file which you can upload into a database you create using DirectAdmin.

To upload the export file you must either have shell access, or write a php program to upload it (which is how most publicly-available database driven systems do it), or trick DirectAdmin's backup/restore system by backing up an empty database, downloading the backup, unpacking it, replacing the database extract in the backup with your own, rebuilding the backup, uploading it back to your server, and then restoring the backup.

Don't forget that your database must be named according to DirectAdmin's naming rules.

Jeff
 
Miguel,

How are you interfacing with your MySQL database? I'm not familiar with EasyPHP. If you are using a GUI program (including web gui), usually there is an option to back-up your tables. You want to backup structure plus data.

If you are accessing MySQL via command line, you can just execute the following command:
Code:
mysqldump -u<username> -p<password> mydbname >  mybackup.sql
that will produce a text file which you can load into MySQL on your DA server.

As Jeff said, you will need either shell access or a PHP app (like phpmyadmin) to get the file into your new database.
 
And as I forgot to say, PHPMyAdmin is included with DirectAdmin; you should be able to use it.

Jeff
 
Back
Top