MySQL problem
#1

Hi yesterday I've decided to try using a mysql register system for my server and I've downloaded BReg I also downloaded wamp server and installed it, I created a database and I defined it's name here:
pawn Код:
#define mysql_database "BReg"
and I started the server, here is the server log:
Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3e-R2, ©2005-2012 SA-MP Team

[01:13:10] 
[01:13:10] Server Plugins
[01:13:10] --------------
[01:13:10]  Loading plugin: sscanf
[01:13:10] 

[01:13:10]  ===============================

[01:13:10]       sscanf plugin loaded.     

[01:13:10]    © 2009 Alex "******" Cole

[01:13:10]  ===============================

[01:13:10]   Loaded.
[01:13:10]  Loading plugin: mysql
[01:13:10] 

  > MySQL plugin R6-2 successfully loaded.

[01:13:10]   Loaded.
[01:13:10]  Loading plugin: Whirlpool
[01:13:10]  
[01:13:10]  ==================
[01:13:10]  
[01:13:10]   Whirlpool loaded
[01:13:10]  
[01:13:10]  ==================
[01:13:10]  
[01:13:10]   Loaded.
[01:13:10]  Loaded 3 plugins.

[01:13:10] 
[01:13:10] Filterscripts
[01:13:10] ---------------
[01:13:10]   Loading filterscript 'BREG.amx'...
[01:13:10]   Loaded 1 filterscripts.

[01:13:10] Loaded 3 vehicles from: vehicles/trains.txt
[01:13:10] Loaded 3 vehicles from: vehicles/pilots.txt
[01:13:10] Loaded 15 vehicles from: vehicles/lv_law.txt
[01:13:10] Loaded 39 vehicles from: vehicles/lv_airport.txt
[01:13:10] Loaded 255 vehicles from: vehicles/lv_gen.txt
[01:13:10] Loaded 38 vehicles from: vehicles/sf_law.txt
[01:13:10] Loaded 35 vehicles from: vehicles/sf_airport.txt
[01:13:10] Loaded 353 vehicles from: vehicles/sf_gen.txt
[01:13:10] Loaded 24 vehicles from: vehicles/ls_law.txt
[01:13:10] Loaded 37 vehicles from: vehicles/ls_airport.txt
[01:13:10] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt
[01:13:10] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt
[01:13:10] Loaded 71 vehicles from: vehicles/whetstone.txt
[01:13:10] Loaded 168 vehicles from: vehicles/bone.txt
[01:13:10] Loaded 61 vehicles from: vehicles/flint.txt
[01:13:10] Loaded 96 vehicles from: vehicles/tierra.txt
[01:13:10] Loaded 96 vehicles from: vehicles/red_county.txt
[01:13:10] Total vehicles from files: 1781
[01:13:10] 
---------------------------------------
[01:13:10] Running Grand Larceny - by the SA-MP team

[01:13:10] ---------------------------------------

[01:13:10] Number of vehicle models: 173
I didn't create any tables because I thought that
pawn Код:
mysql_query(
            "CREATE TABLE IF NOT EXISTS `Accounts` ("\
              "`AccID` int(10) NOT NULL AUTO_INCREMENT,"\
              "`Username` varchar(24) NOT NULL,"\
              "`Password` varchar(64) NOT NULL,"\
              "`IP` varchar(16) NULL,"\
              "`Money` int(15) NULL,"\
              "`Score` int(15) NULL,"\
              "`Kills` int(15) NULL,"\
              "`Deaths` int(15) NULL,"\
              "PRIMARY KEY (`AccID`)"\
            ") ENGINE=InnoDB DEFAULT CHARSET=latin1;");
should do it by itself but it didn't, the fs also must print one of this 2 messages:
pawn Код:
if(mysql_ping() > -1) return print("::BReg:: MySQL connection to database succeeded!");
    else print("::BReg:: MySQL connection to database failed. Please check your database settings!");
But it didn't as you see in the server log. Do you have any ideas why it's not working ?
Reply
#2

Why are you using R6, use R7 and threaded querys.
Reply
#3

Quote:
Originally Posted by NewerthRoleplay
Посмотреть сообщение
Why are you using R6, use R7 and threaded querys.
What's the difference between the old and new one ? (and cuz it was in the archive)
Reply
#4

The new one uses threaded queries of course.
Reply
#5

You can create tables with queries, yes. But have you created your database? And by that I don't mean turning on the MySQL server.
Reply
#6

Yes, I created database:


But now I noticed that the name is with little letters could be that the problem ?
Reply
#7

Yea you could try changing either the define or the table name
Reply
#8

Quote:
Originally Posted by NewerthRoleplay
Посмотреть сообщение
Yea you could try changing either the define or the table name
I did it and I've changed the plugin with the newest one but now I have this error:
Код:
error 017: undefined symbol "mysql_query"
Reply
#9

Quote:
Originally Posted by belhot
Посмотреть сообщение
The main difference between threaded and non threaded queries is that while threaded queries run parallel to the gamemode, non threaded queries do not. What this means is that by using threaded queries, your game-mode won't sort of do a pause while executing a query since they'll run parallel to the server as I've said. But switching to R7 would involve some script re-writing.
I think he understands that now seeing as I have already said that xD
Reply
#10

Quote:
Originally Posted by belhot
Посмотреть сообщение
But switching to R7 would involve some script re-writing.
This won't be a problem I just wanted to try using a mysql system and thank you all for the help!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)