Database Hosting. Parallels H-Sphere 3.1
広告
広告
C H A P T E R 1 9
Database Hosting
Parallels H-Sphere allows hosting MySQL, PostgreSQL and Microsoft SQL databases.
In this chapter:
MySQL Databases
MySQL is a popular database management system. It allows you to add, access, and process stored data.
MySQL users cannot exist separately from MySQL databases. You must stick to the following sequence:
1 Create a database
2 Add MySQL users to each created database.
However, MySQL users can be shared by different databases.
In this section:
Creating MySQL Database and Its Users .......................................................... 169
Editing MySQL Databases with phpMyAdmin .................................................... 171
Adding MySQL Users And Granting Them Privileges ........................................ 172
Database Hosting 169
Creating MySQL Database and Its Users
To create a MySQL database:
1 Select
MySQL in the Databases menu and MySQL database creation Wizard automatically appears.
2 On the form that shows enter the name of the database and database description if needed:
170 Database Hosting
Note: New MySQL databases are created with the username_ prefix, where username is a unique identifier that contains either first letters of the name of an account under which this database is created, or that account name ‟s first letters and a unique number if there are several account names starting with the same letters. This is done to prevent the creation of databases with the same name under different users.
3 Agree with additional charges if any.
4 In the form that appears, create a new user or grant privileges to users of other databases:
5 Add a new user to the database you have just created: choose user role and click
Add user.
6 Choose roles for users of other databases so they can use your new database. Click
Grant.
7 Click
Finish to complete creating your MySQL database.
Database Hosting 171
Editing MySQL Databases with phpMyAdmin
You can edit the content of your databases using the phpMyAdmin utility that comes with your control panel.
To run phpMyAdmin, do the following:
1 Select
MySQL databases in the Databases menu.
2 In the form that appears, click the name of the existing MySQL
Database you want to edit or the Edit icon on its right:
3 In the form that appears, click
Built in phpMyAdmin control panel to start editing your database:
4 Follow the instructions of the phpMyAdmin control panel to edit your
MySQL database.
172 Database Hosting
Changing MySQL Disk Quota
MySQL disk quota is the maximum allowed size of one MySQL database. If you exceed this quota, you will be charged for overlimit at a different (usually higher) price.
To change MySQL disk quota:
1 Select
MySQL databases in the Databases menu.
2 Click the
MySQL Database or the Edit icon on its right:
3 Click the
Change button against the Quota field and enter the new quota:
4 Click
Submit.
5 Agree to additional charges if any.
Adding MySQL Users And Granting Them Privileges
To add new users to an existing MySQL database:
1 Select MySQL databases in the Databases menu.
2 Click the MySQL Database or the Edit icon on its right.
3 On the form that shows, click
Add against the Database users field and fill the form:
Database Hosting 173
Each user role involves a fixed set of privileges on this specific database:
Role: Set of privileges: read select read/write select, insert, delete, update dba select, insert, update, drop, create, alter, index
4 Click the
Add or Grant button and agree to additional charges.
5 To edit privileges, click the
Edit icon next to the user. You will be brought to the
Privilege Maintenance page.
174 Database Hosting
6 Check or uncheck the desired privileges and press the
Submit button.
Note: For more information on MySQL access privileges, please refer to www.mysql.com
(http://www.mysql.com). Any changes in user privileges will be applied to the whole selected database.
Changing User Passwords
To change user password in the MySQL database:
1 Select
MySQL databases in the Databases menu.
2 Click the MySQL Database or the Edit icon on its right:
3 On the MySQL database management page click the Change password icon next to the database user.
4 Enter new password and click the
Change button.
Database Hosting 175
PostgreSQL Databases
PostgreSQL is a database management system based on Unix platform. It allows you to add, access, and process stored data. The SQL part of PostgreSQL stands for
“Structured Query Language” - the most common standardized language used to access databases.
Unlike with other databases, a PostgreSQL database cannot be created without a user.
You must stick to the following sequence:
1 Create a PostgreSQL user.
2 Create a database.
Note: The first user in the list of users is the owner of a database, however the database can be used by others who obtain permissions from the owner.
In this section:
Deleting Users And Changing Their Passwords ................................................ 176
Editing PostgreSQL Databases and User Privileges with phpPgAdmin ............. 178
Creating PostgreSQL Users
To create a PostgreSQL database user:
1 Select
PostgreSQL in the Databases menu and the Add PostgreSQL user form automatically appears.
2 Fill the
Add PostgreSQL user form on the PostgreSQL Users page.
3 Agree to additional charges.
176 Database Hosting
Deleting Users And Changing Their Passwords
To delete the PostgreSQL database user:
1 Select
PostgreSQL Users in the Databases menu.
2 Click the
Trash icon next to the user name on the PostgreSQL user
management page.
3 Agree to additional charges.
Important:
The Trash icon appears only next to non-owners. The owner of a database cannot be deleted, unless you remove the PostgreSQL database.
Database Hosting 177
To change user password:
1 Select
PostgreSQL Users in the Databases menu.
2 Click the
Change icon next to the name of the user.
3 Enter a new password, confirm it, and click
Change.
Important: the user privileges can be changed by means of phpPgAdmin.
Creating PostgreSQL Databases
Having at least one user, you can create a PostgreSQL database. This user will become the owner of this database.
To create a database:
1 Select PostgreSQL databases in the Databases menu.
2 Click Add Database in the PostgreSQL Databases section:
178 Database Hosting
3 Enter the name and description of the database:
4 Click
Submit and agree to additional charges.
Editing PostgreSQL Databases and User Privileges with phpPgAdmin
You can edit the content of your databases and user privileges using the phpPgAdmin utility that comes with your control panel.
To run phpPgAdmin:
1 Select
PostgreSQL databases in the Databases menu.
2 Click the name of the database you would like to edit.
You can also start phpPgAdmin from the PostgreSQL database management page:
1 Select
PostgreSQL databases in the Databases menu.
2 Click the
Edit icon for the database you are going to edit:
Database Hosting 179
3 In the form that appears, click
Built in phpPgAdmin control panel to start editing your database:
4 Follow the instructions of the phpPgAdmin control panel to edit your
PostgreSQL database.
Changing PostgreSQL Disk Quota
PostgreSQL disk quota is the maximum allowed size of
one PostgreSQL database. If you exceed this quota, you will be charged for overlimit at a different (usually higher) price.
To change PostgreSQL disk quota:
1 Select
PostgreSQL databases in the Databases menu.
2 Click
PostgreSQL Database.
3 Click the
Change icon in the Quota field:
4 Enter new quota and click
Submit.
5 Agree to additional charges.
180 Database Hosting
Microsoft SQL Databases
Microsoft SQL hosting is available both to *nix and Windows accounts if Microsoft SQL is set up in the system and enabled in the plan.
Unlike other SQL databases, Microsoft SQL requires a login to access the Microsoft
SQL server. Once you have created a login, you can create databases. To access a database, you need to create database users.
In this section:
Adding New Microsoft SQL Database Users ..................................................... 182
Changing Microsoft SQL Database Quota ......................................................... 183
Creating Microsoft SQL Logins
Logins are used to access Microsoft SQL server and to create database users. You should create as many logins as many users you will have.
To create an Microsoft SQL login:
1 Select
Microsoft SQL in the Databases menu.
2 Click the
Add New Microsoft SQL login icon at the bottom of page:
Database Hosting 181
3 Enter login and password into the
Microsoft SQL Login Creation Form that shows:
Note: you can change password by clicking the
Change icon against the login name in the Controls section.
4 Click the
Submit button.
5 Agree to additional charges.
To delete login, click the
Trash icon against the login name, in the Controls section.
Important: With deleting a login, Parallels H-Sphere will delete all databases created under it and also all users under the databases. Also if you have some users under this login that are associated with another database, these users will be deleted as well.
Please make sure you want to delete the login before clicking
Trash.
Creating Microsoft SQL Databases
Databases are created under logins and there can be several databases under one login.
To create a Microsoft SQL database:
1 Select
Microsoft SQL databases in the Databases menu.
2 Click the
Add database icon at the bottom of the page that appears.
3 Fill the
MSSQL Database Creation form:
182 Database Hosting
4 Click the
Submit button.
5 Agree to additional charges.
Important: When Microsoft SQL creates a database, it automatically creates a user with the same name as the login this database was created under.
To delete a database, click the
Trash icon against the database name in the Controls section. Deleting a database will delete all its users.
Adding New Microsoft SQL Database Users
Users have only public, db_datareader and db_datawriter roles that allow to access database, read and write tables. Within a database, one login can be used only by one user. Mind, that the login used to enter the database is already used by you and it can ‟t be used to create a new user on this database. Therefore, when you create a new user to the database, the system will offer you to choose from the logins that aren ‟t used by this database.
To add a new user to individual Microsoft SQL database:
1 Select
Microsoft SQL databases in the Databases menu.
2 On the page that appears, click the name of existing database or click the
Edit icon in the Controls section. The following form will show:
3 At the bottom of the page click
Add icon against the Database users field.
The following form will appear:
Database Hosting 183
4 Enter user name.
5 Choose login this user will belong to and click
Add.
6 Agree to additional charges if any.
Changing Microsoft SQL Database Quota
Total quota size is the disk space allocated for the database file and the transaction log file. Database/Transaction Log file quota ratio is the portion of disk space allocated for the database file. If you set the total quota size to 100 MB and the database/transaction log file quota ratio to 40%, then the maximum database file quota is 40 MB and the maximum log file quota is 60 MB. The more dynamic your database is, the bigger transaction log file quota ratio should be.
To change the quota:
1 Select
Microsoft SQL databases in the Databases menu.
2 On the page that appears click the name of an existing database.
3 On the form that shows, click the
Change quota icon against the Database
quota field.
4 Enter new database log file ratio and total quota size on the next page:
5 Click
Submit.
6 Agree to additional charges if any.
184 Database Hosting
Managing Microsoft SQL Databases
You can manage your Microsoft SQL databases through a web-interface with ASP
Enterprise Manager, in your control panel called
Microsoft SQL Manager.
To set up and launch Microsoft SQL Manager:
1 Select the
Domain Settings menu.
2 On the page that appears, click
Edit for Web Service.
3 On the
Web Options page, enable ASP and ASPNET if they are disabled.
Then enable Microsoft SQL Manager at the bottom of the page.
4 Click the
Magnifying glass icon that appears to launch Microsoft SQL
Manager. you will be asked to choose the login to connect to your
Microsoft SQL databases:
ODBC DSN Records
ODBC - Open DataBase Connectivity is a standard database access method developed by Microsoft Corporation. ODBC makes it possible to access any data from any application by means of ODBC drivers - one for each database format. You can create
DSN (Date Source Name) records based on ODBC drivers to access databases of different formats under Windows plan.
In this section:
Database Hosting 185
Creating New DSN Record
To create a new DSN Record:
1 Select
ODBC Service in the ODBC menu, and the list of available ODBC drivers will show.
2 Click the
Add icon next to the database driver you need.
3 Fill the form that appears. Forms are different depending on the DSN type:
186 Database Hosting
Enter the second part of your full DSN name in the DSN field. The first part of your full DSN name is your Windows login. In the applications/scripts you run on your server, you must use the full DSN name, e.g. testvi0-mydatabase as in the below example.
Directories and file names must include paths relative to your home dir root, (the
SourceDB field should include the name of the database and the extension).
Create CF MX DSN record - check this box to have system DSN records registered in ColdFusion MX. Once you have created the DSN record, you will need to wait till the next morning until ColdFusion server is restarted.
4 Click
Create.
Editing DSN Records
Here you will learn how to edit your DSN records.
For more details on each driver ‟s parameters, read driver specifications. E.g. you can find all information about Microsoft SQL DSN configuration on the Microsoft Web Site.
To edit DSN records:
1 Select
ODBC Service in the ODBC menu.
2 On the page that shows, in the
Your DSN section, click the Edit icon next to the DSN record you need.
3 Edit the DSN records in the form that appears.
4 Click
Update.
To delete a DSN record, go to ODBC Service in the ODBC menu and click the
Delete icon next to the existing DSN.
ダウンロード
広告