Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
 
LinkBack Thread Tools
Old November 14th, 2013, 10:32 PM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Nov 2013
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Android phone connect to phpmysql server in laptop windows8 issue

I folks, i'm having bad issue in my program.I created a simple apps that will just put products in the database(phpmysql) and display. It works well if I run it through my emulator in my laptop but when I transfer it (the .apk file) into the android phone. I could not connect to the database. I already changed the IP into the IP address of my laptop.

Maybe you encounter such issue before, im looking forward for your advice.

thanks

chkm8 is offline  
Reply With Quote
sponsored links
Old November 14th, 2013, 10:39 PM   #2 (permalink)
AF Contributor
 
Join Date: Jan 2012
Location: Fayetteville, NC, USA
Gender: Male
Posts: 8,983
 
Device(s): Note3 stock (so far) been replaced. Working great so far.
Carrier: AT&T

Thanks: 6
Thanked 2,550 Times in 2,361 Posts
Default

Port 3306 isn't blocked anywhere, is it?
Rukbat is online now  
Reply With Quote
Old November 14th, 2013, 11:44 PM   #3 (permalink)
New Member
Thread Author (OP)
 
Join Date: Nov 2013
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, its not blocked. but thanks any way, I was able to found a solution and I also want to share this to everyone who might encounter this issue. In my connect.php, when i used the emulator in my laptop I used "localhost" to connect to the server its working but when I tried to transfer it into the android phone it will not work, it cannot find the "localhost". What I did, was I changed the localhost into "127.0.0.1" and it works.

-credit to this toturial-
anddev.org • View topic - [TUTORIAL] Connecting to MySQL database
chkm8 is offline  
Reply With Quote
Reply
Tags
android app, phpmysql, windows8


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:35 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.