Problem with Website Stats for players

IvertizPL

Member
Hello I and my friend tried to create a website with Player Stats, but we have problem with connection to Database

Hosting: Nitrado.net
Error:

Code:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'ms492.nitrado.net' (111) in /home/ngpepoch/public_html/connect.php on line 8
Can't connect to MySQL server on 'ms492.nitrado.net' (111)

(The code is my friend, not my)

(My friend try with port and without port)

Code:
[LIST=1]
[*]<?php
[*]$host = 'ms492.nitrado.net';
[*]$user = 'ni382305_3_epoch';
[*]$pass = 'xxxx';
[*]$name = 'ni382305_3_epoch';
[*]$port = '3306';
[*]

[*]$link = mysql_connect($host, $user, $pass) or die(mysql_error());
[*]mysql_select_db($name, $link) or die('Nie znaleziono bazy danych o takiej nazwie.');
[*]mysql_query("SET NAMES 'utf8'");
[*]

[*]function vtxt($var)
[*]{
[*]       return trim(mysql_real_escape_string(strip_tags($var)));
[*]}
[*]

[*]function row($sql)
[*]{
[*]       return @mysql_fetch_assoc(mysql_query($sql));
[*]}
[*]

[*]?>
[/LIST]

I have checked Zugriff von externen Netz erlauben on the hosting what means Allow access from external network

Someone had a problem like this? I wait for answer. Greetings ;)
 
I put in your information and you can see it has connected and is asking for my password so verified server host and is accessible
ghD9J0N.png


In all my db connection scripts I use the mysqli commands.
$db=mysqli_connect("hive.hfbservers.com","user-4030","yhp6RIXM","user-4030");

I would change them all to mysqli equivilent commands
 
Hello, it's doesn't work for us, my friend say he need change something in php.ini "The mysqli extension is not enabled by default, so the php_mysqli.dll DLL must be enabled inside of php.ini." But on my server hosting i don't have access to php.ini file. I can create one?
 
Sorry for late answer, I think my problem is I don't have permission to connect Database.

Code:
Connect Error (1045)

Access denied for user 'xxxx-----xxxx'@'localhost' (using password: YES)

I don't how can I connect with my Database using php ;)
 
you have to use the userid and password that has permission to connect remotely. that error says your userid@localhost which grants you permission to connect locally only ..
google adding user permissions to mysql database
 
Sorry but I never work with MySQL so I don't know how can I do this. I have access to the phpmyadmin on the hosting website. And what I need to do ? :p When I use something like that:

Code:
#1227 - Access denied; you need the CREATE USER privilege for this operation

Again sorry for a lot of questions but I really want to do this but I don't know how ;) Thanks for you time ;)
 
Depending on the permissions your host has granted you on your database, you MIGHT not have permissions to actually create a new user and grant them permissions on your database. But I did this using phpmyadmin where it shows the % is allowing connection from any host (meaning IP). You can also enter sql code directly but here are a few links
http://supportcenter.verio.com/KB/questions.php?questionid=494
https://support.eapps.com/index.php?/Knowledgebase/Article/View/406/53/mysql-and-phpmyadmin


 
one of the links i posted had the actual sql,code. click on the sql and try to execute that. or,simply ask your host if,you can access the db remotely.

and when they say no, then you say ok, thanks i will switch to a windows vps for $12 a month that lets me,do what i need
 
i actually have a windows vps for $8 a month ... but i was referring to vilayers 9 euro server which is about $12-$15 and will easily run a full server.
i also have the vilayer 19 euro($25) windows vps which can run a few simultaneous servers

i have run a dayz server and an arma3 server with low populations (less than 10 players each) simultaneously on my $48/year linux vps with no problems

dayz server requirements are much lower than you would think, the main probkem with a linux vps is that you are allowed to overuse the system resources and it will impact the other servers on the node. the windows vps actually allocates a specific amount to your server so you always have X amount available which means other servers on the node will not impact your server

people overspend money on servers that will support 50 players when they only need a server to support 10 players an then they give it up because they are spending more than they can justify. my theory is spend little and migrate to a new server if it becomes needed

i was trying to GIVE away servers for free because i have them on yearly rates where they are very cheap and i hate to lose the discounted rates. i have 2 windows vps, 4 linux vps and 1 dedicated server ..... all empty and unused as i have no time for running game servers ... but CHEAP. I dont know if i have ever even installed anything on the dedicated server:eek:
 
Last edited:
Back
Top