PDA

View Full Version : Create a database for a subdomain


travelman
06-08-2008, 02:04 PM
How do I create a database to be used with a specific subdomain?

Eriksrocks
06-08-2008, 02:12 PM
Create it in the same way you normally would through cPanel. It will still be accessible from the subdomain. :)

travelman
06-08-2008, 02:32 PM
I figured out how to create a database....but how I connect it to a subdomain?
the subdomain is photoblog.travelingtribe.net

Jack

Eriksrocks
06-08-2008, 03:17 PM
You don't. As long as the subdomain is hosted on your account, you just put in the database details into the configuration file of your script just like you would if the script was hosted on the main domain. :)

charlesgan
06-09-2008, 12:20 AM
I figured out how to create a database....but how I connect it to a subdomain?
the subdomain is photoblog.travelingtribe.net

Jack

put it this way...
your subdomain's php script/file... with the connection details, connect to the database.

same as how your domain connect to mysql database

felgall
06-09-2008, 01:00 AM
There is absolutely no difference in how to connect to the database since all database connections are done for a given web page and so it makes no difference whether you use a different database for each page or the same database for hundreds of different sites.

travelman
06-09-2008, 05:33 AM
Ok, so I'm going to show my ignorance. Usually when installing Wordpress I've used fantastico. For this one I'm wanting to install Pixelpost but the whole database thing is kind of overwhelming. When I created a database i didn't see where it would connect with a specfic domain name. How do I connect these?
Thanks so much!

travelman
06-09-2008, 08:36 AM
Can anyone help me with this? I'm kind of confused about this. What do I need to do to create database for my subdomain?

Eriksrocks
06-09-2008, 12:38 PM
I don't know how I can make it much clearer. :)

Go into cPanel > Databases > MySQL Databases.

Create a new database, a new user, and then attach the user to the database with full permissions.

Then, enter the details of your database, user, etc. that you just created in the config file of your script (the script documentation will tell you where exactly.)

Follow the documentation of the script and you should be fine. :)

felgall
06-09-2008, 01:23 PM
Databases don't connect to domains or sub-domains.


Pages connect to databases by specifying the host name, database name, user name, and password somewhere at the top of the page in the connect calls.