Forum Moderators: coopster

Message Too Old, No Replies

Importing local MySQL to hosted MySQL

Is it possible

         

planbeta

8:52 am on Jul 1, 2003 (gmt 0)

10+ Year Member



Hi!

Is it possible to create a script on my paid hosting to access a MySQL db I am running on my home pc and import it in to the paid host MySQL db?

Also what's the deal with PHP v5, is it true that it's not going to support MySQL anymore? :/

Thanks

Chris

ChilliTwister

10:15 am on Jul 1, 2003 (gmt 0)



Hi planbeta!

Regarding your first question:
It is possible, but I wouldn't recommend it because it brings some security issues with it. If you really need to do it this way, then ask me again. I would recommend creating a dump of your local database and importing it into your hosted database. That should be the cleanest solution without any additional risk.

To your 2nd question:
PHP5 doesn't have built-in support for MySQL. But you can still use it together using the open source linking possibilities. So no need to worry about it.

So long...
CT

planbeta

9:49 pm on Jul 1, 2003 (gmt 0)

10+ Year Member



Thanks ChilliTwister

Helpfull advice.

Chris :)

hpche

12:29 am on Jul 2, 2003 (gmt 0)

10+ Year Member



PhpMyAdmin can backup, import and export databases and tables for you. If you put copies on both your home PC and your hosted site it's failry straightforward to do.

As far as I know, it's just the beta's of PHP5 that don't have the Mysql libraries built in but they're optimisic about resolving it in time for the real release. Still, if anyone's got any more information about it then it would be good to know :)

ChilliTwister

10:45 am on Jul 2, 2003 (gmt 0)



Hi hpche!

phpMyAdmin is indeed a good solution for small databases. But when they get bigger than certain sizes (I don't know exactly where, but I had the problem sometimes) it can't import them anymore or you would have to change the script run time. So the dump im- & export is the safest bet. But as I said, if it is just something small and you have installed phpMyAdmin anyways, than this solution is easier.

A link regarding the MySQL support is the changelog of PHP5
[php.net...]
They had to get rid of the built in MySQL support due to licensing issues. But it's still possible to link to the libraries supplied by MySQL.

So long...
CT

jatar_k

3:45 pm on Jul 2, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



All phpmyadmin really does for you is execute all of the mysql commmands when you click a button. I prefer a little ssh access and running it all myself.

The actual sql commands to look at would be

SELECT .. INTO OUTFILE [mysql.com]
LOAD DATA INFILE [mysql.com]
mysqldump, Dumping Table Structure and Data [mysql.com]