Find Affordable Web Hosting Providers - Tophosts.com

Go Back   Web Hosting Forum - Webhosting Discussions at TopHosts.Com > Technical Hosting Forum
User Name
Password



Reply
 
Thread Tools Display Modes
Old 04-25-2008, 01:00 AM   #1
auggie
Newbie
 
Join Date: Apr 2008
Posts: 1
auggie is on a distinguished road
Default Need help with mySQL database and PHP

I friend has a domain and hosting service. I initiated a database for the website. I have used mySQL/PHP to work with databases on my site, but i can't connect to the database for this site. I have an IP for the database and login information, i can use the phpMyAdmin at the ip for the database, but i cant connect to it thought my php scripts.

Any help?
auggie is offline   Reply With Quote
Old 04-28-2008, 03:05 PM   #2
alemcherry
TopHosts Member
 
Join Date: Jun 2006
Posts: 79
alemcherry is on a distinguished road
Default Re: Need help with mySQL database and PHP

Edit your mysql configuration script. You have to mention database server name or IP, username and password.
alemcherry is offline   Reply With Quote
Old 05-01-2008, 06:16 PM   #3
TheHosted
Newbie
 
Join Date: May 2008
Location: Cyber Space
Posts: 3
TheHosted is on a distinguished road
Default Re: Need help with mySQL database and PHP

Depending on the server setup this could also be a firewall issue.
__________________
http://www.thehosted.com
TheHosted is offline   Reply With Quote
Old 05-07-2008, 09:26 AM   #4
bluezebra
Newbie
 
Join Date: May 2008
Posts: 1
bluezebra is on a distinguished road
Default Re: Need help with mySQL database and PHP

Try "localhost" instead of server name or IP
bluezebra is offline   Reply With Quote
Old 08-27-2008, 08:22 AM   #5
webhostingabc
Hoster
 
Join Date: May 2007
Posts: 33
webhostingabc is on a distinguished road
Default Re: Need help with mySQL database and PHP

Use the correct user name in your PHP script for mysql database conneting.
If you use cPanel, when you create a user for mysql, for example "xyz", your real usernanme is "accountname_xyz", "accountname" is your hosting account's name.
__________________
Top Cheap Web Hosting Provider
webhostingabc is offline   Reply With Quote
Old 02-01-2009, 05:45 AM   #6
Richard.kelly
Junior Hoster
 
Join Date: Nov 2008
Posts: 12
Richard.kelly is on a distinguished road
Default Re: Need help with mySQL database and PHP

That means the user '123' (without quotes) does not have access to the database server. You need to start MySQL Administrator, log in as root, and give the user 123 permissions to access the database server.

The user can have all the privileges in the world but if the user doesn't have permission to connect into the database server, those privileges don't matter. Another option to consider is the database server might not like all numeric usernames...try starting the username with a letter.
__________________
carbon accounting software
Richard.kelly is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


» Links
   web hosting
   chromebook forum
   chicago webhosting
   webmaster forums
   merchant select

» Links


All times are GMT -4. The time now is 12:26 AM.
Powered by vBulletin Version 3.6.8
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 2.4.0