MySQL errors
#1

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.
Reply
#2

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.
Reply
#3

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

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

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

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 ) ?
Reply
#6

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
Reply
#7

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.... ?
Reply
#8

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?
Reply
#9

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 ?
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)