Hi. How can we help?

Database Setup

01 Jan 2020 in: Getting Started

If you already have an empty database and you don't want to setup the software into new database you can skip this step and proceed to script upload. Otherwise, keep up reading to learn how to create a new database on your server.

Basically, there is one of three ways to create a new database on your server:

  • via cPanel
  • via phpMyAdmin
  • via SSH

If you are not sure what cPanel, phpMyAdmin, or SSH is, please contact your hosting company. They will give you at least one of those accounts. Below is the detailed description of each method described.

Method #1: cPanel

Creating new database using cPanel (you hosting account control panel) is the easiest and the fastest way and is considered the default way. If you are not experienced in installing scripts, please stick to this method.

  • Go to MySQL Databases section.
  • Enter database name and click Add Db button. This will create new database.
  • Enter username and password and click Add User button. This will create new user. Please remember these credentials since you will need them later when running installation script.
  • Add newly created user to the newly created database with ALL privileges.

Method #2: phpMyAdmin

phpMyAdmin is another way to create new database. But you must have enough correct permission to do that in phpMyAdmin.

  • Open phpMyAdmin in your browser. If you're not sure what the URL is, please contact your hosting company.
  • Enter database name into Create new database field and click Create button. This will create new database.
  • Select newly created database and go to SQL section.
  • In the query text field enter this query:
    GRANT ALL PRIVILEGES ON database_name.* TO database_username@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
    IMPORTANT! Don't forget to replace database_name, database_username, and password with actual database name, username, and password when running this query.
  • Go to SQL section again and run this query:
    FLUSH PRIVILEGES;

Method #3: SSH

The last alternative method is via your SSH account. This is the most sophisticated method.

  • Connect to your server via SSH.
  • Run the command below to enter MySQL environment:
    >mysql -u username -p
    Replace username with actual database username. You will be prompted to enter password.
  • Run the command below to create new database:
    CREATE DATABASE database_name;
    Replace database_name with actual database name.
  • Run the command below to grant privileges to the user:
    GRANT ALL PRIVILEGES ON database_name.* TO database_username@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
    IMPORTANT! Don't forget to replace database_name, database_username, and password with actual database name, username, and password when running this query.
  • Run the command below:
    FLUSH PRIVILEGES;

By following the instructions of one of the methods above you should now have a new database created on your server.