MySQL Issue
#1

I made a pawno script of connecting to my sql server at my ip xx.xxx.xxx like this:
pawn Код:
mysql_init();
mysql_connect("IP","User","Pass","SQLDB");
I run it from my PC, but it says access denied from user@MyIP :S
Reply
#2

Help Wanted, Assistance Wanted. <3
Reply
#3

pawn Код:
// somewhere ontop of your script, under the includes.
#define MyHOST "localhost" // you said it runs on your PC so keep it like this
#define MyUSER "root" // change it if you have a user account for mysql; if you don't understand it leave it like this
#define MyPASS "" // password change it if you have one; if you don't understand leave it like this
#define MyDB "SQLDB" // change this if your database name is different, from what you have provided

// under OnGameModeInit
mysql_init();
mysql_connect(MyHOST, MyUSER , MyPASS, MyDB );
Also judging from the code, I guess you use strickenkids plugin. I strongly advice to use the plugin from G'Stylezz, as I experienced server crashes with strickenkids.

(the error means that you are not authorized to acces the mySQL database, this can either be caused by providing the wrong username and or password in the Pawn script. Or because you specified the wrong database).
Reply
#4

No, I run the server.exe from my PC, but the SQL is on my website you see.hence the IP
Reply
#5

Did you create a user and set him so his hostname can be anything ?
Reply
#6

user for my cpanel is jminixah, directory is home/jminixah/ But the user for my Database is Rayyan.
Reply
#7

Help Please?!
Reply
#8

I run the beta pawn script from my PC with IP my.ip.PC , My Script connects to the MySQL Server (same as my website) which is at the IP my.ip.Serv.On my Server.exe which is running from my PC, it says acces denied for jminixah@my.ip.PC.

Please Help, I dont have a host atm and i cant pay since no cash.
Reply
#9

pawn Код:
// somewhere ontop of your script, under the includes.
#define MyHOST "ip" // Server IP
#define MyUSER "root" // change it to a user account for mysql
#define MyPASS "" // Password
#define MyDB "SQLDB" // Database name

// under OnGameModeInit
mysql_init();
mysql_connect(MyHOST, MyUSER , MyPASS, MyDB );
Also, alot of websites block incoming and outgoing MySQL traffic outwith it's own system.
Reply
#10

in cPanelX where it says Database (Add User), i added a user called Rayyan and password MyPass, I enter that info there?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)