I am not allowed to bounce the server through the Administrator GUI.
I'm guessing it is a permissions problem. How do I sort this out?
I have set the query log file name, but I think I need to set GLOBAL sql_log_off = 'ON';at the command line as I don't see how to do this through the GUI.
What is suggested to include in my.ini?
The goal is to see what a PreparedStatement is actually sending to the server; the PreparedStatement works at the command line but not within the servlet.
My lack of experience with these tools is showing because I have spent almost two days ( and nights! ) on this.
Mary Taylor wrote:The goal is to see what a PreparedStatement is actually sending to the server; the PreparedStatement works at the command line but not within the servlet.
Why not use System.out.println. Or a logging driver like jamon? Then you don't need admin privileges or to fiddle with MySql.
query logging working and was able to see that, for some reason, the parameter is
not being inserted in the PreparedStatement. When the query hits the db, the "?"
mark is still actually in the query! I have another successful query that looks exactly like the one
that fails; different columns are being queried, but the successful one has the value
set in the query whereas the unsuccessful one does not. I cannot see any difference in the
Jeanne Boyarsky wrote:I think Jamon does replace the values. In any case, you could post the query here with the "?" and see if anyone knows what is wrong. My guess would be a setXXX is incorrect.
Which actually leads to a way you can troubleshoot. Start with the working query and start replacing values with "?" until you get the error. That will tell you which parameter is causing a problem.
My database tables are corrupted; I'm trying to restore from the output of mysqldump, but I can't seem to get the syntax correct. I will be able to work with the prepared statement problem when I get the database restored.
I'm using MySql 5.0.67.
From the bin directory I issue this command:
mysqld-nt –user=root –p papers < C:\MyProject\SqlQueries\MyProject200905272126.sql
Response is that there are too many parameters for "mysqld-nt". All the examples on the web do this at the command prompt using "mysql", but in 5.0, "mysql' became "mysqld-nt", etc.
Before someone yells at me for working as root, I do plan to create an admin user for this type of thing. Right now I don' t need to do that.
have absolutely no idea what i was thinking because I do have mysql.exe. I need to get some sleep!
Stayed up way too late twice this week working on a project. Very sorry.
I still can't seem to get the syntax of the command correct, but hopefully soon I will.