Datasource does not exist

I’m not sure whether this is a Lucee problem or a MySQL problem.

My little application was working fine on my Macbook Pro but then I had to move to a new Macbook Air M5 running Tahoe 26.5.1.

My program is written in JS and uses cfajaxproxy to run cfc’s which access my MYSQL database. I have MySQL 9.7.1 and MySQL workbench 8.0.47.

I can go into workbench using the only datasource I have set up and interrogate the database. When I execute my program and a CFC tries to access the db, I get “the datasource doesn’t exist” message and I’m confused. Because workbench can use the datasource, I assume that MySQL knows of the datasource.

Given that MySQL 9 has a number of issues, I might try to downgrade to 8.4 but if anyone has any thoughts on the above issue, I’d be most grateful to hear them.

hi @new2lucee!

Post your Application.cfc file on webroot.

component  {

this.Name = "Lucee";
}

@new2lucee ,
Please verify that the datasource is configured in the Lucee Administrator (/lucee/admin/server.cfm or /lucee/admin/web.cfm) under Services → Datasources, and click Verify to confirm the connection is working.
Also, if you’re using configuration as code, check whether the datasource definition exists in:
lucee-server/context/.CFConfig.json

For reference, see the Lucee documentation on defining datasources:

Yep! That’s the answer. Set the password and all is good! Thank you all for your support.

2 Likes