This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Am still on the first tutorial from Cameron Mckenzie's 'Hibernate Made Easy' book, and lots of things still going wrong so although not getting very far with the example am picking up a lot of new stuff
The problem now is that the examscam schema can't seem to be found using the hibernate.cfg.xml file I am using. I have copies of the schema in the c:\ root directory and also at C:\Program Files\MySQL
hibernate.cfg.xml
Stacktrace
Any pointers to where i am going wrong would be greatly appreciated.
Do you have a database 'examscam' in the MySQL engine? Does "show databases;" command in MySQL prompt show you that it exists? If not create a one using "create database examscam;".
I am also new to MySql so unsure of how to enter the commands you mentioned (went to dos command line and the Mysql directory and tried from there but didnt work). But in MySql workbench the examscam.mwb Schema definitely exists (maybe because it was created in workbench the file extension is different?)
I am wading through a plethora of documentation on MySql, Maven, Ecipse addons and hibernate at the moment trying to bring this all together
... I am also new to MySql so unsure of how to enter the commands you mentioned (went to dos command line and the Mysql directory and tried from there but didnt work).
Go to the bin directory of the MySQL installation directory in command prompt and type "mysql -u root" (this should work if you haven't set any password for the root & assuming MySQL is running). Then you will be taken in to the MySQL prompt with root privileges. Try the command mentioned in the previous post, see what happens.
I'd recommend taking a step back: you are trying to do *far* too many things at once.
Kevin Florish
Ranch Hand
Joined: Jan 06, 2009
Posts: 155
posted
0
Thanks for the example Vijitha, the 'show databases' command confirmed my suspicion that although the schema is present in the MySQL Workbench. Mysql doesn't show the database and therefore Eclipse is unaware of it.
I have now created the database from the MySql prompt and everything is working as intended