MySQL with 000webhost

User privileges.
User without access privileges

1 Like

I’m using 000webhost. I didn’t see how to register a new user or change permissions. Could you guide me through this process? Just give me a hint on the way!

Generally, in the host’s control panel (in your case, 000webhost ) there is the database maintenance area.
Check if this user has access and if his password is the same one you set in the PHP script.

If I failed to use this method, I will follow the video. Thank you very much!

You will not fail.
You don’t need this Extension.
In addition to this script there is another one by Juan
But the error that is occurring is not caused by the script
OK ?

1 Like

The menu is extremely limited. Even in phpmyadmin, I don’t see options to register or change privileges.

Summary


Well I don’t have 000webhost. I use hostinger and as I said, you must configure privileges.

2 Likes

https://www.000webhost.com/forum/t/how-to-connect-to-database-using-php/42093

1 Like

The directory:

Summary

That’s what I thought. I didn’t notice anything wrong either in the script or in the other settings. It worked without problems on another bank when I tested it.
I will test on another hosting!!

Sorry for not following the video you recommended @_FTTX. Is that using the blocks I mentioned, the whole process becomes simpler by using simple SQL commands.

Thanks @Rogerio_Rios

1 Like

In same 000webhost ?

No, sorry. It was with local testing. :+1:

https://www.topbestalternatives.com/000webhost/

Did You check passwords , the database and host access password?

It was on that page right now @Rogerio_Rios!
I’ll run some tests.
Thanks!

Yes, the password is the same.

1 Like

did you follow the Setup?
https://puravidaapps.com/mysql.php

Setup

  • Put the PHP code on your web server
  • Set the SQLKEY in your app and in the PHP code, they must match for this code to work
    Note : Don’t use special characters, see also here.
  • Setup your database connection information in the php script
  • Try out the code

especially Don’t use special characters for the SQLKEY

Taifun

@shoryu Please don’t share sensitive credentials.
Database username, Database password , SqlKey and Website URL should be limited only to you.

Try changing your query to INSERT INTO tab(id,desc,price) VALUES(2,“bbb”,1.0).

Sorry, it was just a test bank that got deleted minutes later.

Same mistake. In fact, it looks like 000webhost doesn’t allow you to create passwords without special characters. As Taifun mentioned, they shouldn’t be used. I think that’s the problem.