I have 2 dedicated servers one with Cpanel and other one with plesk. I want my main server (Cpanel) to access mysql database from 2nd server (Plesk) to balance the load. I still can not figure it out how to do it. Can anyone help me please? Thanks
I followed the instructions giving at http://www.codero.com/knowledge-base/questions/72/How+can+I+configure+remote+access+for+mysql? but getting error "Lost connection to MySQL server at 'reading initial communication packet', system error: 111"
Use phpMyAdmin. Select the database. Click on Privileges. Click on Add a New User. In Host, choose either Any Host (that could be a bit of a security risk) or select Use text field, and type in the IP address of Server1.
Hi Rukbat, I really appreciate your help. I have tried that but getting the same error. I even grant permissions via SSH GRANT ALL ON foo.* TO bar@'192.168.0.1' IDENTIFIED BY 'PASSWORD'; am I entering the right info in config.php define("DB_SERVER", '192.168.0.1'); i also tried 192.168.0.1:3306 define("DB_USER",'user'); define("DB_PASS",'pass'); define("DB_NAME", 'db_name');
3306 is the default port, so that's not the problem. Are you sure that Server2 is set up to allow remote connections to the MySQL database? Are you sure your definitions are correct - the user, password and name of the database? (I know you're just showing examples, but your examples, if they were the real data, wouldn't work.)