0

I want to have a subdomain for my mysql server in my VPS. Something like mysql.mydomain.com

How is it possible with Apache2? I do not have a separate server for MySQL. I just want to have subdomain.

I hope I made sense.

Gasim
  • 7,615
  • 14
  • 64
  • 131
  • I think we need more info on why you want to do this. What is your goal? Access the mysql server globally from a FQDN? – Matt R. Wilson Jul 26 '13 at 19:40
  • No. I want to use it for future. Like If I am going to have a different ip for my mysql all i will need to do is to change dns record. Is it even possible? – Gasim Jul 26 '13 at 19:42
  • MySQL and Apache have nothing to do with one another. If you want to put your MySQL server on a separate subdomain and ensure it is _not_ accessible via other interfaces, you'll need to add a network interface with a dedicated IP address and ask mysqld to listen only on that specific interface. – Michael Berkowski Jul 26 '13 at 19:47
  • 1
    Is it possible yes, just add a CNAME record that points the subdomain to the same domain then access mysql via either domain at its port. (defaults to 3306) HOWEVER, once you add a little security in you wont be saving your self any time, short or long term, like you're going for. – Matt R. Wilson Jul 26 '13 at 19:49

0 Answers0