|
||||||
|
||||||
|
||||||
|
||||||
|
||||||
Now there are two ways to access and manage your newly created database. The first one is locally trough the Web based manager - phpMyAdmin, which is accessed trough the cPanel's "MySQL Databases" section. The phpMyAdmin link is at the bottom of the page.

A new page/tab of your browser will open and the phpMyAdmin will load there and looks like this:

With it, you can export (dump) one or more of your databases, import a dump file, change the collation of your databases and execute SQL queries.
The phpMyAdmin menu appears in a separate browser window. To return to cPanel, simply close that browser window.
The second way to connect to your databases is remotely. To do so, you should add your IP address in the "Access Hosts" section in the MySQL page. For example if your address is 1.2.3.4 you need to type it in the box and click on the "Add Host" button like shown in the image below:

As before, this will lead you to a page where the cPanel confirms the successful adding of the host. A group of hosts can also be added by using the "%" symbol. For example "%.domain.com" will include ns1.domain.com, server1.domain.com, test.domain.com, etc. The second thing you need to connect to your database remotely is software that can do that. Almost all of the SQL management applications are capable of connecting to a remote database. Some of the most popular are: CuteSQL, myAdmin etc.
Click here to learn how to backup/restore your MySQL database
|
||||||
You can allow external web servers to access your MySQL databases by adding their domain name to the list of hosts that are able to access databases on your web site. Localhost stands for the server that your site is currently on.
Step 1: To access the MySQL Account Maintenance Menu, click on the icon above the words MySQL Databases on the main screen of your cPanel interface.
Step 2: Type the name of the server into the blank field next to Host: (It should be in the following format: test.siteground.com, server1.siteground.com, ns1.siteground.com, etc).

Step 3: Click on Add Host to allow that server to access your MySQL databases.

Step 4: Click on Delete to remove the server to access your MySQL databases.

Troubleshooting Tips: To add a group of servers, you can use %.domain.com which would include all of the following: ns1.domain.com, server1.domain.com, test.domain.com, etc.
|
||||||
|
||||||
|
||||||
|
||||||
|
||||||
|
||||
By default all SiteGround servers have the following Pear packages installed:
However you can easily install any additional Pear package. In this tutorial we will demonstrate how to install the Calendar Pear package.
Step 1. First we go to http://pear.php.net/ and search for Calendar.
Step 2. The search will find the Calendar package with its Description: "A package for building Calendar data structures". We follow the link to the Calendar packet home page.
Step 3. There we click on the link to the Download section and choose to download the latest version;
Step 4. Once we have the package downloaded locally, we have to extract it. For this purpose use any popular archivator (7zip).
Step 5. Now you should have a folder called Calendar-X.X.X. In order to simplify things we will rename it to Calendar.
Step 6. Next connect to your account by FTP and create a directory called pear right in the home directory (it does not have to be in the webroot). Upload the Calendar directory inside the pear directory. You should upload similarly any other packages there.
Step 7. Next inform Php to include the local pear directory. This can be done by creating a file, called php.ini and pasting the following source code into it:
include_path = ".:/usr/lib/php:/usr/local/lib/php:/home/my_user_name/pear";
Make sure to change my_user_name to your username. Also the first two paths (/usr/lib/php:/usr/local/lib/php) should remain so that the default PHP libraries are loaded.
This php.ini file must be put in each directory where pear packaegs are needed.
From this point on the Calendar Pear package will be available with the fixed path:
include 'Calendar/Calendar.php';
Of course, you could just place the Calendar.php in a directory and include it directly. This way you will end up with many hardcoded paths and confusion will be increased in case you plan to use more Pear packages.
Following the above steps you can install other Pear packages and benefit from using static paths.
Please, feel free to contact us if you have any questions or recommendations about this tutorial at: tutorials 'at' siteground.com