Exporting to MySQL db issue (solved)

SOLVED see below

I have a similar problem to here: viewtopic.php?f=14&t=1460&p=5789&hilit=cellprofiler, but that did not help me.

I installed MySQL on my local PC computer, and as far as I can tell, it works, and I get a command line. (No previous exp with db’s so that took me awhile).

I now get the following error (almost identical to the one in the above thread)

Error while processing ExportToDatabse.
Access denied for user XXXX@local host (using password =YES)
Traceback (most recent call last):
File “cellprofiler\pipeline.pyc”, line 1238, in prepare_run
File “cellprofiler\modules\exporttodatabase.pyc”, line 853, in prepare_run
File “cellprofiler\modules\exporttodatabase.pyc”, line 208, in connect_mysql
File “MySQLdb_init_.pyc”, line 81, in Connect
File “MySQLdb\connections.pyc”, line 187, in init

I am sure my user and pass are correct. I tried without the pass, and same thing.
After google searches I also tried to call the host “MySQL” instead of “localhost” - same issue.
The db exists as shown by “show databases;” in the command line.

It’s probably not technically a CP problem, but I have no where else to ask. Most Google searches have to do with PhP issues

Turns out, it WAS the user. I was using the user I created when installing MySQL. When starting the client, it asked me for the password. The password that I created that matched that username. However, turns out, i needed to use root, as user. I used this command: SELECT USER(); and this showed me that the user was root@localhost. I guess something about the difference between server and client…


I’m not sure about this one; might this page be of some help? dev.mysql.com/doc/refman/5.0/en/ … enied.html

Oops, just saw that you posted the solution. :smiley:

I’ve attached a pipeline that I’ve made some edits to. I stripped it down to the nuclei identification portion since that was the one that needed work; the rest can stay as is and can be appended later.

Extracting metadata from the filename is helpful if (1) the plate and well metadata are contained in the filename, and (2) you are analyzing a multi-well formatted assay and you want to use the PlateViewer in CPA. Otherwise, it’s just extra metadata that is nice to have but not needed.
2013_07_25.cp (4.52 KB)

I was intending to rewrite my questions after I played around with the CPa a bit after getting the db going that’s why I deleted the files from my OP.
But this is very helpful!