 |
Using BCC Databases
Below is a guide to managing Databases in Briohost Control Center.

A. Where can I manage databases?

1) Login to Briohost Control Center using the username and password associated with
the domain you wish to
administer. You can login from the homepage:

2) Once you are logged in: Click on Databases.

3) Once you are in Databases: Click on Manage Databases.

Back to top
B. Where can I access phpMyAdmin?
1) Login to Briohost Control Center using the username and password associated
with the domain you wish to administer. You can login from the homepage:

2) Once you are logged in: Click on Databases.

3) Once you are in Databases: Click on phpMyAdmin.

Back to top
C. How do I add databases?
1) Complete Step A.

2) Once you are in Manage Databases: To add a new database, enter the name you
want for the database and click Add Database.
* NOTE: database names will always be prefixed with your masteruser then an underscore.

Back to top
D. How do I add database users?
1) Complete Step C.

2) Once you have added a database: To assign users to the database, click on
the Users button associated with the database.

3) Once you are in Users: To add a new user, enter the name of the user,
select the level of access the user will have from the dropdown list, and click Add User.

Back to top
E. How do I use PHP to connect to my database?
1) Create a simple page
This example will show how to use PHP to connect to a MYSQL database. This example will assume that you have already
created a database and table, using your control center in the database section.
First thing is open some text editor (notepad, Dreamweaver, UltraEdit, vi, ..etc). First we need to define our
connection details: host, username, password, database name and table. The information is set in your control
center.
Below is the PHP to do so:
Well that seemed like quite a mouthful didn't it? Now let's go through the code and explain what each section means.
The first section you are just creating variables which are needed to connect to the database.
The variable dbHost should be set to localhost if it is residing on the same server as your other files. This is
normally set to localhost. 'dbUser, dbPass, and dbName' are: the user for the database (which was created in phpMyAdmin
or some other method), and dbName is the name of the database. //connect to the mysql server = @mysql_connect(, , );
The variable 'link' is created which calls the mysql function 'connect'. The function sends the Hostname, Username, and
Password in order to connect.
This IF statement sees if the connection was successful. The '!link' means 'NOT link, meaning unsuccessful'. If this is
the case it prints out the error message 'Could not connect to server.' //select the database
if(!@mysql_select_db()) { //report error echo 'Could not select database'; exit; } This final IF statement
attempts to select the database, ONLY if the connection to the server was successful (link). If it cannot select the
database, it will print out the relative error message, 'Could not select database.' So from the script you can see
that connecting to the database is quite simple. It involves three steps: declaring the variables, connecting to the
server, and finally selecting the database. I hope this tutorial helps you understand the link between PHP and MYSQL a
little better.
For more information visit php.net
Back to top
F. How do I change a database user's password?
1) Complete Step D.

2) If a user loses their password: You can change the password by clicking
on the Password button associated with the database.

3) Once you are in the Password section: To change the password, enter the
new password, re-enter it, and click Change.

Back to top
Back to Online Manual
|
 |
|