Jump to content
  • 0

[HELP] Connection to DB


Question

Posted

Hello i want help :(

 

I have problem with connect to my DB.

 

Normally i use localhost (in navicat) and work perfect...

 

I want make ex. TOP 10 - pk/pvp. I have web with script in other hosting than my PC. If i put my IP to navi i can't connect (2003 -  Can't connect to MySQL server on 'xx.xxx.xxx.xx" (10060).

 

How i can make it? How i can connect my pc with web ;p

9 answers to this question

Recommended Posts

  • 0
Posted

Men I can't change "localhost" to my "external ip" -> bcoz if i connect by localhost it can't be handled with website outside...

 

Can u tell me where i can find it in navi?

That cfg where i can set connection from outside...

 

Ty for answer ;)

  • 0
Posted

2 Options

 

1) As your web provider or server hoster (or if you have root access) to allow remote access to your database (Not recommended)

 

2) Create a script on the same server as the SQL database that will listen for HTTP requests. With the script read the database for the relevant information and return it to the person calling the script via json/xml. (recommended).

 

Option 2 will ensure read only access to your database as well from outside sources.

  • 0
Posted

2 Options

 

1) As your web provider or server hoster (or if you have root access) to allow remote access to your database (Not recommended)

 

2) Create a script on the same server as the SQL database that will listen for HTTP requests. With the script read the database for the relevant information and return it to the person calling the script via json/xml. (recommended).

 

Option 2 will ensure read only access to your database as well from outside sources.

 

Bullsh1ts...

 

Men I can't change "localhost" to my "external ip" -> bcoz if i connect by localhost it can't be handled with website outside...

 

Can u tell me where i can find it in navi?

That cfg where i can set connection from outside...

 

Ty for answer ;)

 

You can config it in "MySQL Server Instance Config Wizard" wich is in your mysql folder, just run it...

  • 0
Posted

That's what I said with option number 1. Just replace the web provider with him.

 

Also, option 2 not allowing remote access to your database:

http://www.greensql.com/articles/mysql-security-best-practices

2. Disable or restrict remote access

 

 

  • 0
Posted

That's what I said with option number 1. Just replace the web provider with him.

 

Also, option 2 not allowing remote access to your database:

http://www.greensql.com/articles/mysql-security-best-practices

 

 

Why do you think i spend time to read all your post... i've just read the begin wich was bullsh1ts :D

  • 0
Posted

Why do you think i spend time to read all your post... i've just read the begin wich was bullsh1ts :D

 

"Why do you think I spent time to read all your post..."

 

Now you want me to believe you're a compontent developer when you stormed in here, called my idea bullshit, and then when I defend it you say "yea whatever." Good way to illustrate to everybody you really know what you're doing.

 

1) The only things that should have a direct connection to the l2j database on a production server is the gameserver and database administrators with only the permissions they need using SSL. THE DATABASE IS ESSENTIALLY YOUR GAMESERVER, IT IS THE DATA THAT DESCRIBES IT AND MOST OF IT'S BEHAVIOR.

 

2) It's not significant but you shouldn't be putting anymore strain on the gameserver processes than need already be. Java already has standard objects for doing things like HTTP GET/POST requests. It'd be less strain on your SQL server and you'd be using less connections by sending an HTTP post request to your webserver and uploading a json object containing the live gameserver data which can be updated in different intervals of your chosing rather than the standard L2j database updates. You'd have to build the json object via the gameserver but once the request is sent the gameserver database or application itself won't have to worry about it.

 

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
Answer this question...

×   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.



×
×
  • Create New...