MySQL "bind-address", auto-bind

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Is there a way to have MySQL automatically detect the IP address of the machine it's on and set the "bind-address" configuration variable itself? This is a small home server using DHCP that's used periodically and I really don't want to go through setting up static IP addresses.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8397
  • Loc: USA

Post 3+ Months Ago

http://dev.mysql.com/doc/refman/5.0/en/ ... rties.html

I've never done what you're trying to do (not sure if I even completely understand what you're trying to do), but hope that helps.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Basically in "/etc/mysql/my.cnf", there is a configuration variable called "bind-address" which tells MySQL servers which IP address on the machine to bind to. The variable is set during the MySQL installation.

In my case, the IP address of the machine will change now and then. If I start the server and DHCP has given the machine a different address, MySQL will fail to start until I edit my.cnf and update the IP address.

This machine will only ever have one IP address at a time, so I'm hoping it is possible to have MySQL be smart enough to say hey, there's only one address available anyways, let's just bind to that.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

You should be able to set to it to 'bind-address = 0.0.0.0' and it will bind to what ever it can.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Worked like a charm, Spoof. Thank you. :D

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 14 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
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.