Connect to mysql in another machine

Hi, there,
I have two database. One is oracle in my local machine, another is mysql in another machine. Now, I made a jsp program to control the two database concurrently. When I connect to mysql, I got errors:
Internal Servlet Error:
javax.servlet.ServletException: Server configuration denies access to data source
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at jspForOracle._0002fjspForOracle_0002fmodiProcess_0002ejspmodiProcess_jsp_1._jspService(_0002fjspForOracle_0002fmodiProcess
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java)
My local machine is : Redhat7.1, tomcat and oracle
Mysql machine is : Slackware, tomcat and mysql
I can ping and ssh the mysql machine. And I grant the mysql table for the permission to access the table. But still the same thing. What the problem?
Thank you in advance
peter

in your error message:
javax.servlet.ServletException: Server configuration denies access to data source
The server being referred to is the mysql server. Mysql has uid and password like all db's, but in addition, it has security that is sensitive to the source of the connection. Just because you have a valid uid and password doesn't mean that you will be able to connect from anywhere.
This data is in the user table of the mysql database, which is included by default in every mysql installation. What you need to do is edit the privileges of the user account that you're using to connect to mysql from the jsp. There is some good documetation on user administration here:
http://www.mysql.com/documentation/mysql/bychapter/

Similar Messages

  • Connecting to MySQL from another machine.

    I use following code to connect to my database.it works
    String databaseUrl = "jdbc:mysql://localhost:3306/test";
    but when i use
    String databaseUrl = "jdbc:mysql://192.168.0.205:3306/test";{
    it gives error (192.168.0.205 being my ip address)
    error
    message from server : "Host TRAIN5" is not allowed to connect to this MySQL server.
    Is that because of my connection string?

    It is because of your configuration. It has to do with user permission.
    Read the MySQL manual, again (you have read it, haven't you?), and pay close attention to user administration and the "GRANT" statement.

  • Connecting to mysql on another cfserver

    I have two cf servers. 1 a 7 and 1 a 8.
    I want to connect the CF8 server to a mysql datasource on the
    CF7 server
    I have listed the Database, Server by ip (numbers and . only)
    port user and pw
    Connection verification failed for data source: ldiline137
    java.sql.SQLException: Timed out trying to establish
    connection
    The root cause was that: java.sql.SQLException: Timed out
    trying to establish connection

    You have an applet too, and it's also trying to access a database on the local system? Well, both of you, the applet security rules don't allow that. You have to sign the applet to make it work.

  • Connect to database via another machine

    We have a machine that is setup with a VPN connection to a database outside our firewall. Whenever we need to access this database we make a remote desktop connection to this machine.
    We would like to be able to connect to the database directly from our workstation using the machine with the VPN connection as a gateway.
    Any pointers in the right direction are welcome.
    Rene

    Dear Rene W.!
    Please have a look at the following link. Your subject has already been discussed there:
    [http://www.mydatabasesupport.com/forums/oracle-server/369378-not-able-connect-oracle-database-through-vpn.html]
    Yours sincerely
    Florian W.

  • Can't connect to printer on another machine

    I have a Canon printer attached to my iMac running 10.5.7 and could always wirelessly print on it from my old iMac running 10.4.11. It has worked fine for many months but recently it stopped printing. I tried adding the printer again and it found the printer OK (location: my-iMac) but when printing it says it can't find/connect to my-iMac.lan . It can find the printer to add, and I can log into the other machine OK ( and vice verse) so there is no connection problem with the WiFi.
    I also have a MacBook running 10.5.7 which still prints OK but gives the location as my-iMac.local
    Is this a bug introduced with a system upgrade?
    Do I need to find a way to change .lan to .local?
    Anyone have any suggestions of how to fix it?
    Thanks

    Yes, running on an admin account.
    Safe Boot didn't seem to work. Tried it twice but it just hung on the logo screen with the dial spinning below. So I booted up normally and ran the disk utility to repair permissions.
    Removed the printer from the list and readded it freshly. It finds the printer on the host machine, but it still is coming up with .lan on the host name rather than .local and so when trying to print it fails to find the host machine.
    Any other ideas?

  • Not able to connect linux database instance in another machine

    Hi,
    I have installed oracle 10g database server in Linux, and i created one database instance. and i have added tns entry and listener entry.
    I am to connect the database on that machine. but not in different machine. i am able to access/ping linux machine in another machine also.
    while creating tns entry for linux database instance in another machine using "netca" i am getting this error.
    Connecting...ORA-12560: TNS:protocol adapter error
    The test did not succeed.
    Some of the information you provided may be incorrect.
    Click Back to review the information provided for net service name, or Change Login to change username.
    I verified listener and tns entry ( i think for this listener configuration is enough) also. and database is up.
    If anybody knows why i am not able to connect linux database in another machine. is there any network configurations other than listener configuration.
    Thanks in advance.

    yes i tried to connect with ORACLE_SID, its successful. and using tnsname like you said.
    Instead of using netca to create the tnsnames.ora entry on the second server, copy the tnsnames.ora entry from the DB server. Then use tnsping to test connection :-i done above but not able to ping the tns name, i am getting this error.
    TNS-12560: TNS:protocol adapter error
    ------------------------------------------------

  • Using mysql database on another machine without having mysql installed

    Hi...
    I was wondering whether its possible to copy a Mysql database that I have created on my machine, take it to another machine which does not have Mysql command line stuff installed and use my own JDBC connection to the copied mysql database and start manipulating my data. I don't know if this is possible or not ..
    The main purpose of doing this is I am creating a Java program which uses a Mysql database and I want to know if I give it to someone else to use it do they have to install Mysql and all the package or can they simply start using it.
    Thanks a lot
    Sassan

    masijade. wrote:
    TuringPest wrote:
    masijade. wrote:
    Sasanpad wrote:
    Hi...
    I was wondering whether its possible to copy a Mysql database that I have created on my machine, take it to another machine which does not have Mysql command line stuff installed and use my own JDBC connection to the copied mysql database and start manipulating my data. I don't know if this is possible or not ..No. Not only would it be in violation of the terms of your license, but a MySQL database is a client/server type setup. No MySQL binaries, no server, your client (jdbc) cannot connect.im just curious because im new to mysql myself, but what do you mean that its a violation of his license?
    do you mean for the commercial version?If he licenses his application under GPL, okay, no problem. Otherwise I read this quote
    Free use for those who never copy, modify or distribute. As long as you never distribute the MySQL Software in any way, you are free to use it for powering your application, irrespective of whether your application is under GPL license or not.
    to mean that you are not allowed to distribute MySQL (or any part of it, unless your application is GPL licensed) with your application, and if he distributes even just the data directory, he is distributing at least a part of MySQL.
    Other's may not see it that way, but do you want to take the chance?The critical element is the word distribute. If he tries to embed MySQL in the application he is giving to his users, he's distributing it. Hence a violation of the license. That does not in any way prevent him from including scripts that when the application is installed goes out and runs the script on the user's installation of MySQL and builds the databases and whatnot his application needs on their MySQL installation.
    Now, for the OP. If all you're keeping up with is urls and such and you don't have hundreds of them. I wouldn't bother with a db at all. a properties file would actually serve your purposes, and xml would suit just fine. Of course you'd have to have access to the file system and such but no licensing issues at all.
    PS.

  • Connecting to a database on another machine, please help!!!!!!

    Hi there,
    I am new to oracle and at the minute I am using Oracle 9i. I have set up a database on one machine (PC2) and would like to create an odbc from another machine (PC1) to connect to this database. I have set up a listener for (PC1) the using oracle net manager on PC2. what I want to know is: is there anything else I need to do on the PC2 end???? Also, what needs to be done on the PC1 end??? please help!!!

    If everything is setup and working properly on the Server PC2, you can just test the ODBC from PC1 (assum you already have an Oracle ODBC drive).

  • Connect to oracle xe from another machine

    How i can set oracle xe for connect from another machine
    i can connect with :
    sqlplus system/pass@xe
    listener and tnsnames are fine
    on base machine, but I can't do it from another machine
    i can't do it with html db (from browser), too
    ist it possible and how ?

    Do you have updated the tnsnames.ora file on your client box before you have tried to access the remote machine? Can you please post the error message you receive.
    If you have set the TNSNAMES.ora please try to resolve the remote database with TNSPING.. Can you also please post the results of this?

  • MySQL - Another 'Can't connect through mysql.sock' question...

    Hey, folks.
    So I'm trying to install MySQL to run with PHP on my PowerBook G4 (running 10.4.7, non-server edition) to use it to test out a shopping cart program for a website I'm building.
    I had it working as of Monday, when I installed it, got all the permissions set, built the necessary tables, and changed the root password (and logged in just to make sure it worked before retiring for the night)...but today I realized that I had somehow installed the wrong version of MySQL (I connected to it earlier today and discovered it was 4.026 - and I needed to be running MySQL 4.1.20, in order to be running the same version as my webhost).
    So I decided to upgrade. I downloaded and installed the 4.1.20 file, followed the directions about creating the system tables, changed permissions via sudo chown -R mysql:mysql data...and now, when I go to change the root user password (just to make sure it's still the same as it was), I get the following error:
    error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
    This error also occurs when I try to simply startup MySQL. I also now find I can't connect via MySQL Admin, either - it gives me the same error. Pinging the host works, however.
    Sooo...anyone have any ideas? I've read up on the forums re: Apple changing the socket to /var/mysql/mysql.sock as of 10.4.4, but it seems that would have affected me earlier this week when I was running the previous version of MySQL, too (I certainly haven't upgraded the OS since then).
    Regardless, I can't connect through MySQL Admin using the /var/mysql/mysql.sock socket, anyway...nor the standard /tmp/mysql.sock.
    Any thoughts on what might be causing this? I should confess, I'm well-versed in DOS (ugh), but UNIX is not really my strong suit, so I'm still figuring out how to get around in the Terminal...
    Thanks so much for any input you can give me!
    (Oh, one more thing, since it'll probably come up - I'm not currently connecting via PHP, but I will be eventually. Right now, I just want to be able to change my root password, and login from the Terminal)!
    Thanks again!\
    PowerBook G4 1GHz 15   Mac OS X (10.4.7)  

    Alright, folks.
    Somehow my computer has fixed itself. After wiping the mysql directories entirely, then reinstalling, I was still getting the same error.
    After going back to the original "MySQL-On-Mac" site at Marc Liyanage's entropy.ch site & following some of the instructions there, somehow my problem seems to have fixed itself.
    I wish I could tell you what the solution was (to benefit anyone else having this problem), but since I was simply following the unix commands listed there (without much explanation, at times, as to what they were doing), I just know that somehow it worked.
    (But if I had to make a guess, I think it had to do with starting the server via sudo ./bin/mysqld_safe &)...

  • Can't connect PHP/MySQL 404 error

    Wow, the learning curve is killing me. Yet another challenge. I'm using Dreamweaver CC and this tutorial http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html
    I'm at this step:
    Open comments.php. You must have a PHP page open in the Document window to create a MySQL connection.
    In the Databases panel (choose Window > Databases), click the Plus button on the panel and select MySQL Connection.The MySQL Connection dialog box appears.
    Type connTest as the connection name.
    For the MySQL Server, type localhost.If you are using the MAMP default ports on a Mac, use localhost:8889.
    For the User Name, type phptestuser.
    Type the password you chose for the phptestuser account in the Password field.
    For the Database, type php_test.Note: You don't need to precede the underscore with a backslash here. It was inserted by phpMyAdmin in the previous section (see Figure 20) only because phpMyAdmin uses a query that permits wildcard characters.
    Click Test.Dreamweaver attempts to connect to the database. If the connection fails, do the following:
    Double-check the server name, user name, and password.
    Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying a Testing Server for Dreamweaver).
    Verify that the web and MySQL servers are both running.
    Temporarily disable any firewall or security program. If the connection works, you need to configure the security program to permit communication between Dreamweaver and MySQL.
    Click OK. The new connection appears in the Databases panel.
    Expand the connTest connection, and then expand the Tables branch. You'll see the comments table in the database, which you can expand to reveal the details of the table columns (see Figure 23).
    As far as I can tell I have followed this tutorial to the letter.
    As far as I can tell, XAMPP/php mySQL are all running fine, the files are in the correct place and everything should be working. However when I hit test I get a 404 error. (Same error when I hit the select button.)
    The suggested problems on the 404 message are:
    1. There is no testing server running on the server machine.
    Pretty sure the testing server is running. Is there any way to test this, other than to note that xampp is definitely running right now and that I can log into phpMYadmin no problem?
    2. The testing server specified for this site does not map to the http://localhost/php_test/_MMServerScripts/MMHTTPDB.php URL Verify that the URL Prefix maps to the root of the site.
    Ummm...I'm pretty sure I put things where I was told to put them in the tutorial, but I'm lost at this point where I should verify what. A clue here? The files are where they are supposed to be, but maybe I entered something wrong? Except...I'm not sure what that could be or where to find it. Whatever IT is.
    Everything in local files is looking good.
    Thanks for your help!
    PS: Extra points to anyone who figures out how to make copy/pasteable error messages! These buggers are the bane of my life!

    Bgupta, you rock!
    I hope you have copied the "mysql.php" and "MMHTTPDB.php" files from "C:\Users\username\AppData\Roaming\Adobe\Dreamweaver CC\locale\Configuration\Connections\Scripts\PHP_MySQL\_mmDBScripts" to "C:\xampp\htdocs\phptest\_mmServerScripts"
    This was EXACTLY the problem. I checked the tutorial and I couldn't even find where the tutorial said to do this. (If I missed it, let me know where in the tutorial it was, please.)
    Fixed!

  • Connecting to MySQL in Dreamweaver8

    Hey guys i've got Dreamweaver8 and wamp5 installed, my
    problem is coming when i try to connect to MySQL through
    Dreamweaver. I've followed through all Adobe tutorials including
    the Blog tutorial but nothing seem to be working. My web server is
    working fine so is my database , i know this because i've tried to
    connect to the database using PHP command and it's working fine.
    This is how i've defined my web site:
    Local Info:
    Website Name: MyWebSite
    URL:
    http://localhost/MyWebSite
    Server Technology: PHP MySQL
    How do you want to work with your files during development:
    Edit and test locally(my testing server is on this computer.
    Where on your computer do you want to store your files?
    C:\wamp\www\MyWebSite
    What URL would you use to browse to the root of your site?
    http://localhost/MyWebSite
    Copy to another machine: No
    For Remote info Access i've put None.
    NB Basic Site Definition
    Please tell me where i'm getting it wrong because when i try
    to make the connection, i believe my snag is at the testing server
    but i've tried various paths.
    Connection Name: Myconn
    MySQL Server: localhost
    User: Username
    Password: mypassword
    When i try to select the database i'm getting the
    unidentified error message 404 which suggests possible causes of
    connection failure to paths etc.
    Please help me i've worked the whole week hoping for a
    breakthrough and have tried all sorts of different techniques
    suggested by others on forums and websites to no avail.
    Does dreamweaver have limitations with PHP/MySQL or is there
    something that i'm missing.
    Ramson

    RamsTheDon wrote:
    > Thanks David for the suggestions, I think i can almost
    rule the firewall out as i've disabled it, that leaves the wamp
    port.
    > How do i tell wamp5 to use port 3306? I'm kinda novice.
    I don't know. I have never used wamp5. I install Apache, PHP,
    and MySQL
    independently. A lot of the so-called "simple all-in-one
    solutions" have
    non-standard settings, so you need to ask in a wamp5 support
    area.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Need help on remote connection to mysql

    Hi all,
    I am trying to make a remote JDBC connection from a servlet running on one linux server to mySql running on another Linux Server.
    I get the following error :
    java.sql.SQLException: Cannot connect to MySQL server on <Linux_server2_IP>:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.net.ConnectException)
    I did the following on mySql on Linux-2 :-
    GRANT ALL PRIVILEGES TO myuser@<myLinux-1-IP> IDENTIFIED BY 'pwd' WITH GRANT OPTION;
    I checked the user table and it had an entry for 'myuser' with my myLinux1-IP. The entry had 'N' for all the priv fields.
    I manually updated the priv fields to 'Y' and did :
    FLUSH PRIVILEGES;
    I also added an entry to host table to see if that helped.
    I restarted my mySqld.
    None of these worked !
    I'd really appretiate your help...
    Thanks,
    Spotty8A.

    It doesn't sound like a user privilege problem... that will generally give you a USER_AUTHENTICATION_FAILED error or something along those lines. It seems more like the driver can't detect a MySQL server on the IP/port you're specifying.
    Assuming you didn't change the default port to anything different, the most likely source of the problem is your connection URL... you might double check that the IP you specified is correct.

  • I have a TC which is connected wirelessly to my router.  I would like to connect a mac in another location via ethernet to the TC.  I can't seem to get it to connect.  Am I missing something?

    I have a virgin Superhub which serves my wireless needs throughout the house.  I have a Timecapsule which connects wirelessly to the router with no issues.  I can backup my MBP over wireless easily.  I have now got another machine in a different part of the house that I would like to connect to the network.  It doesn't have wireless so ethernet is the only option.  I have a number of options 1) run cabling - not really possible  2) buy a powerline network system or 3) use the timecapsule to connect to the network/internet. 
    I like option 3 because
    (a) - I don't have to spend any more money and
    (b) - my wife wont complain about cables also see (a)
    Should using mixed wifi and ethernet clients on a timecapsule work?  if so is it a feature I can use out of the box so to speak?
    Thanks

    Should using mixed wifi and ethernet clients on a timecapsule work?  if so is it a feature I can use out of the box so to speak?
    Thanks
    No a TC cannot do what you want.. it is now in dumb stupid wireless join mode.. and it turns off the ethernet ports.. in case you want to use the TC as a wireless bridge to multiple clients which is plainly wrong.. (only airport express is allowed to do this since it has only one ethernet port).
    Welcome to Apple. (The plainly wrong above is a figment of Apple imagination.. of strict network protocols.. but unhelpful for a home device. maybe also to encourage sales of expresses.)

  • After upgrade to 10.10, can't send email (SMTP cert. error).  On previous version running on another machine, can still send find.  This new version is missing the "Usual Ports" checkbox option.  Can someone please help?

    I just upgraded to 10.10.  On the mail program, one of my accounts is having an issue sending email.  I am getting the following error message:
    The certificate for this server is invalid.
    Select a different outgoing mail server from the list below or click Try Later to leave the message in your Outbox until it can be sent.
    But on another machine running Mavericks, I can still continue to send email.  The same is try from my iPhone 5S.
    On that machine running Mavericks the SMTP is configured as SSL and for "Usual Ports" (25, 465, 587) but THIS OPTION IS MISSING ON THE NEW VERSION.  On the new version I have tried configuring the port to 25 and then 465 and 587 with no success.  I have used the Network Utility to see if my provider is blocking me -- it is not.  I have no third-party software on this machine (anti virus).  I can receive email fine.  On the new Yosemitie Mail there are new checkbox options of Automatically check my settings and Allow unsecure connections.  I tried to uncheck SSL for SMTP but then it says it cannot send securely my passowrd and i need to check the option "Allow to send unsecurely".  I did that but the same error message keeps appearing.  So I have tried nearly everything I have been able to, all to no avail.  Please can somebody help?

    Thanks for your reply.  Yes, it is a POP account.  Incoming mail is fine.  My port for incoming is also 110.  But the outgoing port should be 587 (or 24, 465 and 587 as on Mavericks' "Usual Ports" option).  I am using the same configuration across three different devices and only the machine running Yosemite is having issues.  I notice in the new version of Mail there is no longer the "Usual Ports" option.  I am not sure this is the culprit or not.  But the fact is no matter how I configure it, it will not send mail for these particular servers.  I have multiple clients and only one is affected, meaning I can send email from other email addresses (different hosting contracts) on Yosemite but on this one particular one I cannot. 

Maybe you are looking for

  • Acrobat 9 Standard: Field fonts and size

    In several fields on a form, data that is entered is not going to the top of the field. There is a significant gap between text and top of field which is wasting space that i need for the multi-line field. Not sure if it matters ( I am new to Acrobat

  • Samsung TV automatic detection of MacBook

    I have a MacBook (Late 2009) and connect it to my TV via the DVI output and a HDMI cable. I would like to connect it when closed and use the TV as a monitor, using my iphone to access the computer. The problem is, when I connect the cables to my MacB

  • Switching to premiere pro

    Hi,   This is panna from Hyderabad(india),i am a film director,i am completing my production work,working with red epic,now looking to edit my film in premeire,i looked out many post-production studios but all of the studios are working with fcp n av

  • EVB and Date/Time

    I'm trying to add a new record to an oracle lite database on my pocket pc. I'm getting an error assigned a date to the value of the date field in my table. lrs_rs.Fields("TEMP_DATE").Value = CDate(tempDate) Can anyone find anything wrong with this, o

  • Rman and dataguard standby

    I have a physical standby and was using rman to manage the deletion of archive logs. I changed the retention policy on the primary because of some disk space issues. When I tried to do the same on the standby it was unhappy: RMAN> CONFIGURE RETENTION