How to access MySQL database on local computer with Android App?
-
- Posts: 10
- Joined: Fri 28 Jul 2017 09:20
How to access MySQL database on local computer with Android App?
Hello,
we have a local server (PC) in my company, there is a MySQL database and another Firebird database.
i want to develope an application that can access those databases from Android App using Delphi XE8 ?
Note: Xampp has been installed.
Thanks
we have a local server (PC) in my company, there is a MySQL database and another Firebird database.
i want to develope an application that can access those databases from Android App using Delphi XE8 ?
Note: Xampp has been installed.
Thanks
-
- Posts: 10
- Joined: Fri 28 Jul 2017 09:20
Re: How to access MySQL database on local computer with Android App?
hello every body !,
no one can answer? where is DevArt ?
no one can answer? where is DevArt ?
Re: How to access MySQL database on local computer with Android App?
UniDAC allows to connect to MySQL server from Android. To test this functionality, you can use our Mobile demo project. The project is located in the 'Demos\Mobile' folder relatively to the UniDAC demos installation path.
UniDAC allows you to connect to an available MySQL server. Check the availability of the MySQL server using the Telnet program:
Telnet.exe MySQLServerAdress MySQLServerPort
If the server is unavailable, please contact your system administrator to solve this task.
Note, Mobile Development is available only in Professional and Trial Editions, you can find information about this here: http://www.devart.com/unidac/editions.html
Currently, you cannot connect a Firebird server from Android using IBDAC. We started the process of implementing support for Android for Firebird in IBDAC. But according to the phrase from the official Firebird server "Android builds were not thoroughly tested, therefore they should be treated as experimental." we should thoroughly test this implementation, so unfortunately, we can't provide you the exact time frames.
You can connect to InterBase from an Android and iOS device. InterBase supports mobile operating systems starting from InterBase XE3 - exactly about this it was mentioned in 5.1 version release notes.
UniDAC allows you to connect to an available MySQL server. Check the availability of the MySQL server using the Telnet program:
Telnet.exe MySQLServerAdress MySQLServerPort
If the server is unavailable, please contact your system administrator to solve this task.
Note, Mobile Development is available only in Professional and Trial Editions, you can find information about this here: http://www.devart.com/unidac/editions.html
Currently, you cannot connect a Firebird server from Android using IBDAC. We started the process of implementing support for Android for Firebird in IBDAC. But according to the phrase from the official Firebird server "Android builds were not thoroughly tested, therefore they should be treated as experimental." we should thoroughly test this implementation, so unfortunately, we can't provide you the exact time frames.
You can connect to InterBase from an Android and iOS device. InterBase supports mobile operating systems starting from InterBase XE3 - exactly about this it was mentioned in 5.1 version release notes.
-
- Posts: 10
- Joined: Fri 28 Jul 2017 09:20
Re: How to access MySQL database on local computer with Android App?
Hi,
i successed connecting to a remote MySQL in an internet server,
but in local server i failed.
the screenshot with error: https://ibb.co/dyPt9k
i successed connecting to a remote MySQL in an internet server,
but in local server i failed.
the screenshot with error: https://ibb.co/dyPt9k
Re: How to access MySQL database on local computer with Android App?
When the TUniConnection.Server property is set to "localhost" or "127.0.0.1", there is an attempt to connect to MySQL server running on the device on which your program is running. Therefore, when setting the TUniConnection.Server property to localhost, MySQL server must be preinstalled, configured, and run on the local device.
Regarding the installation of MySQL server on mobile devices, we do not provide any recommendations. You can use any official version of the server.
Regarding the installation of MySQL server on mobile devices, we do not provide any recommendations. You can use any official version of the server.
-
- Posts: 10
- Joined: Fri 28 Jul 2017 09:20
Re: How to access MySQL database on local computer with Android App?
Did you mran that i must install MySQL into my Android device to let him connect to my PC server?
Re: How to access MySQL database on local computer with Android App?
If your Android device is on a local network with MySQL server - you should specify the local IP address of your MySQL server in the TUniConnection.Server property. If you want to be able to connect to MySQL server that is on your local network from outside, you should make MySQL server accessible from outside. This issue is not related to UniDAC functionality, but to the issues of system administration and network configuration. To get an answer to this question, please, contact your system administrators with the question how to make your MySQL server accessible from the Internet or ask the appropriate question at some specialized forums. Once your local MySQL server is accessible from outside, you should set the TUniConnection.Server and TUniConnection.Port properties to the correct values equivalent to the external IP and MySQL server port.
-
- Posts: 10
- Joined: Fri 28 Jul 2017 09:20
Re: How to access MySQL database on local computer with Android App?
hello,
i want to access my local MySQL database using Wifi not from Internet.
i want to access my local MySQL database using Wifi not from Internet.
Re: How to access MySQL database on local computer with Android App?
As we wrote earlier, in this case you should specify the local IP address of your MySQL server in the TUniConnection.Server property.
Re: How to access MySQL database on local computer with Android App?
You need to understand the concept of the IP address "127.0.0.1" that has the name "localhost".
Every single computer in the world (that has a netcard) has the IP address 127.0.0.1 (localhost).
As Viktor explained, you need to specify the unique IP address.
You state that you need to access the local computer, not on the internet. From the netcards point of view, there realy is no difference. Its all just "another computer with some ip address".
So you need to figure out which IP address your "local" machine has. To do this, start a DOS-prompt (by typing cmd in windows start thing). Once you have a DOS-prompt type "ipconfig" after hitting enter you will get some text, one of the lines is IP4 Address and on that line you can see what IP address your computer has (the computer with MySQL installed, this all must be run on).
I am guessing the IP Address will be 192.168.0.xxx or something close to that where xxx can be anything from 1 to 255.
This is the IP address you need in your Android App.
NOTE however, the IP address can change whenever you reboot the computer, as its most likely getting the IPAddress dynamically every time (it will almost always get the same, but that's not certain).
Just to clarify the "localhost" name or 127.0.0.1
If you have a computer, mobilephone, networkgadget, iPad, tablet, anything with a netcard in your hand, it will always have the ipdress 127.0.0.1 with the name localhost.
So when your android phone cannot find the database on "localhost" it saying it cannot find the database on itsself, which is correct.
Hope this clarifys
Jens
Every single computer in the world (that has a netcard) has the IP address 127.0.0.1 (localhost).
As Viktor explained, you need to specify the unique IP address.
You state that you need to access the local computer, not on the internet. From the netcards point of view, there realy is no difference. Its all just "another computer with some ip address".
So you need to figure out which IP address your "local" machine has. To do this, start a DOS-prompt (by typing cmd in windows start thing). Once you have a DOS-prompt type "ipconfig" after hitting enter you will get some text, one of the lines is IP4 Address and on that line you can see what IP address your computer has (the computer with MySQL installed, this all must be run on).
I am guessing the IP Address will be 192.168.0.xxx or something close to that where xxx can be anything from 1 to 255.
This is the IP address you need in your Android App.
NOTE however, the IP address can change whenever you reboot the computer, as its most likely getting the IPAddress dynamically every time (it will almost always get the same, but that's not certain).
Just to clarify the "localhost" name or 127.0.0.1
If you have a computer, mobilephone, networkgadget, iPad, tablet, anything with a netcard in your hand, it will always have the ipdress 127.0.0.1 with the name localhost.
So when your android phone cannot find the database on "localhost" it saying it cannot find the database on itsself, which is correct.
Hope this clarifys
Jens
-
- Posts: 10
- Joined: Fri 28 Jul 2017 09:20
Re: How to access MySQL database on local computer with Android App?
Hi, id that ip in ipconfig: 192.168.8.100 but i can't access !
only localhost and 127.0.0.1 who connect.
only localhost and 127.0.0.1 who connect.
Re: How to access MySQL database on local computer with Android App?
Please specify 192.168.8.100 is MySQL server IP or IP of your Android device. Please provide the full error message when attempting to connect to 192.168.8.100.
-
- Posts: 10
- Joined: Fri 28 Jul 2017 09:20
Re: How to access MySQL database on local computer with Android App?
This is the error message:
https://image.ibb.co/dQF9ba/Capture2.png
and this the phpmyadmin:
https://preview.ibb.co/bG1zba/Capture.png
https://image.ibb.co/dQF9ba/Capture2.png
and this the phpmyadmin:
https://preview.ibb.co/bG1zba/Capture.png
Re: How to access MySQL database on local computer with Android App?
The 'Access denied for user 'YourUserName'@'YourComputerName'' message is a server response to an authentication fail. This message means that no user with the 'YourUserName' name exists or you have entered an invalid password, or a user with the 'YourUserName' name has no server access rights from the 'YourComputerName' PC.
To solve the problem, you should add the necessary rights to the YourUserName account or create a user with the necessary rights. The needed information can be found in the MySQL reference manual (e.g.: http://dev.mysql.com/doc/refman/5.5/en/grant.html).
To solve the problem, you should add the necessary rights to the YourUserName account or create a user with the necessary rights. The needed information can be found in the MySQL reference manual (e.g.: http://dev.mysql.com/doc/refman/5.5/en/grant.html).
-
- Posts: 10
- Joined: Fri 28 Jul 2017 09:20
Re: How to access MySQL database on local computer with Android App?
i do it, from the PC it connect but from Android it dosn't connect.