Portal Home > Knowledgebase > Articles Database > Failed To Connect To Database


Failed To Connect To Database




Posted by Send Media, 05-04-2011, 11:12 AM
Hi Guys, I have 2 VPS, one has cPanel/WHM installed which is where my script is at. The other VPS has DirectAdmin installed which is where my SQL database is held. I have setup everything and placed the IP of the DirectAdmin VPS and entered the correct login information for the cPanel VPS to login to the MySQL Database on the DirectAdmin VPS. How ever i keep getting this error: What tests can i do in SSH to see if the cPanel VPS can connect and login to the MySQL Database that way and if not how do i find out why its not allowing access? I can ping the DirectAdmin VPS in SSH when connected to the cPanel VPS. The reason i am having the MySQL database on the DirectAdmin VPS is because thats all the VPS will be used for (SQL Server and because DirectAdmin doesnt use as much resources compared to cPanel/WHM). Any help would be great. Thanks

Posted by foobic, 05-05-2011, 05:28 AM
Did you enable remote access to the database, on the DA server? By default only local database access is allowed. You'll also need port 3306 open in the firewall. should get you some garbled text with "MySQL versionnumber" somewhere near the beginning. should prompt you for the password and then connect. Up to you, but DA's resource usage is much the same as cPanel's and both are heavily dependent on your exact configuration. For a database-only server I'd just use a bare distro eg. CentOS or Debian, depending on your preference. Without all the other standard apps (Apache, BIND, exim, spamassassin etc.) you'd save a lot of memory compared to a standard install of either DA or cPanel.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
.EML or not? (Views: 509)
Problems at Alabanza? (Views: 500)