MySQL table not creating
#1

Код:
new MySQLOpt: option_id = mysql_init_options();
	mysql_set_option(option_id, AUTO_RECONNECT, true);
	Database = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS, SQL_DB, option_id);
    if(!Database)
    {
        print("[MYSQL]: Failed to connect with using Following Informations: ");
        printf(" Host: %s | User: %s | Password: ****** | Database: %s", SQL_HOST, SQL_USER, SQL_DB);

	}
    else
    {
        printf("[MYSQL]: Connection Success to database: %s !", SQL_DB);
        mysql_tquery(Database, "CREATE TABLE IF NOT EXISTS `USERS` (`ID` int(11) NOT NULL AUTO_INCREMENT,`USERNAME` varchar(24) NOT NULL,`PASSWORD` char(65) NOT NULL,`SALT` char(11) NOT NULL,`SCORE` mediumint(7), `KILLS` mediumint(7), `CASH` mediumint(7) NOT NULL DEFAULT '0',`DEATHS` mediumint(7) NOT NULL DEFAULT '0', PRIMARY KEY (`ID`), UNIQUE KEY `USERNAME` (`USERNAME`))");
    }
Error:
Код:
[15:33:47] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #1045 'Access denied for user 'delceaga_sad'@'82.76.171.22' (using password: YES)'
I don't understand why it shows this IP "82.76.171.22" if I have another IP in gamemode..
Reply
#2

It's the host IP, You should give the access to account 'delceaga_sad' to be able to create tables and stuff.
https://dev.mysql.com/doc/refman/5.7/en/grant.html
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)