can't connect to mysql database on godaddy server

AHMED SAMY used Ask the Experts™
can't connect to mysql database on godaddy server may be mistake in syntax or understanding environment please help ,and you should know that localhost on pc work good with (appserv 8.6.0) nearby
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Tomas Helgi JohannssonDatabase Administrator / Software Engineer

Post the error you get when connecting.

    Tomas Helgi
nociSoftware Engineer
Distinguished Expert 2018

You mean from a godaddy server to godaddy mysql or from your home server to godaddy?...
for the latter you may need to first create a tunnel to the godaddy system, of installer pphpmysql on your server.

The first case seems unlikely.
David FavorLinux/LXD/WordPress/Hosting Savant
Distinguished Expert 2018

As noci said, your original question seems to indicate you're running a local database instance.

If this is true, best move your database to GoDaddy first, if that's where your site will be running.
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Fixer of Problems
Most Valuable Expert 2014
Godaddy lets you set up MYSQL databases either with external access or only localhost.  The default is localhost and you can only access those from code on your web server, not from home.
Distinguished Expert 2017

Adding to Dave's comment or possibly through the admin portal, phpmyadmin interface.


peace be upon you and mercy


i think code was wrong i changed it it works but now i have two problems:

         1- language arabic not right i make it utf8_general_ci and still shows ??????????? why ?
         2- i need to make loop in loop to bring categories and sub categories.

Distinguished Expert 2017

Not sure changing the character-set after the data was stored in such a case would auto-fix.
Check using substring to pull one character to see what value it has from the utc/ASCII table.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial