Connecting to mysql db on dedicated server

Hello all;

I have created a user on my dedicated server and have 2 mysql on this server,now i want connect to these dbs in my pages,

I have 2 files  for this connections and have 'include' to my page,this page works well on share hosting but now that i'm testing it on dedicated server it cannot connect ,please let me know where is the problem.
What must be mysql db address on dedicated server?

The codes in connection files:

$dbhost = '';
$dbuser = 'jamshid_mu';
$dbpass = '***';
$dbname = 'mydb';

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
Try with $dbhost = 'localhost';

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MOSTAGHASSIAuthor Commented:
I used $dbhost = 'localhost'; but cannot connect.
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
>>,this page works well on share hosting but now that i'm testing it on dedicated server it cannot connect

what's the error message returned? typically it means that the connection parameters (host / user id/ password) you put in for dedicated server could be wrong.
Determine the Perfect Price for Your 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 with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

MOSTAGHASSIAuthor Commented:
I tested a page which doesn't need to connect to db and i have the same problem ,it show that there is another problem also,i will back to you again.
Mukesh YadavFull Stack DeveloperCommented:
Login to cpanel go to phpmyadmin get host just after Server: ... in top menu bar and use it... :)
MOSTAGHASSIAuthor Commented:
Sorry, that page that i thought has not connection to db has connection and my problem still is the same that i have explained in question.

There are no error,a table above the page load but when codes reach to execute connection it stop,it seems that it doesn't start connection to send error.
MOSTAGHASSIAuthor Commented:
Hi ,i could find the problem ,for changing date i could 'include' a file and i had forgotten,but the putting  'localhost' was the first problem.thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.