MySQL
is an open source, relational database management system often
used in conjunction with scripting languages such as Perl,
PHP, etc.
What host name/server name should I use
to call out a MySQL database from a script?
To use a MySQL database on your website with PHP, Perl or
another scripting language, you will need to connect to it
first. The host name/server name for connecting to a database on
our Plesk servers is:
localhost
Also be sure to check that you are using the correct
"database name", "username" and
"password".
Is it possible to use one database for
multiple applications?
Often times people will request multiple MySQL databases to use
with different applications, but do not realize that they have
to potential to use one database for all of their applications.
Here is an example of how this might work.
Let's say you have two scripts, a vote and a guestbook, each
that run off of a MySQL DB. You could make one database called
"Vote" with "questions" and
"answers" tables in it, and another database called
"Guestbook" with a table called "guests".
Each table would have the appropriate fields for its scripts to
operate. Now, if you wanted to consolidate these into one DB,
you could easily do the following:
Make a database called "Master". In it, create
tables called "vote_questions", "vote_answers"
and "guestbook_guests". When you configure your
scripts, give them these names for the tables and each script
will be able to use the same database for it operations. They
will each call the DB "master" and use the same
login/password.
This way, you can eliminate multiple DB logins and multiple
DB connections and still run two database applications on the
same database.