MAX + WordPress/MySQL

Enigma Engine's icon

Hi

I'd like to create a MySQL content database using WordPress (so it may be easily accessible by multiple contributors) and have MAX draw from the database.
I do see that MAX has sqlite but would prefer to assemble content using WordPress (which uses MySQL).

Anyone have any tips or tricks on how I might accomplish that.

Many thanks in advance.

NIk

Florian Demmer's icon

Hi,

without going too much into detail it seems like that you have two general options:

* provide an API around your WordPress database that Max can interact with, using fe. HTTP Requests
* allow Max to directly connect to the Database and send / perform SQL Queries on it

For the latter, it might that you will have to use something to "help" Max to establish the connection. You could fe. use node.script and a NodeJS Driver / MySQL Connector for that.

Florian

nick rothwell | project cassiel's icon

DB connector via node.script sounds like the cleanest solution (though less secure than a tied-down HTTP API). Many years ago I solved the same problem using a JDBC connector and Max via MXJ, and if you're a Java fan that will probably still work; the JS version will be similar.

I just looked it up - it was about 9 years ago and coded in Clojure on the JVM, but if you're interested it's at: https://github.com/cassiel/maxmsp-clojure-sql

Enigma Engine's icon

Thanks very much Nick & Florian for the tips.

I'll follow up on your suggestions and keep you posted.

Nik