Ask the Expert

Same database for two Web sites

How do I get two Web sites to use the same database? The two sites are on the same server, if that is any help. I use cpanel to administer MySQL.

    Requires Free Membership to View

Use the same connection string with both Web sites, or use the same server information when you set them up. Depending on the application or CMS you are running on the Web sites, this may cause errors as not all systems are designed to have a common database. You can always prefix the names of the tables to indicate which Web site they belong to.

This was first published in January 2005

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: