Issue Setting Up Database in cPanel

I am encountering an issue while setting up the database for OpenEMR on cPanel. The process is getting stuck at the database creation step.

I’ve already created a database and user with all privileges, upon connecting it doesn’t pass the Creating a Database, connects to SQL though

Are you supplying the root credentials? I’ve found, but haven’t looked at that code in awhile, that just using an user account regardless of proper permissions, doesn’t work for me when testing releases.
My opinion is it should and will look at that perhaps by next patch.

It’s on cPanel, on Namecheap web hosting. I created a database and user having all privileges. Which takes it to the next stage. This doesn’t allow it create database, after allowing it setup a database. I’m trying to setup in xampp then see if transferring database from my local system to my domain database setup after.

I just wish it’s possible to have it setup on my cPanel directly.

Also suggestion, is it possible for OpenEMR to be added to Softacolous - App and WordPress Manager. So database and setup could be easier.

What I have realised shared openemr didnt work for me on a shared hosting account. You will need root access so the only thing that worked for me was a VPS.

You will also need to modify the php.ini and my.ini files which a shared hosting account dont allow.

I was able to figure out how to use the Shared hosting

1 Like

do you mind sharing how you were able to use shared hosting

I uploaded the database directly into my cPanel. Then within the config found in, /sites/defaults/sqlconf.php

//  OpenEMR
//  MySQL Config

global $disable_utf8_flag;
$disable_utf8_flag = false;

$host   = 'localhost';
$port   = '3306';
$login  = 'openemr';
$pass   = 'pass';
$dbase  = 'openemr';
$db_encoding = 'utf8mb4';

$sqlconf = array();
global $sqlconf;
$sqlconf["host"]= $host;
$sqlconf["port"] = $port;
$sqlconf["login"] = $login;
$sqlconf["pass"] = $pass;
$sqlconf["dbase"] = $dbase;
$sqlconf["db_encoding"] = $db_encoding;

$config = 1; /////////////

After creating the database and import the database into phpMyAdmin, enter the correct details into the above, and change the $config = 1 to from 0 to 1

@vicron @sjpadgett @nwhator Since I am using Cpanel to host openemr, An easy way to config the databas is to use SQL Database wizard if you have an admin access , from their you will be able to add the dbase name along with creating the user and its credentials.

I hope that may help those who are hosting it using Cpanel.

For anyone encountering similar problem, had a similar issue. Try to manually create database via phpadmin before you even initiate openemr setup, then entering database name in openemr installation process.