Ok, so right to it.
int CSQLDB::Init(const char *host, const char *user, const char *passwd, const char *db)
{
//Init mySQL
mySQL = mysql_init(mySQL);
my_bool rec = 1;
mysql_options(mySQL, MYSQL_OPT_RECONNECT, &rec);
if(!mysql_real_connect(mySQL, host, user, passwd, db, 3306, NULL, NULL))
{
printf("(!!!) mySql connection rejected!\n");
mysql_close(mySQL);
return 0;
}
failed = false;
//printf("mySQL connected successfully.\n");
return 1;
}
This is the code that is attempting to connect to my MySQl with the values I provide after editing a .bat file with this code:
Spitfire.exe 0.0.0.0 127.0.0.1 root mykel
Syntax is "Spitfire.exe bindip mysqlip mysqluser mysqlpass"
but for some reason I continue to get same error:
(!!!) mySql connection rejected!
If anyone cane help, that'll be great. Also, just to mention, when I have Skype up or Apache(XAMPP) it gives me a different error which is "Port 443 is already in use", though I don't see anything mentioning port 443 anywhere. Here's the full code just in case:
//
// SQLDB.cpp
// Project Spitfire
//
// Copyright (c) 2013 Daizee (rensiadz at gmail dot com)
//
// This file is part of Spitfire.
//
// Spitfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Spitfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the …