Jump to content

rohanawaw

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by rohanawaw

  1. hello please reactive my account email:rajeshawaw@gmail.com username:rajesha1 server tommy java
  2. backup database from mysql command line</p> mysqldump.exe -h ricky.heliohost.org -P 3306 -u user -p pass database dbname >g:/backup.sql give access denied for user for % % % %
  3. now javax.servlet.ServletException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. my code <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.sql.*"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Insert title here</title></head><body><%boolean ok=false; String req_pass=request.getParameter("pass"); String req_motherboard_id=request.getParameter("mot_id"); String req_cpu_id=request.getParameter("cpu_id"); String req_mac_id=request.getParameter("mac_id"); // String ProductNamez=request.getParameter("ProductName"); Connection conn=null; Statement st=null; ResultSet rs=null;try{ Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/rajesha1_password","rajesha1_azhar", "pass"); st=conn.createStatement(); rs = st.executeQuery("SELECT * FROM machineid WHERE pass = '"+ req_pass +"' "); while(rs.next()){ if(rs.getString(3).equals(req_mac_id)) { } if(rs.getString(2).equals(req_cpu_id)) { } if(rs.getString(1).equals(req_motherboard_id)) { ok=true; } } //rs.close(); // st.close(); // conn.close(); }catch(Exception e){out.println(e.getMessage()) ;} %> <%if(!ok){ // String ProductNamez=request.getParameter("ProductName");try{ Class.forName("com.mysql.jdbc.Driver").newInstance(); st=conn.createStatement();conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/rajesha1_password","rajesha1_azhar", "pass"); rs = st.executeQuery("SELECT count(*) FROM machineid WHERE pass = '"+req_pass +"' "); while(rs.next()){ int h= rs.getInt(1); if(h<5) { String sql = "INSERT INTO machineid " + "VALUES ('"+req_motherboard_id+"', '"+req_cpu_id+"', '"+req_mac_id+"','"+req_pass+"')"; int rsu = st.executeUpdate(sql); } } //PrintWriter output = response.getWriter(); out.println("yes"); //String no="no"; //respose.send("yes");} catch(Exception e) { out.println(e.getMessage()); } }else{String no="no";out.println("no"); rs.close(); st.close(); conn.close(); } out.println("yes"); %></body></html> operation not allow after resultset close
  4. now javax.servlet.ServletException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. i guess the same old problem of not closing the connectio in database rs.close(); st.close(); conn.close(); where to put these lines exactly
  5. all preveliges are given, user assign to database solved database name was wrong _ instead of __
  6. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'rajesha1_azhar'@'localhost' to database 'rajesha1__password' with this code Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/rajesha1__password","rajesha1_azhar", "pass"); working fine on my machine
  7. deployment pending taking hour or so today. if its going to take long , please deploy my war user rajesha1 war machine_id
  8. LOAD DATA LOCAL INLINE LOCAL was missing this method inserted 10 million rows in just 15 sec
  9. can i use load inline query String sql= "LOAD DATA INFILE"+" 'f:/data4.txt'" +"INTO TABLE survey "+ " FIELDS TERMINATED BY ',' "+ " ENCLOSED BY '\"'"+ "LINES TERMINATED BY '\\r\\n'"+ "IGNORE 1 LINES"; statement.execute(sql); from java with remote . currently iam doing this it giving me error access denied
  10. i want to upload and import .sql file from jsp how to do it like mysql -user -pass dbname <file.sql from jsp
  11. problem solved with permission and path /home1/rajesha1/file1/gg.txt
  12. i created a folder file1 in home directory but String strPath = "/file1/testoutputaws.txt"; now gives java.io.IOException: No such file or directory
  13. in jsp String strPath = "/home1/rajesha1/file.txt"; File strFile = new File(strPath); boolean fileCreated = strFile.createNewFile(); //File appending Writer objWriter = new BufferedWriter(new FileWriter(strFile)); java.io.FileNotFoundException: /home1/rajesha1/file.txt (Permission denied)
  14. static final String DBDriver ="com.mysql.jdbc.Driver"; static final String strConn ="jdbc:mysql://localhost:3306/rajesha1_onlinebooks"; static final String DBusername="rajesha1_food"; static final String DBpassword="**********"; iam connecting in java to mysql is that ok
  15. rajeshawaw@gmail.com my account is suspended on tommy for not loged in please active it
  16. this is just the same if u have java enabled on ur linux system
  17. can u run http://rajesha1.heliohost.org/jnlprt/Test.jnlp on ur linux system download the jnlp file and run it javaws Test.jnlp and post me the image of result jframe
  18. Username:rajesha1 war file:FINTECH-PROJECTS Deploy war file
  19. Username:rajesha1 war file:FINTECH-PROJECTS
  20. deploy my new war file username: rajesha1 war file name:FINTECH-PROJECTS.war
  21. deploy my new war file username: rajesha1 war file name:FINTECH-PROJECTS.war
  22. deploy my new war file username: rajesha1 war file name:FINTECH-PROJECTS.war
  23. is this the correct path iam using ..\home\rajesha1\stories\post.jpg so in this way of relative path i can get access to my user directory is this confirmed (dont bother about slashes,tell me the relative path is correct or not )
  24. java.io.FileNotFoundException: ..\home\rajesha1\stories\post.jpg (No such file or directory) how to get access to my user directory, what is the full path
  25. there are lots of places where connection is closed after the query only 2 or 3 places are there where connection is not closed at rajesha1_food connection is closed after the query there are other error which i need to see before uploading new war file iam from india, so i have to wait for ur reply for night i dont know if ur still awake its still giving maxconnection error just open the connection today or if u somehow close the connection how can i open it from my cpanel
×
×
  • Create New...