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.

Similar Messages

  • Need helps for remote connection issue

    Dear guys,
    Today, I got a problem regarding remote connections. My Oracle stopped responding to remote connections. (tried to connect by sqlplus with service name, and sqlplus hung) Tnsping works. Local connection works (tried to connect by sqlplus without service name).
    Have to stutdown by sqlplus and oracle did not respond. Shutdown the server (windows server 2003 standard edition), system stop responding (guess it was caused by oracle service). Had to shutdown by pushing the power button. After it restarts, everything come back to normal. No error is logged in alert log.
    Any ideas regarding this issue? Many thanks.
    G.B.
    Still studying this issue. Found an SQLNET.log in the %ORACLE_HOM%/NETWORK/LOG fould. It reads:
    Fatal NI connect error 12638, connecting to:
    (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    VERSION INFORMATION:
         TNS for 32-bit Windows: Version 10.1.0.2.0 - Production
         Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.1.0.2.0 - Production
    Time: 06-APR-2006 10:43:52
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12638
    TNS-12638: Credential retrieval failed
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    Seems it's related to authentication service issue. So, I just commented out SQLNET.AUTHENTICATION_SERVICES= (NTS) from sqlnet.ora even my database functions well after restart. But I'm not sure if this is the solution and still wondering what's the root cause of this error.
    Message was edited by:
    G.B.Q.

    Hi there!
    Modify the following entry in sqlnet.ora
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    to
    SQLNET.AUTHENTICATION_SERVICES= (beq,none)
    and you will be fine,
    Regards,
    Jay Munshi
    http://jaydba.tripod.com

  • Hi! I need help, today I connected my mac Book Air to a tv for a presentation and as soon as I conected it the image on my screen went bigger. And I cant find the way to put it back as it was before. The Images are too big! heelp

    Hi! I need help, today I connected my mac Book Air to a tv for a presentation and as soon as I conected it the image on my screen went bigger. And I cant find the way to put it back as it was before. The Images are too big! heelp

    Morning DeeHutton,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at this article:
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/ts2802
    Best of luck,
    Mario

  • I need help configuring a connection with asdm 5.2 for asa

    Hi All
    I am very much a novice with asdm 5.2 for asa and I urgently need to configure a connection but don’t know how to. I have 2 domains at work and someone is trying to connect their sql client from their pc in one domain to the sql server in the other domain (DMZ).
    When he tries to connect he gets the error
    Cant connect to MySql Server at "IP Address" (10060)
    He is trying to connect on port 3306. Could anyone please give me any tips on how i can resolve this quickly? I know i am
    trying a shortcut on this one but I recently started a new job and thrown in the deep end here and need to learn this asdm 5.2 for asa product from scratch with nothing more than the manual that come with the cd . My Cisco knowledge is from 2001 when i did half of a ccna course.
    Any help would be greatly appreciated

    Hi,
    I'm not a security specialist but here is how I had it set up at home:
    Essentially a NAT and a rule forwarding the port are needed. In this particular case I had an Oracle server running and a person requested remote access. So, for example, the source address was his external IP and the destination was the Oracle's external IP. For the NAT the source was the internal IP of the Oracle server and the interface was Outside.
    Hope this points you in the right direction.

  • Remote connection to MySQL

    I am trying in Java to connect remotely to a database and use the following code:
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    import java.sql.*;
    public class Test {
    public static void main(String args[]) {
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance ();
    con = DriverManager.getConnection("jdbc:mysql://llsti.org:3306/universalaccess?user=*****&password=****");
    if(!con.isClosed())
    System.out.println("Successfully connected to " +
    "MySQL server using TCP/IP...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    But it doesnt do anything.. it compiles properly but then it just stuck in getConnection(). it doesnt print thereafter.
    Any suggestion would be of great help.
    Thanks,
    Akhil

    Hi,
    So what network settings I am suppose to perform? I
    would be really greatful for any more suggestions.
    I cannot put this really any clearer because it's been told to you before. You are getting a 2003 error. This is what the MySQL site has to say about that error.
    The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, the network port you specified is the one configured on the server, and that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.
    Please talk to your local network administrator and/or the administrator of the MySQL database for assistance. Either the database is not listening on that port or there is a firewall blocking your access either at your end or at the server end.
    This is NOT a Java problem. You cannot connect using any other tool to this database.

  • I need help I cant connect on wifi just "unable to join the network"

    I have problem to my WiFi connection
    I cant connect on WiFi home
    and i have MSG unable to join the network
    but my Iphone this is old iPhone 3
    I need help how can I fix it and i don't know if my phone or the router the problem.
    Pls help give me a easy answer and how i solve it.

    Hello, thanks for your answer, I try that reset, nothing change but my WiFi router when I off it my WiFi it is back after a minute my WiFi it doesn't  work again. I think my router WiFi is the problem because I try everything apple community they suggestion still not working.

  • I need help I can connect my printer to my router to use my printers with my mini I pad

    I need help I have been trying for hours to connect my new e printer to my router ,to use with my ipad mini

    Hi,
    The simplest way to print wirelessly from your ipad is to download the HP eprint app and ensure that both your printer and device are connected to the same wifi network - once this is complete, you'll be bale to print wirelessly from within the eprint app.
    Alternatively, you can use the wireless direct funtion of your printer by turining on the wireless button on the front of the printer. This allows the printer generate it's own wifi singal that you can connect to through any wireless device. To find the wireless password, simply hold down the wireless direct button for more than 3 secs and it will print the password on plain paper (make sure paper is loaded).
    "Although I work for HP, I'm speaking for myself and not on behalf of HP"
    "Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

  • Plz help me--error connecting to MySQL server

    While trying to connect to the MySQL server database,
    SqlConn = DriverManager.getConnection("jdbc:mysql://" + "database_server_addr/database_name?user=kiosk&password=!xyzabc");
    I get the following error.
    Error while connecting to mysql
    Communication link failure: null
    Notice the ! symbol(exclamation mark) present in the connection string above for the password value i.e., !xyzabc
    Is the problem with the ! symbol in my password, coz I am able to connect
    if I changed my password omitting the ! symbol. But I would like to connect with the ! symbol in the password. Any quick help is appreciated.
    Thanks,
    Bussa.
    [email protected]

    specify the database Server address, you can't do it with the "HTTP URL"
    String url = "jdbc:mysql://xxx.xxx.xxx.xxx";
    Class.forName("mySql spec");
    Connection con = DriverManager.getConnection(url,"user", "pass");

  • Need help with iphone4 connecting to computer

    On the weekend my friend had put her iphone4 on my computer and now wen i connect my iphone4 to my computer it keeps saying that my iphone is her iphone but its not...
    I really need help coz its doin my head in, i have uninstalled the driver and itunes and reinstalled both and it still does the same thing

    try changing the following wireless settings
    radio band - wide
    wide channel - 9
    standard channel - 11
    if this doesn't work , ensure that the router has the latest firmware ..

  • By. i need help for photoshop connective...from 2 days ave a problem of connective.thank you

    by i need help for my photoshop connective..if you ceck problem please.

    Does your Cloud subscription properly show on your account page?
    If you have more than one email, are you sure you are using the correct Adobe ID?
    https://www.adobe.com/account.html for subscriptions on your Adobe page
    If yes
    Some general information for a Cloud subscription
    Cloud programs do not use serial numbers... you log in to your paid Cloud account to download & install & activate... you MAY need to log out of the Cloud and restart your computer and log back in to the Cloud for things to work
    Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
    -Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
    -ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp
    If no
    This is an open forum, not Adobe support... you need Adobe staff to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • Need help setting up JDBC with mySQL and Netbeans

    I've successfully got mySQL up and running and created a few simple test databases. I've been following the instructions on this website (http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1 ) to get JDBC working but have had little luck.
    I've downloaded JDBC from mySQL website, extracted the mysql-connector-java-3.1.13-bin.jar file and changed the class path to :
    C:\Program Files\Java\jre1.5.0_06\lib\ext\mysql-connector-java-3.1.13-bin
    which is where I placed the .jar file.
    I then used the following code provided on stardeveloper.com to test a connection with the test database.
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class JdbcExample2 {
      public static void main(String args[]) {
        Connection con = null;
        try {
          Class.forName("com.mysql.jdbc.Driver").newInstance();
          con = DriverManager.getConnection("jdbc:mysql:///test",
            "root", "secret");
          if(!con.isClosed())
            System.out.println("Successfully connected to " +
              "MySQL server using TCP/IP...");
        } catch(Exception e) {
          System.err.println("Exception: " + e.getMessage());
        } finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
    }It compiles but when run I get the error message :
    java.lang.NoClassDefFoundError: testdatabase/JdbcExample2
    Exception in thread "main"I assume this means that my classpath isn't setup correctly but I have no idea what's up and how to correct it.
    Can someone PLEASE tell me how to setup jdbc and what I've done wrong.
    Thanks in advance :)

    Thanks for your reply. I've made some progress but I'm still having problems.
    In mySQL I created a new user called uraknai with password n0121429 and granted them access to a test database I created called pet.
    Then, in netbeans, I clicked the Runtime tab, clicked Databases and rightclicked Drivers and clicked Add Driver. I then added the driver mysql-connector-java-3.1.13-bin.jar. I then right clicked the newly added driver and selected the connect using option. I filled in the appropriate boxes clicked ok and it connected successfully.
    Then, under the project tab, I right clicked the project name, clicked properties then clicked Libraries and added the .jar file mysql-connector-java-3.1.13-bin.jar
    I then ran the following code to test the connection to the database:
    import java.sql.*;
    public class ConnectionTest {
        public ConnectionTest() {
        public static void main(String[] args)
            System.out.println("BEGIN CONNECTION TEST");
            Connection conn = null;
            try
                   String userName = "uraknai";
                   String password = "n0121429";
                   String url = "jdbc:mysql://localhost/pet";
                   Class.forName ("com.mysql.jdbc.Driver").newInstance ();
                   conn = DriverManager.getConnection (url, userName, password);
                   System.out.println ("Database connection established");
             catch (Exception e)
                   System.err.println ("Cannot connect to database server");
             finally
                   if (conn != null)
                       try
                           conn.close ();
                           System.out.println ("Database connection terminated");
                       catch (Exception e) { /* ignore close errors */ }
    }and get the message:
    java.lang.NoClassDefFoundError: math/ConnectionTest
    Exception in thread "main"
    Java Result: 1when I run the code.
    Can someone explin what I've done wrong and how to fix the problem.
    Cheers.

  • Hi I need help on URL Connection Class

    Hi
    I have read the documentation but cant get it . I have to Use the getContent(); method so can any one make a program for me in which all of the methods of this class have been used?
    I Also Need help on Content Handler Class Please give me one example on it but separate from the above one
    Thanx alot

    Hi
    Man Some Times We need help and as of google, Google is My Best Friend. and as of forums search i know that but some time we have less time and much to work. The Time Doesnt wait us. we have to save our time. thanx for ur help and ur comments i like it.

  • Need help with WRT300N connecting to a Wireless-G Adapter

    I currently purchased the WRT300N router. I have everything working and it connects to my hardwired pc and my laptop. Only problem I am running across is that I cannot get my other computer to recognise the connectino when the router is set to mixed. Now the computer will recognise the connection if I set the router to wireless - g mode only. But that defeats the purpose becaus I need the wireless-n connection for another computer that has the wireless - n adapter. Anyone know a fix for this, or maybe is havint the same problem?

    try changing the following wireless settings
    radio band - wide
    wide channel - 9
    standard channel - 11
    if this doesn't work , ensure that the router has the latest firmware ..

  • NEED HELP! can't create mysql connection in DW MX 2004

    I re-format my computer last week and after reformatting i
    install my PHP Triad and Dreamweaver MX 2004, but i can't create
    mysql connection using DW wizard, i already follow the step:
    1. create / manage site
    2. choose document type
    3. set up testing server ( i use php mysql @ localhost)
    and when i create new connection (fill the hostname,
    username, password, and select databases) it failed and show
    message "unidentified error occur".
    it never happen before (before i re format my computer).
    can anyone help me how to solve this problem.
    sorry for my bad english i came from Indonesia,
    thx before
    rgrds
    zhastro

    I re-format my computer last week and after reformatting i
    install my PHP Triad and Dreamweaver MX 2004, but i can't create
    mysql connection using DW wizard, i already follow the step:
    1. create / manage site
    2. choose document type
    3. set up testing server ( i use php mysql @ localhost)
    and when i create new connection (fill the hostname,
    username, password, and select databases) it failed and show
    message "unidentified error occur".
    it never happen before (before i re format my computer).
    can anyone help me how to solve this problem.
    sorry for my bad english i came from Indonesia,
    thx before
    rgrds
    zhastro

  • Need Help on Remote Host Screen Capture.

    hi.,
    This is KrishnaRao from Hyderabad.,Am looking for code like Spyware Functionality.We have Pc's in Network
    my host is server.am looking to run Java code which connects to another computer based on IP/System Name and capture photos from Remote host(Client).thing is i dont want to place any client file @ remote host.
    i got photo capture through java.awt.Robot class.i heard through Remote Desktop Protocol i can do
    the process which want.So first of all i need how to connect remote machine using RDP. So kindly process any code availible with Java Community.
    Code for Photo capture
    Robot robot = new Robot();
    BufferedImage bufferedImage = robot.createScreenCapture(new Rectangle(new Dimension(1024, 768)));
    File imageFile = new File("screenshot.jpeg");
    ImageIO.write(bufferedImage, "jpeg", imageFile);So kindly help out in this ..contact me via "krishnaraoveera1294(at)gmail.com"

    User GuyWIthGuts blocked for a week for spamming the same topic to 7 forums.
    The threads in the following forums are being removed:
    Abstract Window Toolkit (AWT)
    Java Applet Development
    Annotation Processing
    Generics
    Networking
    Remote Method Invocation (RMI)

Maybe you are looking for

  • Windows Search not working for Outlook 2013

    Hello, I am running Outlook 2013 under Windows7 Pro. The search within Outlook works perfect, but I am used to also get Outlook results from the Windows Search under the "Start" menu: Office documents are beeing displayed but no Outlook Mails as it u

  • How can I edit excel with my iPad?  Doesn't let me see pivot tables or drill downs...

    How can I edit excel with my iPad?  Doesn't let me see pivot tables or drill downs...

  • Upgrading ODI 11.1.1.7  Repositories to 12C

    Hi Friends, Does anybody has any clue to resolve the below error? This error comes at the time of calling ua.bat (12 C ) in CMD. I am trying my best to resolve this but it will be really appreciated for any suggestions on this. Thanks Bhabani java.la

  • Keyboard-only navigation drives to random slides - Help!

    Hi all, This was an issue I experienced in previous Mac versions that I was able to mitigate by recreating the project in the PC version.  I've since abandoned the Mac version.  However, we recently upgraded to Captivate 8 and it now looks like the i

  • About amx:verbatim

    Hello all, I'm currently trying to use the amx:verbatim tag to embed arbitrary HTML in my amx page. Here is my code: <?xml version="1.0" encoding="UTF-8" ?> <amx:view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amx="http://xmlns.oracl