MySQL DB

Soldato
Joined
19 Jul 2006
Posts
2,949
Location
Leicester
I have WAMP installed on my computer and I'm using PHPMyAdmin to manage my MySQL database which is being used for my PHP Webpages.
At the moment, in my PHP pages I'm calling localhost,root,password to connect to the database then selecting the table.

When I'm finished, I want to put my PHP pages into my Univeristy's public_html folder for use on the Internet, but I don't know how I would get my MySQL database onto there?

Thanks for any help :)
 
Associate
Joined
16 Jan 2008
Posts
2,350
IN phpmyadmin use the "export" function to export the tables as a .sql file. Then import them onto the new online database. One way of doing this is clicking the SQL tab and selecting everything from the .sql file, and executing. (I make a fairly vital assumption that you have a server online with MySQL installed.)


You then just need to change the username and password to connect to the database.
 
Soldato
Joined
15 Nov 2008
Posts
5,060
Location
In the ether
I have WAMP installed on my computer and I'm using PHPMyAdmin to manage my MySQL database which is being used for my PHP Webpages.
At the moment, in my PHP pages I'm calling localhost,root,password to connect to the database then selecting the table.

When I'm finished, I want to put my PHP pages into my Univeristy's public_html folder for use on the Internet, but I don't know how I would get my MySQL database onto there?

Thanks for any help :)

If want the data to resign on your current machine then you just change localhost to the ip address of your box, simples. Make sure you don't include username and passwords hard coded into the PhP files themselves - not good! instead have them somewhere else that apache can see but users can't. You really don't want to be accessing your MySQL database as the root user either, people could do all sorts of nasty things with SQL injection style attacks
 
Soldato
OP
Joined
19 Jul 2006
Posts
2,949
Location
Leicester
In my public_html folder, which is where I put my Webpages, there is nothing in there apart from what I put in there.
I'll ask someone at my Uni about it and if I can't do it, I suppose I can buy some hosting and a domain.

I don't have my Username and Password in my PHP files as such, I have them in a global.php file which I include on each page, is that ok?
 
Back
Top Bottom