If you use a native MySQL C/C++ interface, you specify the host address at connection time. If you're using ODBC, then it's probably a matter of setting a registry value before connecting. If you're using a C++Builder component, then there would be a property you could set before connecting.