Are you getting a database error in Koken similar to this?

Connection error

Cannot connect to the API. Error message:
Database connection failed. Make sure the database server is running and the information in storage / configuration / database.php is still correct.

This means that Koken is unable to connect to your database due to a bad username, password, database name, or other possible issues. In this tutorial, we will walk you through the process of troubleshooting and resolving the issue. Before you know it, your database connection issues will be solved and you will be up and running shortly.

Check your database user, password, and database name

The most common reason for a database connection error in Koken is due toa bad username, password, or database name within your Koken database configuration file.

Locate and open your Koken database.php file

  1. All of your Koken database configuration information is stored within a file named database.php. This file is located within your Koken installation at:

    /storage/configuration/database.php

  2. The quickest and easiest way to open and edit the file would be within the cPanel File Manager. First, log into cPanel, open the File Manager, and browse for the configuration file.

  3. Next, you will just need to open the file. Right-click the Koken database.php file and click on Code Editor.

  4. Now, you will see the full configuration file. In each field, you will see entries for the Koken database connection settings. Check over the database username, password, and database name to ensure that all of the information is correct within there. Any incorrect information here will cause a database connection error in Koken.

What if I don't know my database connection settings?

If you are unsure of your database connection settings, you can gain that infromation within cPanel by clicking on MySQL Databases. From here, it will list all of your databases as well as the user assigned to it. If you do not see a user assigned to your Koken database, you will need to either create one or assign an existing user with all permissions at the bottom of the MySQL Databases page.

If you are unsure of your password, unfortunately, there is not a way to obtain the existing password. You will need to reset the password for that specific user that is assigned to the Koken database. You may do so by clicking on the user within the lsit to the bottom of the MySQL Databases section of cPanel to reset your password. After you reset the password, be sure to adjust your database.php file within Koken.

Incorrect user permissions to your Koken database

If your Koken database settings are indeed correact, you may not have the user assigned to the database or you may not have the correct permissions to access the Koken database. To resolve that issue, make sure that you see a user defined within your MySQL Databases section of cPanel for your Koken database. In the list of your databases, you should see your Koken database with the user that is assigned to it on the right of it. If you do not have a user, you will need to create the database user for that specific database or assign an existing one.

If you do have a database user defined to the right of your Koken database, make sure that this user has the correct permissions. On that same section of cPanel that we were previously in, you will see a section that says "Add User to Database". Selecty your database user as well as your Koken databasse and click on Add. Here, you may then add all privileges to the database.

Check your Koken database prefix

While rare, your database prefix could be incorrect. Within the previous database.php file for Koken, you will see a line that says "prefix". This database prefix determines what every field within your database starts with. To see what your current Koken database prefix is, you may log into PHPMyAdmin and select your Koken database. You will notice that each field in the database starts with something specific such as "koken_". Be sure that this matches your prefix within your Koken database.php file.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 200994

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!