Forum Moderators: coopster
OK, firstly let me state I am a total beginner to Mysql and databases (excluding basic Microsoft Access ones).
Anyway, I've set up a basic database using Mysql (just creating a web blog I followed a tutorial) and then started writing the php code for interacting with the database. how do I put the Mysql database onto the the web server where I have server space (the server I use is just some company that I pay €100 a year for). I need the php file to get the data from the Mysql database.
As I said before, I am a total beginner so please excuse my ignorance! I still havn't got my head around the Mysql concept!
Cheers
<?php phpinfo();?>
and upload it to your server. Then go to http://example.com/info.php where example.com is your domain. This will give you all kinds of information about your server, including whether MySQL is available or not.
Once you get that far, check back in and we'll take it from there.
Cheers and welcome to WebmasterWorld
do you have phpmyadmin or any such mysql GUI interface that may be able to do this?
if not, no big deal, all they do is construct and issue the mysqldump command for you. You can read about mysql dump right here
[dev.mysql.com...]
once you have managed to dump the file, we can go from there ;)
and Welcome to WebmasterWorld onoff
I am assuming afew things
that the db does not exist on the new server
that the file has a creat database statement in it
that your file has create table statements in it
then the file has all the insert statements as well
normally I import those files from the command line using something like so
mysql -u username -p < /path/to/dumpfile.sql
it will then prompt for a password and suck the whole file into mysql. If the file is right everything will be created and off you go.
Jatar_K's method is really the easiest way - PhpMyAdmin is frustratingly cumbersome. On the other hand, it's total GUI and so it's reasonably intuitive in comparison and it allows uploading .zip files, so depending on your comfort level and your setup, it may be just as fast as opening a shell client and doing it that way. Your call