<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=AppInventor%3A_Connect_ke_MySQL</id>
	<title>AppInventor: Connect ke MySQL - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=AppInventor%3A_Connect_ke_MySQL"/>
	<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=AppInventor:_Connect_ke_MySQL&amp;action=history"/>
	<updated>2026-04-20T02:46:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://lms.onnocenter.or.id/wiki/index.php?title=AppInventor:_Connect_ke_MySQL&amp;diff=70003&amp;oldid=prev</id>
		<title>Unknown user: Created page with &quot;App Inventor 2 is a visual programming environment that allows you to create Android apps without writing code. However, direct connection to MySQL servers is not supported na...&quot;</title>
		<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=AppInventor:_Connect_ke_MySQL&amp;diff=70003&amp;oldid=prev"/>
		<updated>2024-01-14T10:42:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;App Inventor 2 is a visual programming environment that allows you to create Android apps without writing code. However, direct connection to MySQL servers is not supported na...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;App Inventor 2 is a visual programming environment that allows you to create Android apps without writing code. However, direct connection to MySQL servers is not supported natively in App Inventor. To interact with a MySQL database from an App Inventor app, you typically need to use a web service as an intermediary.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s a basic outline of the process:&lt;br /&gt;
&lt;br /&gt;
Set Up a Web Service:&lt;br /&gt;
You need a server-side script that can interact with your MySQL database. You can use a server-side language like PHP, Python, or Node.js for this purpose. This script will handle the database operations and communicate with your App Inventor app.&lt;br /&gt;
&lt;br /&gt;
Example PHP script (api.php):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 $servername = &amp;quot;your_mysql_server&amp;quot;;&lt;br /&gt;
 $username = &amp;quot;your_mysql_username&amp;quot;;&lt;br /&gt;
 $password = &amp;quot;your_mysql_password&amp;quot;;&lt;br /&gt;
 $dbname = &amp;quot;your_database_name&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 // Create connection&lt;br /&gt;
 $conn = new mysqli($servername, $username, $password, $dbname);&lt;br /&gt;
 &lt;br /&gt;
 // Check connection&lt;br /&gt;
 if ($conn-&amp;gt;connect_error) {&lt;br /&gt;
     die(&amp;quot;Connection failed: &amp;quot; . $conn-&amp;gt;connect_error);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 // Your database operations go here&lt;br /&gt;
 &lt;br /&gt;
 $conn-&amp;gt;close();&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deploy the Web Service:&lt;br /&gt;
Upload the PHP script to a web server with PHP support.&lt;br /&gt;
&lt;br /&gt;
App Inventor Components:&lt;br /&gt;
In your App Inventor project, use the Web component to send HTTP requests to your PHP script.&lt;br /&gt;
&lt;br /&gt;
App Inventor Blocks:&lt;br /&gt;
Use the Web component blocks to send requests to your web service. For example, you might use the Web.Get block to retrieve data from the server.&lt;br /&gt;
&lt;br /&gt;
Example blocks for a simple GET request:&lt;br /&gt;
&lt;br /&gt;
Adjust the URL to point to your deployed PHP script.&lt;br /&gt;
&lt;br /&gt;
Remember, this is just a basic example. Depending on your application, you may need to handle more complex scenarios, like sending parameters, handling responses, error checking, and security considerations.&lt;br /&gt;
&lt;br /&gt;
Also, note that direct database connections from a mobile app are generally not recommended due to security concerns. It&amp;#039;s safer to use a web service as an intermediary to control and secure the interaction with your database.&lt;/div&gt;</summary>
		<author><name>Unknown user</name></author>
	</entry>
</feed>