Author Topic: Accessing PHP MySQl Application on client pC  (Read 1192 times)

0 Members and 1 Guest are viewing this topic.

Offline shiningworld_4uTopic starter

  • Irregular
  • Posts: 14
  • Gender: Male
    • View Profile
Accessing PHP MySQl Application on client pC
« on: June 22, 2010, 05:24:19 AM »
HI!
we have developed a supply chain system which offers administration and reporting as web application and for POS it uses a desktop application. we developed web application using Mysql and pHp, and for desktop application we have used C# 2008.

We have tested the application on our workstaion, by installing it on one workstation and installing the desktop application on other pc, by configuring the config file as follow, and allowing remote connection on mysql, we can access application from client pc.

Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <appSettings>
    <add key="Connstring" value="SERVER=server;DATABASE=ac;UID=root;PASSWORD=supplychain;"/>
  </appSettings>


</configuration>

Our client has Server 2003 OS, and client have XP. Now we can access application on server, but when try to access it from client through desktop application it gives the following error.

Access Denied for user 'root'@'CL1' (using password = Yes)

where server name is "Server" and client name is "CL1".

Any help will be much appreciated.

Thanks in advance.
Regards,

Muhammad Yasir

Offline Ruzzas

  • Enthusiast
  • Posts: 177
    • View Profile
Re: Accessing PHP MySQl Application on client pC
« Reply #1 on: June 22, 2010, 05:33:33 AM »
Normally you need to allow your ip address to connect to the mysql server. Google it, I don't know how exactly to explain it...
I can help you with your code but I can't always be right.

If I'm wrong correct me, I learn from my corrections and errors.

Offline shiningworld_4uTopic starter

  • Irregular
  • Posts: 14
  • Gender: Male
    • View Profile
Re: Accessing PHP MySQl Application on client pC
« Reply #2 on: June 22, 2010, 06:07:49 AM »
I have done so. During testing environment i have allowed IPs to access the Mysql and same is done on client's end.
Regards,

Muhammad Yasir

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

Offline shiningworld_4uTopic starter

  • Irregular
  • Posts: 14
  • Gender: Male
    • View Profile
Re: Accessing PHP MySQl Application on client pC
« Reply #4 on: June 22, 2010, 09:20:52 AM »
http://dev.mysql.com/doc/refman/5.1/en/privilege-system.html

The documentation provided on above link, helps me a lot to figure out the problem.
Issue is very simple, during allowing remote connection, in mysql.user table, query inserting wrong md5 code in password field.

just replace the password code with correct one and issue gone.

Thanks to all you guyz agian.
Regards,

Muhammad Yasir