Hi I am new to tomcat and mysql.
I have installed Tomcat and mysql in Ubuntu 9.10 and both are working great!!
But now I have task of connecting mysql and tomcat.
I dont have any idea on this. However I looked some manuals but did not find any luck.
Guy, Please give me the step by step procedure on how to connect mysql with tomcat.
btw I have downloaded mysql connector and copied the .jar file to $CATALINA_HOME/lib
What else should I do ?
Thanks!
#at0mzk
This is the steps I followed to install tomcat http://www.linuxnix.com/2010/12/how-to-install-apache-tomcat-on-linuxredhatubuntu.html and I installed mysql server and client using the commands sudo apt-get install mysql-server mysql-client later I downloaded JDBC Driver for MySQL (Connector/J) from http://www.mysql.com/products/connector/ and extrated it and pasted the .jar file in /opt/apache-tomcat-6.0.29/lib ( I dont have $CATALINA_HOME/common/lib) . My questions are 1) Is the connection between tomcat and sql established ? 2) do i need to install mysql-server when I have tomcat server ?
Which manual did you follow when installing? Should follow installation intructions in the Tomcat manual for your version. For example 5.5:
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#MySQL_DBCP_Example
note that manual says $CATALINA_HOME/common/lib, not $CATALINA_HOME/lib
"do i need to install mysql-server when I have tomcat server"
Firstly, do you need mysql at all? I have plenty of web apps that use alternative databases, even embedded ones. Mysql is not required to run Tomcat.
"Is the connection between tomcat and sql established"
Secondly, individual web applications can themselves establish a connection to mysql directly.
I don't know much about the process of setting up a Tomcat JNDI data source as at0mzk has pointed out, as I've never done it, but I suspect it is again up to the individual application to seek out that service and connect to the database using it. I can say that you don't necessarily need it though, depending on what your applications' require.
Related
I recently deleted mySQL and now when i am trying to reinstall it is giving me an error while configuring the mySQL Server
i have tried deleting everything from program file and registry also still no success
enter image description here
I found the issue.
When you install with the Installer 1.4, it won't work.
You should be good if you use V.1.6 of the installer.
https://dev.mysql.com/downloads/installer/
Installing a PHP application that requires MySQL or MariaDB, I first installed MariaDB via 'apt install' from the MariaDB repos, but there were behaviours with the installation of the application that seemed to be caused by some kind of incompatibility. Calls to the DB were timing out, and although I could see it was creating the DB, it was impossible to set the application up in its setup routine.
So I used apt remove to get rid of MariaDB. I saw the application had a *.deb installer for all requirements (wish I'd seen this sooner!) and, after removing PHP and Nginx, I attempted to install it the normal way. Unfortunately, the MySQL portion of the installation failed with:
Automatic maintenance of MySQL Server daemon disabled.
Packaging maintainer scripts detected a case that it does not know how to handle and cannot continue configuring MySQL. Automatic management of your MySQL Installation has been disabled to allow other packaging tasks to complete. For more details, see /etc/mysql/FROZEN
Unfortunately, /etc/mysql/FROZEN is a symlink to a non-existent file explaining downgrading. I can't run the uninstaller of the overall package or repair the installation with sudo --fix-broken install because the installer requires a MySQL password I can't provide it.
How can I fix my borked MySQL installation? If I could just get to a place to have MySQL run properly, understanding what left-overs perhaps from the MariaDB installation that I need to delete manually before trying to repair it, that would be helpful. FYI, the version of MariaDB was 10.3, and the version of MySQL the application package was installing was 5.7.
Any suggestions appreciated.
I have recently downloaded Wavemaker because I feel it best suites my needs, however when I try and connect to my database on a mysql server hosted with godaddy, I keep getting access denied. However I can connect using exactly the same loggin info for sql workbench and razorsql just to see if I had my credentials correct and I have no problem connecting using those other two tools, is it me or is wavemaker being a pain?
Did you remember to install the MySQL JDBC DRIVER?
If not you can get it from the MySQL site, or install it on your Linux machine using the appropriate install commands. I had the same problem and after installing the driver everything worked great.
I'm posting my WaveMaker MySQL connection info (the database properties file) in hopes it might help:
mafiamgr_warmturkeyDB.connectionUrl=jdbc\:mysql\://localhost\:3306/mafiamgr_warmturkey?useUnicode\=yes&characterEncoding\=UTF-8&zeroDateTimeBehavior\=convertToNull
mafiamgr_warmturkeyDB.tableFilter=.*
mafiamgr_warmturkeyDB.driverClassName=com.mysql.jdbc.Driver
mafiamgr_warmturkeyDB.username=topsecret_xref
mafiamgr_warmturkeyDB.password=568626f144a0c56862568626f14047568626f1412a43
mafiamgr_warmturkeyDB.reverseNamingStrategy=com.wavemaker.tools.data.reveng.DefaultRevengNamingStrategy
mafiamgr_warmturkeyDB.schemaFilter=.*
mafiamgr_warmturkeyDB.dialect=com.wavemaker.runtime.data.dialect.MySQLDialect
I'm using Ubuntu server. I'm already using a Mysql server and I want to add Redmine to it. The problem is that I'm not sure when Mysql server is installed by "Bitnami Redmine stack" again, if my old database will still be usable or not. Any ideas?
If you already had a MySQL database running in port 3306 when you installed the BitNami Redmine stack you should have prompted for entering a new port for the MySQL server bundled in the stack. Your old database should be still usable, but your BitNami installation will use its own MySQL server.
Incase if you using same port need to stop it and start the mysql of bitnami redmin using ctrlscript .
I have already add the installation document for bitnami redmine and issues related with that while installing in below mentioned link.
Issues related to starting mysql while installing redmine
I have been trying to get a ruby on rails app going on my machine for a little while now for a project I need to work on for work. The issue is, my system must be setting the default location of MySQL somewhere because every time I start the rails webserver (webrick) and run localhost:3000, I get the following error.
"Can't connect to local MySQL server through socket '/opt/local/var/run/mysqld/mysqld.sock' (2)"
I have deleted the installed version of mysql and removed all folders. I reinstalled mysql using BREW. I now have a running mysql instance. The output of "which mysql" prints "/usr/local/bin/mysql" which is actually a sim link to "/usr/local/Cellar/mysql/5.5.14/bin/mysql".
Does anyone know what might be forcing my rails apps to look for mysql in "/opt/local/var/run/mysqld/mysqld.sock"
NOTE: I deleted my current my.cnf because it was messing up the brew version of mysql I currently have running, so I know that is has nothing to do with that.
/opt/local is the default location for MacPorts-installed packages. Chances are you installed rails and or MySQL via MacPorts. Try:
sudo /opt/local/bin/port installed
to see what is installed.