How to create database in Siteworx

How to create a database in siteworx

With Sitworx UI you have full control over the creation of your database and user access when using our PHP or Java hosting.

Please note: You cannot create and manage users via shell. You must use Siteworx

Login to your control panel at https://domain.com:2443/siteworx/

Click Hosting features >> MySql >> Databases

In the page that opens, enter the database name, check the box to Create User and click Add as shown below

Important: Option “when connecting from” can be any of the below

  1. localhost if script and database is in the same server
  2. IP, say 11.22.33.44 if you need to access the database from that IP
  3. % if you need to allow access from all sources (not recommended)

If you already have a user setup for database, you can simply add existing user but clicking on [Manage Users] link after the database has been created.
After you have created your database and assigned a user, you can use PHPMyAdmin to import data or create tables.

You may also manage your database via shell after you have created the database and user. Such as importing database SQL file, mysqldump, or simply connect and use database if data exists.

Database Names

When you setup your database you will provide it a name and the system will automatically prefix your account username to your database name. For example if your domain is mydomain.com then your virtual account username would be mydomai and if you name your database sam then your actual database name would be mydomai_sam. So that is what you use in your database connection string. The username is handled the same way. 

Note: 'root' is a reserved word so you cannot use this in  your database name or username. For example something_root will fail to connect.

  • 35 Users Found This Useful
Was this answer helpful?

Related Articles

PostgreSQL

What Is PostgreSQL? PostgreSQL is pronounced Post-Gres-Q-L, also called just Postgres....

How to Use MySQL

Overview MySQL is a very fast, multi-threaded, multi-user, and robust SQL (Structured Query...

New to Siteworx? Please Read.

Overview You may have some experience dealing with other hosting companies and may have an idea...

SiteWorx Server Paths

Following paths for SiteWorx Servers: Root path to html directory:...

Where do I upload my webapp files?

It depends on your service, if you have shared JSP or Java web hosting. When you ftp or SSH in,...