Help please with MySQL! - 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: Help please with MySQL! (
/showthread.php?tid=659389)
Help please with MySQL! -
D1am0nd - 02.10.2018
Hi! I want to test out the gamemode on a hosted server, but I'm having a problem logging in. When I type the password and hit enter - nothing happens.
I checked the logs and got this:
Код:
[Tue Oct 2 01:09:53 2018] Logging Started
[Tue Oct 2 01:09:53 2018] -------------------------
[Tue Oct 2 01:09:53 2018] Function: mysql_init executed with result: "0".
[Tue Oct 2 01:09:53 2018] Error (0): Failed to connect. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:36 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:36 2018] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:36 2018] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:36 2018] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:36 2018] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:36 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:36 2018] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:36 2018] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:36 2018] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:36 2018] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:40 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:40 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:40 2018] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:40 2018] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:44 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:44 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:44 2018] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:44 2018] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:44 2018] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:47 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:47 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:47 2018] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:47 2018] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:47 2018] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:47 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:47 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:47 2018] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:47 2018] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:47 2018] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:49 2018] Error (0): Function: mysql_real_escape_string called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
[Tue Oct 2 01:10:49 2018] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'sampfamous'@'localhost' (using password: YES).
I'm using Linux plugin 2.1.1. with the mysql.inc v2.1 by Strickenkid.
And this is what gamemode uses for mysql connect:
PHP код:
#if defined TEST_OFF
#define SQL_HOST "127.0.0.1"
#define SQL_USER "sampfamous"
#define SQL_DB "zsampfamous7"
#define SQL_PASS "check"
#endif
Under GameModeInIt
PHP код:
#if defined TEST_OFF
connectionReal = mysql_init(LOG_ALL, 1);
mysql_connect(SQL_HOST, SQL_USER, SQL_PASS, SQL_DB, connectionReal, 1);
SetTimer("ConnectMySQLTables",2000,0);
Please help me to solve this! Thanks in advance.
Re: Help please with MySQL! -
Shockey HD - 02.10.2018
Read the log, MySQL cannot connect to the database. Ensure that the account sampfamous in PhPMyAdmin exist and has the proper permissions.