Migrating to AWS EC...
 
Notifications
Clear all

Migrating to AWS EC2

9 Posts
2 Users
0 Reactions
700 Views
(@megaman)
Posts: 34
Trusted Member
Topic starter
 

Hello Skared Creations!

1) Unity 5.5,  Combu 2.1.13, Clean MySQL combu installation.

2) My Dedicated server with combu - works perfect.

3) I am trying to migrate to AWS EC2 instance.

4) I tried simple debug pHp script to access combu DB at EC2 instance with SUCCESS!

5) But  stuck at the point where cant connect to MySQl combu DB, with web admin panel or via unity.

6) Would you please be so kind and try to connect for debugging case to http://*.*.*.*/api/Game/      and give a comment on what is going on?

7)Thank you for amazing product i use for a few years. Have great day.

 
Posted : 07/02/2017 11:16 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

You haven't enabled short_open_tag in php.ini

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 07/02/2017 11:19 am
(@megaman)
Posts: 34
Trusted Member
Topic starter
 

Skared Creations said
You haven't enabled short_open_tag in php.ini  

Thank you for reply. Yes i havent! Now short_open_tag = On  still problem persist... 🙁

 
Posted : 07/02/2017 11:39 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

As you can read in the admin panel: Access denied for user 'xxxxxx'@'localhost' (using password: YES)

It seems your database connection constants are wrong, if you have set the IP address as server name and MySql is running on the same machine then you should use "localhost".

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 07/02/2017 11:48 am
(@megaman)
Posts: 34
Trusted Member
Topic starter
 

Skared Creations said
As you can read in the admin panel: Access denied for user 'xxxxxx'@'localhost' (using password: YES)

It seems your database connection constants are wrong, if you have set the IP address as server name and MySql is running on the same machine then you should use "localhost".  

Well i do use "lcoalhost" for "GAME_DB_SERVER" but as it is AWS EC2 instant it is in 1:1 NAT , maybe this cause an issue. Now at least i have [Combu Server Info] Version: 2.1.13 (match)  message in Unity3d.... still cant register user or admin user

 
Posted : 07/02/2017 11:55 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

I'm not an expert of AWS EC2, but you said "I tried simple debug pHp script to access combu DB at EC2 instance with SUCCESS" (meaning that you've successfully run a SELECT statement on a table?) so if the connection constants are the same you used in that php script then it should theoretically work...

As you can see in /lib/Database.php it's using the common mysql_connect() function, so I cannot see why it should act differently (I suppose you used the same function in your sample php script?).

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 07/02/2017 12:07 pm
(@megaman)
Posts: 34
Trusted Member
Topic starter
 

Skared Creations said
I'm not an expert of AWS EC2, but you said "I tried simple debug pHp script to access combu DB at EC2 instance with SUCCESS" (meaning that you've successfully run a SELECT statement on a table?) so if the connection constants are the same you used in that php script then it should theoretically work...  

Exactly. Script is able  to select and print from CB_News table.   You can check the script at  http://*.*.*.*/test.php       script is simple as that: 

 

$connection = mysql_connect('localhost', 'username', 'password' ,'dbname');

if (!$connection)
{
die('Could not connect the database: ' . mysql_error());
} else {
echo 'Database Connected successfully! ... ';
}
echo '1... ';
mysql_select_db($db_name, $connection);
echo '2... ';
$sql = mysql_query("SELECT Subject, Message FROM CB_News");
echo '3... ';
if(!$sql) {
die('!sql mysql_select_db: ' . mysql_error());
} else {
echo "RESULT: ";
$values = mysql_fetch_array($sql);
var_dump($values);
}

mysql_close($connection);

 
Posted : 07/02/2017 12:15 pm
(@megaman)
Posts: 34
Trusted Member
Topic starter
 

Creator provided service via skype and in a few minutes fixed problem: The "$" in a password that caused login problem. What can i say? AWS EC2 ready product. Approved. Thanks a lot again and great day. wub

 
Posted : 07/02/2017 1:18 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

For anyone else reading this: if you have "$" in your database connection password then enclose the defined value in single quote (e.g.: 'my$password'), because PHP assumes that you're putting a variable (e.g.: $password in the above example) when enclosed in double quotes.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 07/02/2017 1:23 pm
Share: