Shinyshell Community Forums > Coding >
Connecting to MySQL database on a Different Server?


[1]


February 15 02010, 19:04 GMT
Pikachu
Kelp is good!

Pikachu's avatar
Location: California
Post count: 50
us
Okay, I've got a problem. I have been working on a website for a Muslim school (for volunteer hours) and I want to make the site use a content management type of thingy so that they don't mess with HTML. Turns out, their hosting plan did not come with a MySQL database, so I attempt to connect to my MySQL database that came with my AiiroDesign hosting. It didn't work. I get (actual URL is different, did that for safety):

said
Host 'soandso.soandso.com' is not allowed to connect to this MySQL server


How do I solve this problem, and if I can't what can my host do (in his control panel)?
______________________________

Linux | Chrome | Python | Chuck

February 15 02010, 21:39 GMT
lec**
Supra stultitiam

lec's avatar
Location: Varaždin, Croatia
Post count: 173
hr
It's a mysql permission setting. The user you're connecting as needs to have privileges to connect from that domain.

You should be able to resolve this by adding a MySQL user with privileges for connecting from the school's server. In MySQL, granting this privilege can be done through a query (if you have the GRANT privilege, dunno if your aiirodesign hosting lets you have it, probably does).

GRANT ALL PRIVILEGES ON *.* 
TO username@"192.168.0.1"
IDENTIFIED BY "password";
TO username@"192.168.0.1"
IDENTIFIED BY "password";]]>


Where 192.168.0.1 is replaced with the school server's IP address. If you don't know the IP, you can use the domain name instead - the IP will be looked up based on that.

February 15 02010, 22:49 GMT
Pikachu
Kelp is good!

Pikachu's avatar
Location: California
Post count: 50
us
I get this:

Error said
Error
SQL query:

GRANT ALL PRIVILEGES ON * . * TO username@ "cityofknowledge.com" IDENTIFIED BY "password"

MySQL said:

#1045 - Access denied for user 'aiiro_pikachu'@'67.205.0.0/255.255.192.0' (using password: YES)


Does this mean I don't have the permission to grant?
______________________________

Linux | Chrome | Python | Chuck


[1]



Forum Information
  Currently Active Members [detailed] (0 members and ? guests)
-
Forum Statistics
Topics: 0, Posts: 0, Members: 108.
Welcome to our newest member, adamthephantump
Most members online was 5, on August 28 2009, at 21:49:28.
Legend
    Forums with unread topics in them are indicated by a strong yellow colouring around the forum icon.
    Forums with no unread topics have the standard pale yellow colouring around the forum icon.
    Forums with a blue arrow icon will redirect you to a non-forum page.
    Locked forums have a little padlock by their icon. You won't be able to post in these forums.
Shinyshell Home | Contact | Staff List | Archive | Top 

Conventional Login

Don't have an account? You may want to create one.

OpenID Login
OpenID login and registration is usable, but not finished.
What is OpenID?
Search

(advanced search)
Site Stats
  Total members: 108
  Latest member: adamthephantump
  Members currently online: 0
  Most online: 5 - Aug 28, 2009 (21:49)
  Front page hits: 87993
Developer info
  Site version: 3.5 Alpha
  16 queries - 9 templates
Under the Spotlight
Collide Site
Collide make fabulously dreamy electronic-industrial music, they're one of my favourite bands! Give them a chance to take control of your life - myspace | youtube - "Euphoria".

Collide Site - Hits: 4596

5/5 (2) | Rate this site?