Cannot connect to local MySQL (Error 1109: Specified URL not valid)

Hi everyone,
I’m still new to using Kodular, and I need some help.

These my Connection.php

CheckID.php

My screen kodular:


and

Please advice, thank you.

Rhd.

Hi dear,

Welcome to the Kodular community!

Take a look at this part here,

immagine
if you notice, you’re passing a URL that corresponds to a join of username and checkID.php, which ends up pointing to “usernamecheckID.php”.

You should point to a URL that provides your PHP file.

There are extensions that allow you to use SQL directly from the app

1 Like

Hi @Rahmad_RHD
As mentioned above: place http://yoursite.com/checkuser.php in the web.url block.

1 Like

Hi @RaYzZz ,
Thank you for the tutorial and your help.
For now, I still don’t quite get it because it’s a bit advanced for me, haha..
But any case, thank you very much for your help.

1 Like

Hey, this is a pretty common one for beginners so don’t worry!

The issue is in your blocks you’re joining the username value directly with “checkID.php” which means the URL ends up looking like usernamecheckID.php instead of your actual PHP file URL. You need to set the Web URL block to your full PHP file path like http://yoursite.com/checkID.php and pass the username separately as a parameter.

Also just a heads up connecting a mobile app directly to a local MySQL instance won’t work since your phone can’t reach localhost on your PC. You’ll need the PHP file hosted on a public server or at least your local IP if you’re on the same network.

If your database itself is having issues or getting corrupted along the way, sometimes third party tools like Stellar Repair for MySQL help recover things without needing a live running instance — saved me once when I couldn’t even get MySQL to start.

But for your immediate issue, fix the URL block first and that error should go away. Good luck!

Why not? I do this all the time. Just use the ip address with path of the local server (e.g. 192.168.x.x or 10.10.x.x) and put an http:// in front, instead of “localhost”

http://192.168.1.25/path/to/checkId.php

(assumes you have a properly setup local http server with php, along with your local mysql database)

Hi, you’re not alone—I’m also facing the same issue. I’ve been trying to figure it out for a while but still haven’t found a proper solution. Hopefully someone here can guide us.

1 Like

Read the already given answers. Use the correct url. Show us your relevant blocks.
And for a local MySQL database make sure you have a web server running on your local PC.

Taifun

1 Like

Good start setting up a database connection with MySQLi. However, you’re reconnecting in checkID.php even after including connection.php, which is redundant. Consider reusing the existing $connection. Also, add proper error handling and avoid exposing raw error messages in production for security reasons. Overall, structure is clear but can be improved.

Thank you bro @gary_futch ,
I try change check_id.php connection link this:

and the result is OK

but when I try to change global check_id like this.

It returned a different error:
“Error 1117: Took longer than the timeout period to receive data from the URL: http://xxxxx/kodular/check_id.php

do you have any advices for it?

I’ve already done that, but the following error appeared:
“Error 1117: Took longer than the timeout period to receive data from the URL: http://xxxxx/kodular/check_id.php”

do you have any solution.?

Thank you bro,

Same also in normal browser, 10+ seconds nothing seems to be fetched.

Dear all,
I’d like to say a big thank you for the knowledge you’ve shared.
It turns out this issue is caused by this area:

I accidentally checked the “Allow Cookies” and “Save Response” and entered the value 5 in the “Timeout” field and maybe the program still running cookies when to start.
Currently I unchecked it and given value 100 or 0 in the “Timeout” field and it works.

Thank you all.

1 Like