Page 1 of 1

Newbie Question with MySQL

Posted: Wed Jan 22, 2025 9:29 am
by morosh
Hello:
I've opened an account with "https://www.infinityfree.com/", and I created a MySQL database (just for test), then with phpMyAdmin I created a table
CREATE TABLE SensorData (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
sensor VARCHAR(30) NOT NULL,
location VARCHAR(30) NOT NULL,
value1 VARCHAR(10),
value2 VARCHAR(10),
value3 VARCHAR(10),
reading_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)
Now I'm trying to access it with PB, using the following:

Code: Select all

UseMySQLDatabase()

If OpenDatabase(0, "host=http://morisaab.42web.io/sql205.infinityfree.com port=3306 dbname='epiz_32155036_morosh_db1'",
                "epiz_32155036", "5aRiHilnkxZDe")
  Debug "Connected to MySQL"
Else
  Debug "Connection failed: " + DatabaseError()
EndIf
I got:
Connection failed: Plugin http could not be loaded: The specified module could not be found. Library path is 'lib/mariadb/plugin/http.dll'
Certainly, I'm missing something

Any help is appreciated.
Thank you

Re: Newbie Question with MySQL

Posted: Wed Jan 22, 2025 10:18 am
by HeX0R
try this:

Code: Select all

"host=morisaab.42web.io/sql205.infinityfree.com port=3306 dbname='epiz_32155036_morosh_db1'"

Re: Newbie Question with MySQL

Posted: Wed Jan 22, 2025 11:03 am
by morosh
I tried and got:
Connection failed: Unknown MySQL server host 'morisaab.42web.io/sql205.infinityfree.com' (11001)

Re: Newbie Question with MySQL

Posted: Wed Jan 22, 2025 11:35 am
by normeus
you need a different hosting package:

Code: Select all

Make sure you are connecting from within hosting account

InfinityFree databases are only accessible from within your InfinityFree hosting acounts.
 Our database servers are not accessible from other locations, like developer tools on your own computer, websites on other hosting providers, game software, mobile apps and so on. Remote database access is only available with premium hosting.
Norm.

Re: Newbie Question with MySQL

Posted: Wed Jan 22, 2025 12:07 pm
by morosh
Aha Thanks for the info Normeus

Re: Newbie Question with MySQL

Posted: Wed Jan 22, 2025 12:11 pm
by NicTheQuick
You should remove your database password from the first post in case this is a valid one.

Re: Newbie Question with MySQL

Posted: Wed Jan 22, 2025 12:20 pm
by morosh
I deleted my account