Jump to content

Problema Conectare Sql Platforma Rezervare Nume Cs 1.6


Marcel Marc

Recommended Posts

Salut PCT, am si eu o problema cu o platforma de rezervare nume pentru serverele de CS, problema apare la partea de conexiune:

 

Am modificat admin.sma aici

// Uncomment for SQL version
#define USING_SQL

#include
#include
#if defined USING_SQL
#include
#endif

//new Vector:AdminList;

new AdminCount;

new PLUGINNAME[] = "AMX Mod X"

#define ADMIN_LOOKUP (1<<0)
#define ADMIN_NORMAL (1<<1)
#define ADMIN_STEAM (1<<2)
#define ADMIN_IPADDR (1<<3)
#define ADMIN_NAME (1<<4)

new g_cmdLoopback[16]
new bool:g_CaseSensitiveName[33];

// pcvars
new amx_mode;
new amx_password_field;
new amx_default_access;

public plugin_init()
{
#if defined USING_SQL
register_plugin("Admin Base (SQL)", AMXX_VERSION_STR, "AMXX Dev Team")
#else
register_plugin("Admin Base", AMXX_VERSION_STR, "AMXX Dev Team")
#endif
register_dictionary("admin.txt")
register_dictionary("common.txt")
amx_mode=register_cvar("amx_mode", "1")
amx_password_field=register_cvar("amx_password_field", "_pw")
amx_default_access=register_cvar("amx_default_access", "")

register_cvar("amx_vote_ratio", "0.02")
register_cvar("amx_vote_time", "10")
register_cvar("amx_vote_answers", "1")
register_cvar("amx_vote_delay", "60")
register_cvar("amx_last_voting", "0")
register_cvar("amx_show_activity", "2")
register_cvar("amx_votekick_ratio", "0.40")
register_cvar("amx_voteban_ratio", "0.40")
register_cvar("amx_votemap_ratio", "0.40")

set_cvar_float("amx_last_voting", 0.0)

#if defined USING_SQL
register_srvcmd("amx_sqladmins", "adminSql")
register_cvar("amx_sql_table", "admin_cs")
#endif
register_cvar("amx_sql_host", "188.212.106.237")
register_cvar("amx_sql_user", "fzonero_reznick")
register_cvar("amx_sql_pass", "parola")
register_cvar("amx_sql_db", "fzonero_reznick")
register_cvar("amx_sql_type", "mysql")

 

si l-am compilat admin_sql.amxx , am modificat si sql.cfg astfel:

amx_sql_host "188.212.106.237"
amx_sql_user "fzonero_reznick"
amx_sql_pass "parola"
amx_sql_db "fzonero_reznick"
amx_sql_table "admin_cs"
amx_sql_type "mysql"
amx_sql_timeout "60"

 

Am dat restart la server si imi apare asta in consola:

[AMXX] SQ error: can't connect: 'Access denied for user 'fzonero_reznick'@'gcp06.toolz.ro' (using password: YES)'
[AMXX] Loaded 14 admins from file

 

Nu fac ceva bine? Help me plz :)

Link to comment
Share on other sites

  • Moderators

Esti sigur ca datele setate pentru SQL is bine setate? Adica ca baza aia de date si tabla exista si e totu ok.

PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Link to comment
Share on other sites

  • Moderators

Ai acces la webhost si sa urci un fisier php de proba? Daca da, uploadeaza urmatoru fisieru in public_html sub numele test_conexiune.php si cu continutu:

<?php
$servername = "localhost";
$username = "username";
$password = "password";

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

Schimba primele trei variabile cu datele de conexiune la baza de date si posteaza aici ce primesti.

PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.