Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Cant connect to MySQL host?????

Initiate Mage
Joined
Nov 4, 2018
Messages
1
Reaction score
0
MySQL Engine - CMS:
MySQL could not connect to host

Config.php file:


This is really weird, all details are the same as when i made the mysql server: i also checked other posts and installed mysql connector, updated php version etc, and it didnt work..


any help will be appreciated :)


<?php
if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }
error_reporting(0);
$_CONFIG['mysql']['connection_type'] = 'pconnect'; //Type of connection: It must be connect, or pconnect: if you want a persistent connection.


$_CONFIG['mysql']['hostname'] = '127.0.0.1'; //MySQL host - localhost, Hamachi IP, VPS or Dedi's IP


$_CONFIG['mysql']['username'] = 'root'; //Phpmyadmin username


$_CONFIG['mysql']['password'] = 'root123'; //Phpmyadmin password


$_CONFIG['mysql']['database'] = 'plus'; //Phpmyadmin database name


$_CONFIG['mysql']['port'] = '3306'; //MySQL's port


/*
*
* Hotel management - All URLs do not end with an "/"
*
*/


$_CONFIG['hotel']['server_ip'] = '35.204.222.108'; //35.204.222.108, Hamachi IP, VPS or Dedi's IP


$_CONFIG['hotel']['url'] = 'http://35.204.222.108'; //URL to your hotel, does not end with a "/"


$_CONFIG['hotel']['name'] = 'Habfo'; // Your Hotel's Name


$_CONFIG['hotel']['desc'] = 'En rar plass med fantastiske mennesker!'; //Hotel's description


$_CONFIG['hotel']['email'] = 'haboxhotell@gmail.com'; //Email for users to submit help requests to


$_CONFIG['hotel']['in_maint'] = false; //false for no maintenance mode & true for maintenance mode


$_CONFIG['hotel']['motto'] = 'Velkommen til Habfo'; //Starting motto for new users


$_CONFIG['hotel']['vip'] = 'VIP-Poeng'; //something


$_CONFIG['hotel']['minimail'] = 'Staff'; //something


$_CONFIG['hotel']['mynter'] = 'Mynter'; //something


$_CONFIG['hotel']['pixler'] = 'Duckets'; //something


$_CONFIG['hotel']['imager'] = $_CONFIG['hotel']['url'].'/avatar.php?figure='; //something


$_CONFIG['hotel']['badge'] = 'http://35.204.222.108/game/c_images/album1584'; //something


$_CONFIG['hotel']['online'] = 'Brukere Online'; //something


$_CONFIG['hotel']['credits'] = 50000; //How many coins new users get


$_CONFIG['hotel']['pixels'] = 15000; //How many pixels new users get


$_CONFIG['hotel']['figure'] = 'lg-285-89.sh-290-1408.hr-3163-31.ch-210-106.hd-190-1'; //Default figure users will register with.


$_CONFIG['hotel']['web_build'] = '63_1dc60c6d6ea6e089c6893ab4e0541ee0/2769'; //Web_Build


$_CONFIG['hotel']['external_vars'] = 'http://35.204.222.108/swf/external_variables.txt'; //External Vars [Don't edit]


$_CONFIG['hotel']['external_texts'] = 'http://35.204.222.108/swf/external_flash_texts.txt'; //External Flash Texts [Don't edit]


$_CONFIG['hotel']['product_data'] = 'http://35.204.222.108/swf/productdata.txt'; //Product Data [Don't edit]


$_CONFIG['hotel']['furni_data'] = 'http://35.204.222.108/swf/furnidata.txt'; //Furni Data [Don't edit]


$_CONFIG['hotel']['swf_folder'] = 'http://35.204.222.108/swf/'; //SWF Folder [Don't edit]


/*
*
* Templating management - Pick one of our default styles or make yours by following our examples!
*
*/


#RevCMS has 2 default styles, 'Mango' by dannyy94 and 'Priv' by joopie - Others styles are to come, such as RastaLulz's ProCMS style and Nominal's PhoenixCMS 4.0 style.


$_CONFIG['template']['style'] = 'habbo';


/*
*
* Other topsites.. thing
*
*/


$_CONFIG['thehabbos']['username'] = 'Kryptos';
$_CONFIG['retro_top']['user'] = 'Kryptos';


/*
*
* Recaptcha management - Fill the information below if you have one, else leave it like that and don't worry, be happy.
*
*/


$_CONFIG['recaptcha']['priv_key'] = '6LcZ58USAAAAABSV5px9XZlzvIPaBOGA6rQP2G43';
$_CONFIG['recaptcha']['pub_key'] = '6LcZ58USAAAAAAQ6kquItHl4JuTBWs-5cSKzh6DD';




/*
*
* Social Networking stuff
*
*/


$_CONFIG['social']['twitter'] = 'TwitterAccount'; //Hotel's Twitter account


$_CONFIG['social']['facebook'] = 'FacebookAccount'; //Hotel's Facebook account


?>
 
Banned
Banned
Joined
Oct 8, 2018
Messages
90
Reaction score
4
You'll probably have to grant 'localhost' privileges to on the table to the user. See the 'GRANT' syntax documentation. Here's an example (from some C source).

"GRANT ALL PRIVILEGES ON %s.* TO '%s'@'localhost' IDENTIFIED BY '%s'";

That's the most common access problem with MySQL.

Other than that, you might check that the user you have defined to create your instance has full privileges, else the user cannot grant privileges.

Also, make sure the mysql service is started.

Make sure you don't have a third party firewall or Internet security service turned on.

Beyond that, there's several pages of the MySQL forum devoted to this:

Try reading that.
 
Upvote 0
Joined
Sep 15, 2010
Messages
519
Reaction score
88
It may seem weird but try using localhost as ip instead of 127.0.0.1. If that doesnt work go into your mysql instance config and enable root access(this allows a vps or a remote computer to connect to your mysql server if they know your login and IP. But this has fixed for others so maybe for you.
 
Upvote 0
Back
Top