Hey ihr,
Mein StrickenKid-Plugin verbindet nicht zu der Datenbank
Erst mal Code: #include <a_samp>
#include <mysql>
#include <script_fixes>
#define MYSQL_HOST "localhost"
#define MYSQL_USER "root"
#define MYSQL_PASS ""
#define MYSQL_DATABASE "samp"
new MySQL:database;
new bool:connected = false;
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnGameModeInit()
{
database = mysql_init(LOG_ALL); // TODO: Bei Bedarf ändern
if(mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DATABASE, database, 1))
connected = true;
else
connected = false;
return 1;
}
MySQL-Log:
[Thu Aug 01 01:14:52 2013] -------------------------
[Thu Aug 01 01:14:52 2013] Logging Started
[Thu Aug 01 01:14:52 2013] -------------------------
[Thu Aug 01 01:14:52 2013] Function: mysql_init executed with result: "0".
[Thu Aug 01 01:14:52 2013] Error (0): Failed to connect. Access denied for user 'root'@'localhost' (using password: YES).
Und server.log:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3x, (C)2005-2013 SA-MP Team
[01:14:52] filterscripts = "" (string)
[01:14:52]
[01:14:52] Server Plugins
[01:14:52] --------------
[01:14:52] Loading plugin: mysql
[01:14:52] SA:MP MySQL Plugin v2.1.1 Loaded.
[01:14:52] Loaded.
[01:14:52] Loaded 1 plugins.
[01:14:52] [MySQL] Thread running. Threadsafe: Yes.
[01:14:52]
[01:14:52] Filterscripts
[01:14:52] ---------------
[01:14:52] Loaded 0 filterscripts.
[01:14:52] [MySQL] Error (0): Failed to connect. Access denied for user 'root'@'localhost' (using password: YES).
[01:14:52]
----------------------------------
[01:14:52] Blank Gamemode by your name here
[01:14:52] ----------------------------------
[01:14:52] Number of vehicle models: 0
Alles anzeigen
Die Fehlermeldung lässt einen Vermuten, dass der Login falsch ist... Ist er jedoch nicht, denn...
I:\xampp\mysql\bin>mysql -h localhost -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3635
Server version: 5.5.32 MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Alles anzeigen
Der Login stimmt also...
Plugin: StrickenKids
Version: Neueste ( vor nicht mal 12 Stunden gezogen )
OS: Win 7 Ultimate x64
Admin: Funktioniert mit und ohne nicht
MySQL-Server: 5.5.32
MySQL-Protokoll-Version: 10
.NET-Framework: Sowohl 3.0, 4.0 als auch 4.5 installiert
Währe cool, wenn jemand helfen kann