Menu

throw exception when registering new user

Help
newcomer
2005-04-21
2013-04-23
  • newcomer

    newcomer - 2005-04-21

    I got the following error when registering new user.

    "java.sql.SQLException: Cannot connect to MySQL server on localhost:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.net.ConnectException)"

    It seems that there is some problem when the javascript page connect to mysql db.  I could connect to the osms db through "mysql -u root -p -h localhost -P 3306" without any problem.  Please help me figure out this problem.

    Thanks.

     
    • newcomer

      newcomer - 2005-04-21

      i'm using mysql server 4.1.

       
    • chris mollis

      chris mollis - 2005-04-21

      My guess would be that the db create user script (mySQL_openIPMP_create_users.sql) that creates the db users was not run, or did not complete successfully. Try this...with mysql running, get to a command prompt on the machine mysql is running on and try to login to mysql with: 
      mysql -u osms -popenipmp

      This will likely fail with a similar error message that appeared in the log, so log into mysql as root: 
      mysql -u root -p<replace_this_with_root_password> or if you did not specify a root password when you installed mysql, use: mysql -u root 

      and then run the following commands (one at a time and hit enter after each one):
      GRANT ALL PRIVILEGES ON OSMS.* TO osms@localhost IDENTIFIED BY 'openipmp' WITH GRANT OPTION; 
      GRANT ALL PRIVILEGES ON OSMS.* TO osms@127.0.0.1 IDENTIFIED BY 'openipmp' WITH GRANT OPTION; 
      GRANT ALL PRIVILEGES ON OSMS.* TO osms@"%"; IDENTIFIED BY 'openipmp' WITH GRANT OPTION; 

      This will recreate the required openipmp user accounts with apprpriate privileges within mysql. After completing this successfully test that you can log in as osms...logout of mysql as root and login to mysql with: 
      mysql -u osms -popenipmp

      If this works successfully, you should be able to start OpenIPMP again without encountering this problem.

       
    • newcomer

      newcomer - 2005-04-22

      I can successfully login to mysql by command prompt with "mysql -u osms -popenipmp".  However, this time I got the following error.  I'm using JDK 1.4.1 and MySQL 4.1.8-nt-max.  Any idea what's the problem?

      java.lang.Exception: osmsDatabaseBase.getUsersByUserName()java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306? java.lang.NullPointerException

       
    • chris mollis

      chris mollis - 2005-04-25

      try the 4.0x version of MySQL.. my sense is that the driver that we ship with the app server is not able to connect over the 4.1 protocol..

       

Log in to post a comment.