Multiple MySQL instances - clean MySQL hostname required
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=
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
1 Reply
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