Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Apr 30, 2013 1:33 pm 
Offline
Newbie

Joined: Thu Apr 12, 2012 11:27 am
Posts: 2
Hi guys,

I have 2 instances of MySQL configured in my linode (one for dev and another for release). MySQL connection string for my dev MySQL instance is mysql:unix_socket=/var/run/mysqld/mysqlddev.sock;dbname=<db-name> whereas my rel instance simply connects with localhost as my hostname.

Ideally what I want is to have developer friendly connection string for both mysql instances. something like

mysql:host=dev-mysql.mydomainname.com; //for dev instance
mysql:host=rel-mysql.mydomain.com; //for rel instance.

Can anyone help one how I can configure these settings?

SenG

_________________
Senguttuvan G


Top
   
PostPosted: Tue Apr 30, 2013 3:47 pm 
Offline
Senior Member

Joined: Sat Nov 27, 2010 8:21 pm
Posts: 63
Assuming this is for local connections only, you can configure your mysql instances to bind to different IP addresses in my.cnf

bind-address=127.0.1.1
and
bind-address=127.0.1.2

Map these to hostnames in your /etc/hosts file

127.0.1.1 dev.mysql
127.0.1.2 rel.mysql


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group