SA-MP Forums Archive
MySQL Table - 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: MySQL Table (/showthread.php?tid=391966)



MySQL Table - JaKe Elite - 12.11.2012

I follow the tutorial on SA-MP wiki how to set up mysql i follow everything..
Except the scripting part, The only thing i follow in the tutorial is how to set up table.

I create a table name "user", after that i follow Killer's MySQL tutorial the script works
the register dialog show up, The problem is.. player account is not getting created in the table..

How to make it work?

pawn Code:
#define mysql_host "localhost"
#define mysql_user "root"
#define mysql_password ""
#define mysql_database "user"



Re: MySQL Table - Johnson_boy - 12.11.2012

There are many places where you could have gone wrong.

Here are a couple possible issues:
- Your MySQL credentials could be wrong (host/user/password)
- Your database might not exist
- MySQL user does not have permissions to access/modify the data
- There is an error with your query

If I was you I would start by checking MySQL debug file for possible connection/query errors.

If you cannot see mysql_log.txt, make sure MySQL debugging is enabled (probably mysql_debug(true)


Re: MySQL Table - JaKe Elite - 13.11.2012

Find the error here it is

pawn Code:
[00:57:34] CMySQLHandler::Connect() - Unknown database 'user' (Error ID: 1049)
But i've created a table, i go to localhost/phpMyAdmin, then click mysql then click "Create Table"
What i've done?, Did i create table wrong?


Re: MySQL Table - Michael@Belgium - 13.11.2012

Quote:
Originally Posted by Romel
View Post
Find the error here it is

pawn Code:
[00:57:34] CMySQLHandler::Connect() - Unknown database 'user' (Error ID: 1049)
But i've created a table, i go to localhost/phpMyAdmin, then click mysql then click "Create Table"
What i've done?, Did i create table wrong?
Then the database is "mysql" and not "user"


Re: MySQL Table - JaKe Elite - 13.11.2012

Let me try..


Re: MySQL Table - JaKe Elite - 13.11.2012

Never mind found it!