Skip to main content
×
×

Using a database

How can you create a database for your web hosting and how do you link to your database from your script? Follow the steps to use your database.

Create a database

  1. log in with your username and password at https://cp.belgacomhosting.be/.
  2. Click Databases.
    Databases
  3. Click Add new database.
    Add new database
  4. Fill in the fields as described and click Next:
    Fill in the fields to create your database.
    • Name database: choose a name for your database.
    • Data size limit: choose a limit for your database between 1 and 100 MB.
    • Name database user: choose a name for the user who manages your database.
    • Password and Confirm Password: choose a password of at least 7 characters, including different letters and numbers. To choose any password, click on Generate.
    • Verification type: Choose SQL Server or Windows according to the type of authentication you want to use.
  5. Click Finish.
    Overview of the new database

Your database is now created.

Link to your database

With the data with which you just created your database, you can link to your database from a script:

To link from a PHP script to your database, use the following code:

mysql_connect("localhost", "admin", "password");

For this you replace:

  • localhost: by the name of your database.
  • admin: by the administrator login of your database.
  • password: by the administrator password of your database.

To link from a PERL script to your database, use the following code:

DBI->connect("DBI:mysql:database:localhost", "admin", "password");

For this you replace:

  • localhost: by the name of your database.
  • admin: by the administrator login of your database.
  • password: by the administrator password of your database.

Contact

Our Bizz Experts are at your disposal. Choose your contact mode.