Newbie Question with MySQL

Just starting out? Need help? Post your questions and find answers here.
morosh
Enthusiast
Enthusiast
Posts: 329
Joined: Wed Aug 03, 2011 4:52 am
Location: Beirut, Lebanon

Newbie Question with MySQL

Post 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
PureBasic: Surprisingly simple, diabolically powerful
User avatar
HeX0R
Addict
Addict
Posts: 1205
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: Newbie Question with MySQL

Post by HeX0R »

try this:

Code: Select all

"host=morisaab.42web.io/sql205.infinityfree.com port=3306 dbname='epiz_32155036_morosh_db1'"
morosh
Enthusiast
Enthusiast
Posts: 329
Joined: Wed Aug 03, 2011 4:52 am
Location: Beirut, Lebanon

Re: Newbie Question with MySQL

Post by morosh »

I tried and got:
Connection failed: Unknown MySQL server host 'morisaab.42web.io/sql205.infinityfree.com' (11001)
PureBasic: Surprisingly simple, diabolically powerful
normeus
Enthusiast
Enthusiast
Posts: 472
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: Newbie Question with MySQL

Post 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.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
morosh
Enthusiast
Enthusiast
Posts: 329
Joined: Wed Aug 03, 2011 4:52 am
Location: Beirut, Lebanon

Re: Newbie Question with MySQL

Post by morosh »

Aha Thanks for the info Normeus
PureBasic: Surprisingly simple, diabolically powerful
User avatar
NicTheQuick
Addict
Addict
Posts: 1523
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Newbie Question with MySQL

Post by NicTheQuick »

You should remove your database password from the first post in case this is a valid one.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
morosh
Enthusiast
Enthusiast
Posts: 329
Joined: Wed Aug 03, 2011 4:52 am
Location: Beirut, Lebanon

Re: Newbie Question with MySQL

Post by morosh »

I deleted my account
PureBasic: Surprisingly simple, diabolically powerful
Post Reply