Thanks - I will give this a go. Jeremy Burns Class Outfit
[email protected] (t) +44 (0) 208 123 3822 (m) +44 (0) 7973 481949 Skype: jeremy_burns http://www.classoutfit.com On 26 Jan 2011, at 07:41, Zaky Katalan-Ezra wrote: > edit /etc/ssh/sshd_config on your local machine > Add: > AllowTcpForwarding yes > GatewayPorts yes > > restart sshd > > Edit my.cnf on remote machine. > Uncomment the following line. > bind-address = 127.0.0.1 > restart mysql > > On you local machine run the following command > ssh -i e-keypair -f [email protected] -N -L 4444:localhost:3306 > If you are not using ssh key you will be prompt for remote user assword > > Edit database.php > > var $default = array( > 'driver' => 'mysqli', > 'persistent' => false, > 'host' => '127.0.0.1', > 'port'=>4444, > 'login' => 'user', > 'password' => 'pass', > 'database' => 'schema', > 'prefix' => '', > > > > On Wed, Jan 26, 2011 at 8:24 AM, Jeremy Burns | Class Outfit > <[email protected]> wrote: > I don't think I am explaining myself clearly. I am connecting to the database > fine (using Sequel Pro). That is not my problem. > > I want to get my local instance of a CakePHP application to connect to a > remote database via SSH, so need to have the right configuration in > database.php. That's where I need the guidance. > > > Jeremy Burns > Class Outfit > > [email protected] > http://www.classoutfit.com > > On 26 Jan 2011, at 06:20, Zaky Katalan-Ezra wrote: > >> 1. You need port 22 and 3306 to be open on the remote server >> 2. Install mysql workbench >> 3. In the new connection form set the connection method to tcp over ssh. >> 4. If you are using terminal and not GUI use ssh tunnel. >> >> And you may find more info here: >> http://forums.mysql.com/read.php?30,249779,249779 >> >> On Wed, Jan 26, 2011 at 7:21 AM, Jeremy Burns | Class Outfit >> <[email protected]> wrote: >> Thanks - I was hoping that someone could suggest a database.php setting that >> would make the connection. >> >> Jeremy Burns >> Class Outfit >> >> [email protected] >> http://www.classoutfit.com >> >> On 26 Jan 2011, at 05:01, bdwilton wrote: >> >> > Not sure if this is exactly what you had in mind, but... >> > >> > If you have a local work server with a local router which you can open up >> > a port on you can use a SSH tunnel on your local work server to forward >> > that port to a remote VPN or remote server which has its ports locked down >> > but accessible to your IP. This opens up the port through your router to >> > be accessed externally but through SSH to the remote server. >> > >> > Just look up SSH Tunnel. >> > >> > Brett Wilton >> > http://wiltonsoftware.com >> > >> > On 26/01/2011 8:32 a.m., Jeremy Burns wrote: >> >> Does anyone have any ideas for how to connect to a remote database via >> >> SSH? It's a development thing so that people working remotely can develop >> >> against the same database hosted on our virtual server. -- >> >> Our newest site for the community: CakePHP Video Tutorials >> >> http://tv.cakephp.org >> >> Check out the new CakePHP Questions site http://ask.cakephp.org and help >> >> others with their CakePHP related questions. >> >> >> >> >> >> To unsubscribe from this group, send email to >> >> [email protected] For more options, visit this group >> >> at http://groups.google.com/group/cake-php >> > >> > -- >> > Our newest site for the community: CakePHP Video Tutorials >> > http://tv.cakephp.org Check out the new CakePHP Questions site >> > http://ask.cakephp.org and help others with their CakePHP related >> > questions. >> > >> > >> > To unsubscribe from this group, send email to >> > [email protected] For more options, visit this group >> > at http://groups.google.com/group/cake-php >> >> -- >> Our newest site for the community: CakePHP Video Tutorials >> http://tv.cakephp.org >> Check out the new CakePHP Questions site http://ask.cakephp.org and help >> others with their CakePHP related questions. >> >> >> To unsubscribe from this group, send email to >> [email protected] For more options, visit this group at >> http://groups.google.com/group/cake-php >> >> >> >> -- >> Regards, >> Zaky Katalan-Ezra >> QA Administrator >> www.IGeneriX.com >> Sites.IGeneriX.com >> 054-7762312 >> >> -- >> Our newest site for the community: CakePHP Video Tutorials >> http://tv.cakephp.org >> Check out the new CakePHP Questions site http://ask.cakephp.org and help >> others with their CakePHP related questions. >> >> >> To unsubscribe from this group, send email to >> [email protected] For more options, visit this group at >> http://groups.google.com/group/cake-php > > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group at > http://groups.google.com/group/cake-php > > > > -- > Regards, > Zaky Katalan-Ezra > QA Administrator > www.IGeneriX.com > Sites.IGeneriX.com > 054-7762312 > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group at > http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
