I am using Eclipse EE IDE and I am using the MySql Connector/J driver. How do 开发者_如何学CI set up a properties file with all the information(DB URL, DBusername,etc) Also I see that you need a DBname and DBurl for the properties file, How do I determine/create this name for the database. I have already looked at the mysql website for this and am still having trouble, if somebody could pleasee help me I would appreciate it.
Solution: I was able to get it working through the plugin available with Eclipse, but I soon realized this limited me with the use of my Tomcat server, so I re organized my directories and set up Tomcat to use with my Eclipse and also be available to other resources.
Eclipse doesn't use a database for anything, so even if you would create a properties file, it would ignore it.
If you're using the DB plugin, then you can use the UI to create a connection for the database. The wizard will ask for all the informations and save them somewhere (probably not as a property file).
If you need the database in your own project, then you must define the format of the property file yourself, read it at startup, and use the information to create a datasource.
You should use phpMyAdmin, or MySQL GUI tools for MySQL setup and management
精彩评论