mysql error.
#1

When i launch my server i get warning in mysql log:

Код:
Failed to connect. Can't connect to MySQL server on 'localhost' (10061)
I download new samp server. Then i download this mysql plugin:

Код:
libmysql.dll into my server directory
Код:
a_mysql.inc into my pawno/include
Код:
mysql.dll into my plugins folder
Then i open lvdm gm and:

Код:
#define MySQL_HOST "localhost"
#define MySQL_USER "root"
#define MySQL_DATA "database"
#define MySQL_PASS ""
I add this at the top of my gm.

Under OnGameModeInit

Код:
mysql_connect(MySQL_HOST,MySQL_USER,MySQL_DATA,MySQL_PASS);
I use Xampp control to run mysql,apache services. I run them,but still my server don't run every time... that stupid warning.

I think i bad run that services, then i go to localhost/phpmyadmin

but all works fine.
Reply
#2

Are u sure all services are running.

Try localhoSt or 127.0.0.1 on Web browser to check Localhost is working
Reply
#3

localhost is work fine thats why i don't understand why i get this warning...
Reply
#4

Are u sure there is database with name database ?
Reply
#5

yes.
Reply
#6

Which version are you trying to use? if R7 you'll need to have a threaded script for that. So try R6 (Not sure if thats the problem anyway)

Next thing you need to check is if you have some program running at that port. Usually Mysql runs on port 80 and skype blocks it. (R7 uses port 3306)

EDIT: Also before changing to R6 try
pawn Код:
mysql_connect(MySQL_HOST,MySQL_USER,MySQL_DATA,MySQL_PASS,80);
But I still recommend you to change to R6
Reply
#7

well i get the error with R7, change it to R6 and try (the include).
Reply
#8

i had r6 and all worked well. But after some time i try run server and here! that stupid error... I think need change version and i changed it to r7 but the same problem is.
Reply
#9

Now i remember i work with web and i downloaded WampServer. Maybe here is problem?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)