Connection to remote server, using Bitnami & Google Cloud

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Connection to remote server, using Bitnami & Google Cloud

Postby markiecarter » 31. December 2017 14:23

Hello all - I hope you can help.
I have a database and set of php files which I have successfully made work in localhost.
I am trying to deploy these to a remote server, and have followed the steps in the link below: ... oogle.html

These are the steps I have completed:
I have registered with Google Cloud platform, and with Bitnami, and I have connected the two accounts.
I have provisioned the Google Cloud platform server, with LAMP, and am running the LampStack in the Cloud.
I have tested mysql and PHP and they work.
I have created the database in the remote server and moved the php files across using FileZilla.

The problem I have is that I cannot connect to the database and successfully query it using mysql.

An example of the code I am using is below, and this is saved as testing_connection.php:

Code: Select all
echo"<b>MY SITE";

$dbhost = '12.345.67.890'; // this is the URL, and it works successfully to give me access to phpmyadmin, so I know it is correct
$dbuser = 'root';
$dbpass = 'AbcdEFghIJk'; // this is the password I use to get into phpmyadmin
$db = 'pred'; // this is the name of the database

echo"<p>blah blah";

mysql_connect($dbhost,$dbuser, $dbpass) or die ('Unable to connect to database! Please try again later.');

$query1 = "select * from user where user_id = 60 ";
echo"<p>This is my website";
$result1 = mysql_query($query1)  or die(mysql_error());
echo"<p>This is your user name:";

The output I get for 12.345.67.890/testing_connection.php is just the first 2 lines:


blah blah

It seems to not be able to understand the connection details, nor therefore query the db.

Can anyone help with this?

Thanks in advance!


[EDIT by Altrea: moved to the english section of this board]
Posts: 8
Joined: 22. October 2012 13:59
Operating System: Windows XP SP3

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 67 guests