Jump to content

Recommended Posts

Posted

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 ?
 

Posted
  On 2/7/2019 at 5:58 PM, 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 ?
 

Expand  

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.

Posted
  On 2/7/2019 at 6:20 PM, 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.

Expand  

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

  On 2/7/2019 at 6:23 PM, baksteen said:

Is there any error code ?

Expand  

nop 

Posted

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.

Posted
  On 2/7/2019 at 11:05 PM, 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.

Expand  

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

Posted
<?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 :)

Posted
  On 2/8/2019 at 5:39 PM, 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 :)

Expand  

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

Posted (edited)
  On 2/8/2019 at 6:01 PM, DenArt Designs said:
$servername = "server_ip";

add the server's IP address 22.22.22.222

Expand  

i have add the ip bro..
Connected successfully 

but i dont see the players pvp on the site

Edited by Red-Hair-Shanks
Posted (edited)
  On 2/8/2019 at 7:01 PM, MairHost said:

mysql  port is open ?

Expand  

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
Posted
  On 2/8/2019 at 7:10 PM, 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

Expand  

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

 

http://prntscr.com/miir4w

Posted
  On 2/8/2019 at 7:17 PM, DenArt Designs said:

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 

 

Expand  

<?php

include('config.php');
$top = '10'; //Top Number

mysql_connect($host, $user, $pass);
mysql_select_db($db);

echo "    
    <div class='bar'><div class='place'>#</div><div class='player'>NAME</div><div class='count'>PVP</div></div>
    ";
$i = 1;
$sql = "SELECT char_name, pvpkills FROM characters WHERE accesslevel=0 ORDER BY pvpkills DESC LIMIT $top";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query))
{
    echo
    "
    <div class='bar'>
        <div class='place'>".$i++."</div>
        <div class='player'>".$row['char_name']."</div>
        <div class='count'>".$row['pvpkills']."</div>
    </div>    
    ";
}

echo "

    ";
?>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.



  • Posts

    • ⚔️ Balance or Power? The community decides!   During spot hunting and battles, the Destroyer (under limits) can wipe out dozens of mobs in seconds, outperforming other classes. A player on Destroyer (with three windows) can monopolize top farming spots solo, while most other classes require additional characters to compete. Result: Resources end up concentrated in the hands of a single player rather than being distributed among multiple participants.   We propose discussing possible changes: Reducing the number of targets the Destroyer can hit under limits. Balancing vampirism by implementing progressive efficiency reduction based on the number of enemies attacked. These changes would preserve the class identity while making PvE more fair for everyone.   🎯 What do you think?
    • Newcomers always raise suspicion. At first, people look at the newcomer cautiously. “Who is this? Where did they come from? Are they here to stay?” That’s just how it is trust isn’t given right away. It’s the same with services, especially when it comes to your accounts, money, and verifications. But the truth is, every major player was once that “newbie” entering the chat. VibeSMS we’re new on the forum, but definitely not new to the game: — Fast and stable SMS verification — Numbers from 68+ countries — Rentals for PayPal, Telegram, Amazon, and dozens of other services — Prices starting at $0.1 per activation or $5–8/month for rental We don’t promise mountains from the sky. We simply make sure the code arrives quickly, and you get what you paid for. No extra words or surprises. Because in the world of SMS verifications, it’s not magic that counts, but reliability consistent speed, transparent pricing, and a service you can depend on every day.
    • sell adena l2rebon signature x1 - 1kk = 1.4 dollars l2reborn x10 - 500kk = 7 dollars E-Global x Lu4 - 1kk = 4 dollars DISCORD - GODDARDSHOP TELEGRAM - MMOPROMO
    • Locked. Not following the rules.
    • Put prices on your first post. Read the rules.
  • 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 Disabled AdBlock