NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
My Sql


Joined: 24 Apr 2006
Posts: 11
Reply with quote
Is there a way to run MySql from within PHPed on the local computer? Server mode runs PHP and the scripts but for testing purposes I can not connect to the remote host server MySql. I do not have a full server set up on my pc. I tried to connect to the remote Mysql from within PHPed with no success. Maybe I am not setting it up correctly. Any help appreciated.
View user's profileFind all posts by cjacksSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
Can you tell us more about how are you trying to connect to remote mysql server and what kind of error message are you getting?
Thanks!
View user's profileFind all posts by yfaktorSend private message


Joined: 24 Apr 2006
Posts: 11
Reply with quote
The first message I get (when I try to run the debug) using a file that is on the remote server I get the error "Failed to start debug session" please verify that the debugger is installed on the remote server. I am not the server admin, how could I install the debig module on the server?

When I try to run the debug from a local file I get My SQL error can not connect to MySQl on local host.

Ok So I can run debug on local file but not remote

Can not run MYSQL on local. Not sure about remote since I can not start the debug session on remote server
View user's profileFind all posts by cjacksSend private message


Joined: 24 Apr 2006
Posts: 11
Reply with quote
How can I setup a remote MySQL connection in PHPed in the database wizard? What Host name and port would I use? I normal work in the databse through logging on the Vdeck and through PHPMyAdmin.
View user's profileFind all posts by cjacksSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
Ok, so - if you want to debug remote website, you definitely need to be able to install dbg extension on that remote server - there is no other way with any IDE, because you do need to have a "hook" into phpo engine on that server, to tell you which script and whcih line therte is being executed. However, you are absolutely right, you can still debug localy. Yet again it doesn't mean that you need to have MySQL running locally - even though you can do it, by downloading and installing mysql from mysql website.

Connecting to remote MySQL from db wizzard should be the same as connecting through any other db client -same port and hostname need to be entered. However, I suspect that the problem you are having is with MySQL restrictions on which hosts can connect to it. The privileges are probably given to "localhost" becuase I am guessin MySQL is running on the same server with PHP engine. If that's the case and you can not get yourself a privilage to connect to mysql there, you can install MySQL localy as I mention before.
Hope it helps.
View user's profileFind all posts by yfaktorSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
2Yfaktor Nusphere Tech Platofrm does not contain mysql server since version 3.2.
So I removed mentioning TechPlatform from the post.

And right, mysql server can be downloaded from mysql site and be installed locally.

2cjacks:
On the other hand, if you need to debug your scripts (even locally) using live data, you need an access to your live mysql database running on the live server.
It does not require administering privileges though. In order to do it do not install local mysql or shut it down if you have already installed it. Then run ssh console and make tunnel to your server. I hope that you have an ssh console (take putty or openssh/CygWin or whatsoever other distro available under Windows). Access to live server via ssh is provided by most if not all ISPs, so it should not be a problem.
In case of openssh, you will run command like this:

ssh -L localhost:3306:localhost:3306 mysshaccountname@myliveserver.com


It will establish ssh tunnel from local 3306 port onto remote 3306 port.
Then you'll be able to connect to your live server using localhost and 3306 port.
Server will get connection originated from its localhost and therefore it will look to the server like you connect from php or local mysql console.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 24 Apr 2006
Posts: 11
Reply with quote
I have got it all working now. I installed Apache, PHP and Mysql on a local test server. Mysql works in PhpEd now. I will do all my testing locally then send it to the remote server. Thanks for all your assistance!
View user's profileFind all posts by cjacksSend private message
My Sql
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 vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic