Connect to database over SSH |
[eluser]Martin Rusev[/eluser]
Hi all, I have the following problem. My Codeigniter application is build and hosted on Server 1. Server 1 doesn't have Database installed. The only way to use database in my application is to connect remotely to Server 2 via SSH. My question is : Is it possible to do this in Codeigniter or I must add additional libraries? Thank you in advance for your time and attention
[eluser]johnwbaxter[/eluser]
You'll have to do a fair amount of this outside CI as there is no ssh lib or anything like that. Shouldn't be too hard though.
[eluser]sensimevanidus[/eluser]
What does "using a database by connecting remotely to Server2 via SSH" means? I couldn't understand your saying frankly. Does this mean that you can only connect locally to the database found on the Server2, not remotely?
[eluser]Martin Rusev[/eluser]
I am sorry if they are any misunderstandigs :0 My application is on Server 1, database on Server 2. That means - I have to connect to Server 2 via SSH and then using that tunnel connection, to use the installed there mysql server for my application on Server 1
[eluser]Tom Glover[/eluser]
[quote author="Martin Rusev" date="1224094776"]I am sorry if they are any misunderstandigs :0 My application is on Server 1, database on Server 2. That means - I have to connect to Server 2 via SSH and then using that tunnel connection, to use the installed there mysql server for my application on Server 1[/quote] Can't you tell MySQL on Server two to allow connections from Server one, this is remote server connections.
[eluser]Tom Glover[/eluser]
[quote author="Martin Rusev" date="1224099910"]It works Thank you very much[/quote] No Problem, are you using remote MySQL Connections?
[eluser]Martin Rusev[/eluser]
I used this: http://dev.mysql.com/doc/refman/5.0/en/c...ccess.html and then i just changed the "host" value in database.php in my Codeigniter application. |
Welcome Guest, Not a member yet? Register Sign In |