MySQL Error.
#9

Quote:
Originally Posted by kovac
Посмотреть сообщение
As far as I know, Ultra-H's databases are named like server_142_DATABASENAME.
You need to create a new database ( I guess it's done through CP > MySQL > Create new database )

PHP код:
// At the top of your gamemode
new MySQLDatabase;
#define MYSQL_HOST "127.0.0.1"
#define MYSQL_USER "server_142"
#define MYSQL_PASS "PASSWORD"
#define MYSQL_DATABASE "server_142_DATABASENAME" 
PHP код:
// OnGameModeInit
new MySQLOptoption_id mysql_init_options();
    
mysql_set_option(option_idAUTO_RECONNECTtrue); // We will set that option to automatically reconnect on timeouts.
    
Database mysql_connect(MYSQL_HOSTMYSQL_USERMYSQL_PASSMYSQL_DATABASEoption_id);
    if(
Database == MYSQL_INVALID_HANDLE || mysql_errno(Database) != 0// Checking if the database connection is invalid to shutdown.
    
{
        print(
"MySQL Database: Connection to database failed!");
        
SendRconCommand("exit");
        return 
1;
    }
    else
        print(
"MySQL Database: Successfully connected."); 
Thanku Soo Much brother now my server is working fine Thanku
Reply


Messages In This Thread
MySQL Error. - by Hassyy - 03.05.2018, 18:55
Re: MySQL Error. - by Terzic - 03.05.2018, 19:10
Re: MySQL Error. - by Hassyy - 03.05.2018, 19:15
Re: MySQL Error. - by kovac - 03.05.2018, 20:03
Re: MySQL Error. - by ItsRobinson - 03.05.2018, 20:20
Re: MySQL Error. - by Hassyy - 04.05.2018, 02:28
Re: MySQL Error. - by Hassyy - 04.05.2018, 08:15
Re: MySQL Error. - by kovac - 04.05.2018, 10:27
Re: MySQL Error. - by Hassyy - 04.05.2018, 11:49

Forum Jump:


Users browsing this thread: 3 Guest(s)