SA-MP Forums Archive
MySQL errors - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MySQL errors (/showthread.php?tid=93275)



MySQL errors - Blackest - 24.08.2009

When trying to run my server i get those errors:
Error in mysql_query: MySQL server has gone away.
Error in mysql_store_result: MySQL server has gone away.


Re: MySQL errors - MenaceX^ - 24.08.2009

Quote:
Originally Posted by Blackest
When trying to run my server i get those errors:
Error in mysql_query: MySQL server has gone away.
Error in mysql_store_result: MySQL server has gone away.
I think it says everything.. The mysql has gone away = not connected.


Re: MySQL errors - Blackest - 24.08.2009

And what can i do to connect it ? I dont know much about scripting and mySQL.


Re: MySQL errors - Think - 24.08.2009

mysql_connect("localhost", "root", "root");
mysql_select_db("database");

Fill in with your own info @ main() or ongamemodeinit


Re: MySQL errors - Blackest - 24.08.2009

Okay i got it, but now when i try to run my server it just says ''MySQL: Trying to connect to the server'', and stays like that. I think the problem is the MYSQL_HOST, what should go under it ( my database is in phpmyadmin ) ?


Re: MySQL errors - MenaceX^ - 24.08.2009

Quote:
Originally Posted by Blackest
Okay i got it, but now when i try to run my server it just says ''MySQL: Trying to connect to the server'', and stays like that. I think the problem is the MYSQL_HOST, what should go under it ( my database is in phpmyadmin ) ?
yea


Re: MySQL errors - Blackest - 24.08.2009

Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by Blackest
Okay i got it, but now when i try to run my server it just says ''MySQL: Trying to connect to the server'', and stays like that. I think the problem is the MYSQL_HOST, what should go under it ( my database is in phpmyadmin ) ?
yea
Yea.... ?


Re: MySQL errors - Andom - 24.08.2009

Quote:
Originally Posted by Blackest
Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by Blackest
Okay i got it, but now when i try to run my server it just says ''MySQL: Trying to connect to the server'', and stays like that. I think the problem is the MYSQL_HOST, what should go under it ( my database is in phpmyadmin ) ?
yea
Yea.... ?
Yeah that's the problem.

Do you even have MySQL with username, password, and tables created?


Re: MySQL errors - Blackest - 24.08.2009

Yes i do, i bought a server with MySQL included, althought about the tables... No idea. Or do you mean the ''player'' ''ban'' ''login'' stuff ?
But what do i have to put under #define MYSQL_HOST '' '' in the script ?


Re: MySQL errors - MenaceX^ - 24.08.2009

Quote:
Originally Posted by Blackest
Yes i do, i bought a server with MySQL included, althought about the tables... No idea. Or do you mean the ''player'' ''ban'' ''login'' stuff ?
But what do i have to put under #define MYSQL_HOST '' '' in the script ?
It's just a define.. You don't have to fill it.. Just put the mysql info there.