UCP Mysql connection problem
#1

Quote:
Originally Posted by SWAT4
Посмотреть сообщение
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /home/u829025349/public_html/ucp/config.php on line 3 I can't connect to the server!


Код:
$connect = mysql_connect("localhost", "root", "") or die("I can't connect to the server!");
u may wonder why my pass is empty, and thats cuz i'm using Xampp and it dosen't Have a pass in default ... any solution?
Any help please?
Reply
#2

still needed plz
Reply
#3

try this one..

Quote:

#define SQL_HOST "217.198.141.48"// 127.0.0.1
#define SQL_USER "localhost"// Mysql
#define SQL_PASS "root"//Pass
#define SQL_DB ""//dbname

Ongamemodeinit:
Quote:

ConnectMySQL();

Somewhere in gm:
Quote:

forward ConnectMySQL();
public ConnectMySQL()
{
mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);

if(mysql_ping() == 1)
{
mysql_debug(0);// SQL Log - 0: Off / 1: On
printf("Connected to MySQL");
}
else
{
printf("Error: Cannot connect to MySQL");
SendRconCommand("exit");
return 0;
}
return 1;
}

Reply
#4

This isn't a forum for PHP scripting help.
Reply
#5

but UCP Is stick with the gamemode wich is pawno anyone?
Reply
#6

Quote:
Originally Posted by SWAT4
Посмотреть сообщение
but UCP Is stick with the gamemode wich is pawno anyone?
No, the gamemode saves data with MySQL - a whole another language, thus the 'SQL' in 'MySQL' -- Structured Query Language. Not anything to do with PAWN.
Reply
#7

if you don't wanna help, just don't reply, let the others help if they can .. pfff
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)