Connection to MySQL Database Failed pwadmin and iweb

Results 1 to 7 of 7
  1. #1
    Apprentice Mazinho Oo is offline
    MemberRank
    Oct 2013 Join Date
    5Posts

    sad Connection to MySQL Database Failed pwadmin and iweb

    Connection to MySQL Database Failed please help in iweb and pwadmin


  2. #2
    Apprentice Mazinho Oo is offline
    MemberRank
    Oct 2013 Join Date
    5Posts

    Re: Connection to MySQL Database Failed pwadmin and iweb

    Quote Originally Posted by Mazinho Oo View Post
    Connection to MySQL Database Failed please help in iweb and pwadmin
    (iweb)

    <%@page import="java.io.*"%>
    <%
    //-------------------------------------------------------------------------------------------------------------------------
    //------------------------------- SETTINGS --------------------------------------------------------------------------------
    //-------------------------------------------------------------------------------------------------------------------------

    // connection settings to the mysql pw database
    String db_host = "192.168.1.101";
    String db_port = "3306";
    String db_user = "root";
    String db_password = "mazinho";
    String db_database = "pw";

    String item_labels = "pwi";
    String pw_auth_path = "/PWServer/authd/";
    String pw_logs_path = "/PWServer/logs";
    String pw_server_path = "/PWServer/";
    boolean enable_character_list = true;

    String pw_server_name = "YanYU";
    String pw_server_description = "+ Info<br>+ 2 x 2.4 GHz, 2048 MB RAM, 100 MBit LAN";
    %>







    --------------------------------------------------------------

    ____________iweb.png

    (pwadmin)
    <%@page import="java.io.*"%>

    <%
    //-------------------------------------------------------------------------------------------------------------------------
    //------------------------------- SETTINGS --------------------------------------------------------------------------------
    //-------------------------------------------------------------------------------------------------------------------------

    // pwadmin access password as md5 encrypted string
    // default password is wargames -> d32509439c6c165b930fd65cb2dfe50b
    String iweb_password = "d32509439c6c165b930fd65cb2dfe50b";

    // connection settings to the mysql pw database
    String db_host = "localhost";
    String db_port = "3306";
    String db_user = "root";
    String db_password = "mazinho";
    String db_database = "pw";

    // Type of your items database required for mapping id's to names
    // Options are my or pwi
    String item_labels = "pwi";

    // Absolute path to your PW-Server main directory (startscript, stopscript, /gamed)
    // requires a tailing slash
    String pw_server_path = "/PWServer/";

    // If you have hundreds of characters or heavy web acces through this site
    // It is recommend to turn the realtime character list feature off (false)
    // to prevent server from overload injected by character list generation
    boolean enable_character_list = true;

    String pw_server_name = "PERFECT WORLD WAR";
    String pw_server_description = "+ Descricao do Servidor :<br>+ VBOX CPU + 1 x 2.5 GHz, 2048 MB RAM, 100 MBit LAN<br>+ Todas as Dungeons Abertas<br>+ Armas do Nirvana do Tideborn<br>+ Saliencias do mundo";

    //-------------------------------------------------------------------------------------------------------------------------
    //----------------------------- END SETTINGS ------------------------------------------------------------------------------
    //-------------------------------------------------------------------------------------------------------------------------

    String pw_server_exp = "?";
    String pw_server_sp = "?";
    String pw_server_drop = "?";
    String pw_server_coins = "?";

    BufferedReader bfr = new BufferedReader(new FileReader(pw_server_path + "gamed/ptemplate.conf"));

    String row;
    while((row = bfr.readLine()) != null)
    {
    row = row.replaceAll("\\s", "");
    if(row.indexOf("exp_bonus=") != -1)
    {
    int pos = row.length();
    if(row.indexOf("#") != -1)
    {
    pos = row.indexOf("#");
    }
    pw_server_exp = row.substring(10, pos);
    }
    if(row.indexOf("sp_bonus=") != -1)
    {
    int pos = row.length();
    if(row.indexOf("#") != -1)
    {
    pos = row.indexOf("#");
    }
    pw_server_sp = row.substring(9, pos);
    }
    if(row.indexOf("drop_bonus=") != -1)
    {
    int pos = row.length();
    if(row.indexOf("#") != -1)
    {
    pos = row.indexOf("#");
    }
    pw_server_drop = row.substring(11, pos);
    }
    if(row.indexOf("money_bonus=") != -1)
    {
    int pos = row.length();
    if(row.indexOf("#") != -1)
    {
    pos = row.indexOf("#");
    }
    pw_server_coins = row.substring(12, pos);
    }
    }

    bfr.close();

    if(request.getSession().getAttribute("items") == null)
    {
    String[] items = new String[60001];

    try
    {
    bfr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(request.getRealPath("/include/items") + "/default.dat")), "UTF8"));
    if(item_labels.compareTo("my") == 0)
    {
    bfr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(request.getRealPath("/include/items") + "/my.dat")), "UTF8"));
    }
    if(item_labels.compareTo("pwi") == 0)
    {
    bfr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(request.getRealPath("/include/items") + "/pwi.dat")), "UTF8"));
    }
    int count = 0;
    while((row = bfr.readLine()) != null && count < 60001)
    {
    items[count] = row;
    count++;
    }
    bfr.close();
    }
    catch(Exception e)
    {
    }

    request.getSession().setAttribute("items", items);
    }
    %>
    ___________________________________________________________________________

  3. #3
    Enthusiast Niallvsfood is offline
    MemberRank
    Nov 2012 Join Date
    HamiltonLocation
    45Posts

    Re: Connection to MySQL Database Failed pwadmin and iweb

    Change String db_host = "192.168.1.101"; to String db_host = "localhost";

  4. #4
    Apprentice Mazinho Oo is offline
    MemberRank
    Oct 2013 Join Date
    5Posts

    Re: Connection to MySQL Database Failed pwadmin and iweb

    controle.pngpwadminchas.pngpwadminconta.pngstato.pngthe pwadmin be wellghgfhgh.png
    Last edited by Mazinho Oo; 27-10-13 at 02:36 AM.

  5. #5
    Apprentice Mazinho Oo is offline
    MemberRank
    Oct 2013 Join Date
    5Posts

    Re: Connection to MySQL Database Failed pwadmin and iweb

    ghgfhgh.pngssss.png

  6. #6
    Novice techfreaktwo is offline
    MemberRank
    May 2013 Join Date
    1Posts

    Re: Connection to MySQL Database Failed pwadmin and iweb

    I'm experiencing similar problems but I can read from the database I am just unable to write new entries, I have checked the permissions in phpmyadmin and checked file permissions in the file system. Any Ideas?

  7. #7
    Account Upgraded | Title Enabled! norman1234 is offline
    MemberRank
    May 2009 Join Date
    303Posts

    Re: Connection to MySQL Database Failed pwadmin and iweb

    Quote Originally Posted by techfreaktwo View Post
    I'm experiencing similar problems but I can read from the database I am just unable to write new entries, I have checked the permissions in phpmyadmin and checked file permissions in the file system. Any Ideas?
    ive had the same issue.. it took me days to figure it out... search the forum for a new database.. its called dbo.sql delete the database in phpmyadmin and replace using the new one... that will allow you to write new entries... most the 1.4.6 ive tried has had bad databases and authds and gdelievery... but id recommend using the console to start the server before using pwadmin as pwadmin showed everything working fine but console showed the errors.



Advertisement