Jump to content
thirty bees forum
  • 0

Database Server is not found


Question

Posted

Setting up thirty bees on Digital Ocean, I received the following error:

"Database Server is not found. Please verify the login, password and server fields (DbPDO)"

I followed a tutorial written by Lesley some time ago, although I had to adapt it slightly as the PHP version provided in LAMP was 7.4.

I am not experienced with MySQL. I apologise in advance if the error is caused by my ignorance.

 

More information:
I used a one-click install of LAMP on Ubuntu 20.04
I created a user with sudo privileges to install thirty bees
The PHP extensions installed were 7.4 rather than 7.0 (as in the tutorial)

Lesley's tutorial on Installing with Digital Ocean:
https://thirtybees.com/developer-blog/installing-thirty-bees-on-digital-ocean/

database-error.png

17 answers to this question

Recommended Posts

  • 0
Posted

I would also change the database names to be more complex

But yes go to your host site and create a new database name and setup new names and passwords

  • 0
Posted

If the MySQL server would be running, but no database created, the installer would offer to create this database.

Accordingly it boils down to do what the installer says, make sure login credentials are correct. Looking at this very long password, it might be too long (not sure about the limit off the top of my head) or contain characters not allowed to be sent over HTTP.

  • 0
Posted

Thank All.

@Traumflug I expect this is user error, as I have close to zero experience with MySQL.

Is the password required by the installer the MySQL root password?

Also, noob question, but I feel I should ask, could this be related to my PHP version (7.4) as I am aware that the thirty bees GitHub page states: "PHP 5.6 - PHP 7.3"?

databases.png

  • 0
Posted
1 hour ago, Wartin said:

You need user and password of the database server. Did you have to enter some user or password to go into mysql console?

You can see here: https://www.techrepublic.com/article/how-to-set-change-and-recover-a-mysql-root-password/

That was the password I used. Unfortunately, this didn't work.

I also tried creating a new MySQL user with full privileges, creating the database with this user and logging in, via the server, with those credentials. Still, it did not work.

I am thinking it maybe the server setup which is not compatible. Of course, that's just a guess.

I tried setting up as described on the GitHub page under installation (still with Digital Ocean's LAMP one-click install), but I get the same result.

  • 0
Posted (edited)
1 hour ago, Wartin said:

Oh, I see. It's not seeing the server... Maybe it's running in another port?

image.png.b05b597721f0d002e8146c917510760c.png

I just checked, but it appears to be running on the default: 

port.png

Edited by jollyfrog
  • 0
Posted

Everything seems to be right... Can you try making a new username/password just to try, and give that user permission over thirtybees database?

  • 0
Posted (edited)
23 minutes ago, Wartin said:

Everything seems to be right... Can you try making a new username/password just to try, and give that user permission over thirtybees database?

I deleted the database, created a new user with full privileges and created the database once more with that user. Then, I used the new username and password in the installer and I got the same result.

I have since uninstalled php v7.4 and replaced with 7.3 (plus relevant extensions) with the same outcome. 

Unfortunately, I have exactly the same error every time. I would love to get to the bottom of it. Perhaps I have just missed something vital or maybe Digital Ocean's LAMP is not compatible?

Ubuntu 20.04

Apache
2.4.41
Apache 2

MySQL server
8.0.21
GPL 2 with modifications

PHP
7.4
PHP v3.01

Fail2ban
0.11.1
GPL 2 with modifications

Postfix
3.4.10
IBM Public

Certbot
0.39.0
Apache 2

Edited by jollyfrog
formatting
  • 0
Posted
37 minutes ago, jollyfrog said:

I would love to get to the bottom of it.

If I were you I'd try connecting to the database directly from PHP, like:

 <?php
$servername = "localhost";
$username = "username";
$password = "password";

// Create connection
$conn = mysqli_connect($servername, $username, $password);

// Check connection
if (!$conn) {
  die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?> 

(from https://www.w3schools.com/php/php_mysql_connect.asp)

Gook luck!

  • 0
Posted
1 hour ago, Wartin said:

If I were you I'd try connecting to the database directly from PHP, like:


 <?php
$servername = "localhost";
$username = "username";
$password = "password";

// Create connection
$conn = mysqli_connect($servername, $username, $password);

// Check connection
if (!$conn) {
  die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?> 

(from https://www.w3schools.com/php/php_mysql_connect.asp)

Gook luck!

I'm afraid I don't know PHP. It doesn't look like I am going to get this solved, but thanks for your help. Take care.

  • 0
Posted

It's OK. I'll explain how to do it in case someone else reads the thread.

You have to create a new file called, for example, mysqltest.php with the code I pasted. The username and password has to be changed, of course. After saving it, you have to visit that file from the browser, like: yourdomainname.com/mysqltest.php

If does not connect, it will show the error.

 

  • 0
Posted
5 hours ago, Wartin said:

It's OK. I'll explain how to do it in case someone else reads the thread.

You have to create a new file called, for example, mysqltest.php with the code I pasted. The username and password has to be changed, of course. After saving it, you have to visit that file from the browser, like: yourdomainname.com/mysqltest.php

If does not connect, it will show the error.

 

That seems to have narrowed down the possible issue.

I successfully used the script but it returned the error: Connection failed: Access denied for user 'newuser'@'localhost'

Yet the exact same username and password is successfully logging me in to MySQL in the terminal via ssh.

I'm thinking there must be a communication issue between PHP and MySQL.

Perhaps I was supposed to install something and I missed it or used the wrong extension?

In regard to the PHP extensions do you know what this means: "mysql (PDO only)"? --- this is taken from the requirements on the thirty bees GitHub page.
 

  • 0
Posted

I eventually gave up on following the Digital Ocean tutorial and the GitHub installation guide. I'm just not clever enough or experienced enough to fill in the gaps.

  • 0
Posted (edited)
20 hours ago, Wartin said:

Oh, too sad, you tried a lot of things... Maybe @datakick know what's happening here...

It's OK, I managed to solve this with another tutorial and used the information on GitHub's installation guide to figure out what new dependencies needed to be included. Thank you @Wartin for your help. :)

@datakick If it helps anyone document the process, I would be happy to give my step-by-step notes to the thirty bees team. I am aware that you have a million and one jobs to do.

Plus, I can't be 100% sure if I have missed anything vital, so I wouldn't want it to be public without someone who knows more than me looking over it.

Edited by jollyfrog
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...