UCP Mysql connection problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: UCP Mysql connection problem (
/showthread.php?tid=580227)
UCP Mysql connection problem -
SWAT4 - 03.07.2015
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?
Re: UCP Mysql connection problem -
SWAT4 - 03.07.2015
still needed plz
Re: UCP Mysql connection problem -
sirvanec - 03.07.2015
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:
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;
}
|
Re: UCP Mysql connection problem -
rymax99 - 03.07.2015
This isn't a forum for PHP scripting help.
Re: UCP Mysql connection problem -
SWAT4 - 03.07.2015
but UCP Is stick with the gamemode wich is pawno

anyone?
Re: UCP Mysql connection problem -
rymax99 - 03.07.2015
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.
Re: UCP Mysql connection problem -
SWAT4 - 03.07.2015
if you don't wanna help, just don't reply, let the others help if they can .. pfff