Jump to content

Help connect script to site


Recommended Posts

hello,im trying to connect my website (pvp/pk etc.)to my db..
windows server 2012.local db.

i have open mysql port,i have create new user in db,i have ask from my hosting to add my machine ip to white list..
but after all this the script on site have not make any connect..

anyone have anyidea whats wrong ?
 

Link to comment
Share on other sites

19 minutes ago, Red-Hair-Shanks said:

hello,im trying to connect my website (pvp/pk etc.)to my db..
windows server 2012.local db.

i have open mysql port,i have create new user in db,i have ask from my hosting to add my machine ip to white list..
but after all this the script on site have not make any connect..

anyone have anyidea whats wrong ?
 

Firewall blocks? Try turn it off and check the script again. Or maybe you didn't give access for new DB user to select table's info.

Link to comment
Share on other sites

3 minutes ago, Vilmis said:

Firewall blocks? Try turn it off and check the script again. Or maybe you didn't give access for new DB user to select table's info.

i have tested that is not working,,i have give full acess to user

Just now, baksteen said:

Is there any error code ?

nop 

Link to comment
Share on other sites

canyouseeme.org to verify port open if you are not sure, if you have full priviledged user to have access and its not working print error message from mysql error

2 possibilities:
1) connection refuse by server

2) connection has error in order to connect to server

so you split the problems in what side they are (server or host) first and then you know what fault is.

Link to comment
Share on other sites

18 hours ago, DenArt Designs said:

canyouseeme.org to verify port open if you are not sure, if you have full priviledged user to have access and its not working print error message from mysql error

2 possibilities:
1) connection refuse by server

2) connection has error in order to connect to server

so you split the problems in what side they are (server or host) first and then you know what fault is.

port is open my friend...where i must look for error? 

Link to comment
Share on other sites

<?php
$servername = "server_ip";
$database = "databasename";
$username = "username";
$password = "password";

try
{
    $conn = new PDO("mysql:host=$servername:3306;dbname=$database", $username, $password);
    // set the PDO error mode to exception
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    echo "Connected successfully"; 
}
catch(PDOException $e)
{
    echo "Connection failed: " . $e->getMessage();
}
?>

try this and then google the error :)

Link to comment
Share on other sites

17 minutes ago, DenArt Designs said:

<?php
$servername = "server_ip";
$database = "databasename";
$username = "username";
$password = "password";

try
{
    $conn = new PDO("mysql:host=$servername:3306;dbname=$database", $username, $password);
    // set the PDO error mode to exception
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    echo "Connected successfully"; 
}
catch(PDOException $e)
{
    echo "Connection failed: " . $e->getMessage();
}
?>

try this and then google the error :)

Connection failed: SQLSTATE[HY000] [2005] Unknown MySQL server host '4564561515' (-2)

Link to comment
Share on other sites

35 minutes ago, DenArt Designs said:

$servername = "server_ip";

add the server's IP address 22.22.22.222

i have add the ip bro..
Connected successfully 

but i dont see the players pvp on the site

Edited by Red-Hair-Shanks
Link to comment
Share on other sites

3 minutes ago, MairHost said:

mysql  port is open ?

yes..
i check the code that denart give me..

now when im going to site ..i have this msg down the script Connected successfully

but i dont see any of the chars from my db

 

Success: I can see your service on 22.2.2.2.22 on port (3306)
Your ISP is not blocking port 3306

Edited by Red-Hair-Shanks
Link to comment
Share on other sites

Connection failed: SQLSTATE[HY000] [2005] Unknown MySQL server host '4564561515' (-2)

it says that you have wrong ip added 

you added 4564561515 as IP

Link to comment
Share on other sites

3 minutes ago, DenArt Designs said:

Connection failed: SQLSTATE[HY000] [2005] Unknown MySQL server host '4564561515' (-2)

it says that you have wrong ip added 

you added 4564561515 as IP

i just delete my ip and put deafult ip to post it.....

 

http://prntscr.com/miir4w

Link to comment
Share on other sites

then there is a problem with the script that you use, your database is ok your user is also ok

the script that has the website has problem 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Posts

    • Hello everyone,   Does anyone know how to turn off or to properly setup "proxy'? I'm trying to connect on server and i get error in Login server:   ========================================================== Error in Login Server ========================================================== "[15:01:53]  INFO IP: 84.126.108.137 Login: test Assigned to Proxy: 127.0.0.1" ==========================================================   And in proxies.xml say something about .properties file, but i cant find that file.     ========================================================== proxies.xml ========================================================== <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE list SYSTEM "proxies.dtd"> <!-- In order to make this file be in use, EnableProxies in server.properties MUST be set to true --> <!-- This list should contain GameServer IPs. IP of the GameServer will be chosen for Player during Server Selection, based on Mask of his IP --> <!-- For example, if IP of the player is 153.4.138.226, all of the masks below will be checked if IP matches range of mask --> <!-- Mask 0.0.0.0/3 covers IPs from 0.0.0.0 to 31.255.255.255. Mask 32.0.0.0/3 covers IPs from 32.0.0.0 to 63.255.255.255 and so on --> <!-- So if IP of the player matches below mask, value in "ip" will be given to him, to connect with GameServer --> <!-- If player IP will not match any mask, Error in LoginServer logs will be printed --> <list>     <level min="40" max="86" ip="127.0.0.1"/>     <minChatMessages party="3" clan="5" ip="127.0.0.1"/>     <minChatMessages shout="5" ip="127.0.0.1"/>     <minChatMessages all="15" trade="5" ip="127.0.0.1"/>     <minChatMessages pm="3" clan="5" ip="127.0.0.1"/>     <mask mask="0.0.0.0/4" ip="127.0.0.1"/>     <mask mask="16.0.0.0/4" ip="127.0.0.1"/>     <mask mask="32.0.0.0/4" ip="127.0.0.1"/>     <mask mask="48.0.0.0/4" ip="127.0.0.1"/>     <mask mask="64.0.0.0/4" ip="127.0.0.1"/>     <mask mask="80.0.0.0/4" ip="127.0.0.1"/>     <mask mask="96.0.0.0/4" ip="127.0.0.1"/>     <mask mask="112.0.0.0/4" ip="127.0.0.1"/>     <mask mask="128.0.0.0/4" ip="127.0.0.1"/>     <mask mask="144.0.0.0/4" ip="127.0.0.1"/>     <mask mask="160.0.0.0/4" ip="127.0.0.1"/>     <mask mask="176.0.0.0/4" ip="127.0.0.1"/>     <mask mask="192.0.0.0/4" ip="127.0.0.1"/>     <mask mask="208.0.0.0/4" ip="127.0.0.1"/>     <mask mask="224.0.0.0/4" ip="127.0.0.1"/> </list> ========================================================== ==========================================================   If anyone could help it would be great.  
    • @Celestinewasnt this guy banned for selling shared stuff? 😄
    • I know xD ... please clean the topic. It's okay!
    • link off    anyone can share it ?   thks
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disbaled AdBlock