?
Solved

MySQL on 2nd server - Html on 1st Server -- how do I configure them to talk to one another?

Posted on 2011-04-21
5
Medium Priority
?
279 Views
Last Modified: 2012-05-11
Running mysql on solaris 11, trying to configure MySQL. to allow access from the outside.

How do I setup the server to allow remote connections to the MySQL database.   We are hosting the website on 1 server and the MySQL server is on our machine at a remote location. I've only have done the same machine for both before.    

Can someone help me try to figure out how to get them to talk together from 2 separate locations?

Thx!
0
Comment
Question by:OQROCK
  • 2
  • 2
5 Comments
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 35445703
You need the ip of server2. The port needs to be forwarded through the firewall.
0
 
LVL 24

Expert Comment

by:johanntagle
ID: 35445717
Make sure the Mysql port (usually 3306) is open on the MySQL server.  Try the following

telnet mysql_server_hostname 3306

If you get a connection refused or a time-out, something is blocking the connection attempt.

Once you have that addressed, you just grant permissions to a remote user.  Suggest this user just be used by the website application only, not by anything else:

grant SELECT,INSERT,UPDATE,DELETE on database_name.* to username@web_server_hostname_or_ip identified by 'password';

Alternatively, you can just grant to specific tables by replacing * to a table name.  Repeat for each table.

See http://dev.mysql.com/doc/refman/5.5/en/adding-users.html for more info.
0
 

Accepted Solution

by:
OQROCK earned 0 total points
ID: 36027471
problem was solved by keeping both database and webserver on the same machine.  didn't find a workaround.
0
 

Author Closing Comment

by:OQROCK
ID: 36053190
STILL SEARCHING
0
 
LVL 24

Expert Comment

by:johanntagle
ID: 36028078
Well, I can't help if the author doesn't even give feedback re what happened when the solution I suggested was tried.  The described requirement, while far less than ideal (you should really have the app and db on the same network for optimum performance),  is nothing new.  Anyway, I won't object to this question being closed if the author doesn't want to discuss further.  Good luck.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month15 days, 21 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question