Moving a mySQL database

Hi,
after a mySQL database is created and filled with data, can it be moved to a different machine? E.g., from 1 PC to another. Is it something like a big file that can be saved to a disk or ftp'ed?
P.S. Regardless of the answer, does the same apply to any other kind of DB, such as Oracle, etc?
Thank you so much in advance,
Reshat.

COPY FULL DATABASE:
Oracle:
if you want to move complete database on another server's empty database, take a backup and restore it on another server.
SQL Server:
Thse same works for SQLServer.
MOVE PART OF THE DATA:
Orcale:
Export into a flat file and load on the the other database.
SqlServer:
Use DTS Wizard.

Similar Messages

  • Strange problem with MySQL database

    Hello,
    I'm totally puzzled by a strange error occurring with PHP/MySQL on my website... I hope someone has got an idea of what's going on and can let me know.
    In short, I have a MySQL database set up on the remote server where the website is hosted. Some pages of my website access this database with PHP.
    If the website is viewed with a browser in Windows (Firefox), it works well, the database data appear on the pages.
    If the website is viewed with a browser on Mac OS (Firefox, Safari), it doesn't work: the database isn't accessed, I get no error, just everything on the page below my PHP code is missing.
    I've attached two screenshots to show this. The website URL is: http://www.cerc.co.uk/CERC/v02/
    The pages were this occurs are: the home page (index.php and alternative index2.php), the Abous us/News page and the About us/News/Archives page.
    I really don't get where my mistake is. I would like to keep the remote server connexion details outside the root folder, but I guess that if there is no solution to this problem, then I'll have to move it back (I think it might have worked like that).
    Thanks in advance for any comment,
    Emilie
    More details
    I'm using DW CS4 on Windows XP emulated via VMware on Mac OS 10.5 (don't ask why, I wasn't given any choice). I've set up a localhost server on XP via XAMP and the news database is also there.
    Because I'm currently flipping often between the testing server and the remote server, I quickly got fed up to change all the time the connexion mode to the database (localhost or remote server) and have to resynchronise the files each time. Hence I decided to automate a bit the way the database is connected to.
    1. These 4 HTML pages with PHP code have got the below two lines when the PHP code starts:
    $pathpfx = "../.."; // see mysqlconnexion.php
    include('assets_design/php/mysqlconnexion.php');
    2. mysqlconnexion.php (see code below) calls a "connexion" file (in PHP) depending on the value of one parameter ($conxchoice). If $conxchoice = 1, the "connexion" file on the localhost is called. If $conxchoice = 2, the "connexion" file on the remote server is called. I've stored the appropriate version of mysqlconnexion.php on the localhost and the remote server (and I have checked it a million of times, they're in the right place).
    <?php
    // This code is called by and therefore included in the code of some PHP pages,
    // independently of where the pages are located within the website folder.
    // - Connexion to local server: I couldn't get the function include_once to work
    //   with a relative path, hence the use of an absolute path.
    // - Connexion to host server: I couldn't get the function include_once to work
    //   with an absolute path, hence the use of a relative path. This leads to the
    //   following problem: the path of conxsrv.php needs to be adapted to the
    //   position of the calling PHP page within the website, in order for
    //   conxsrv.php to be found on the server (it is located outside the website
    //   root folder). The variable $pathpfx is used for this purpose.
    $conxchoice = 2; // connect to 1 = testing server, 2 = host server
    // Connexion to database
    if ( $conxchoice == 1 )
    { include_once('C:\xampp\htdocs\CERC\assets_testing_server_only\conxloc.php'); }
    if ( $conxchoice == 2 )
    { include_once("$pathpfx/cgi-bin/sqlconx/conxsrv.php"); }
    ?>
    I would guess that a first hint of solution lies in the comment block, but I've really tried everything I could think of to work with relative path/absolute path respectively, unsuccessfully.
    3. The "connexion" file looks like:
    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_conx = "aaa";
    $database_conx = "bbb";
    $username_conx = "ccc";
    $password_conx = "ddd";
    $conx = mysql_pconnect($hostname_conx, $username_conx, $password_conx) or trigger_error(mysql_error(),E_USER_ERROR);
    ?>
    With aaa, bbb, ccc and ddd the appropriate value depending on the file. The # lines were introduced by DW when these files were created (I've then changed the variable names and moved the files to another place).
    Screenshots

    Well, my question has actually not been answered yet but the problem, as strangely as it appeared, has now disappeared. Best but scariest of all, I didn't do anything. Weird.
    Hope it never comes back,
    Emilie

  • Using two MySQL databases at once

    I have a situation where one PHP page needs to access two
    MySQL databases
    for different functions (it's in integration thing). I don't
    think I can
    combine the databases because two different programs are set
    up and using
    them separately. Is there a way to do this without PHP
    getting as confused
    as it's getting? Obviously I'm no MySQL and PHP expert.....
    Mad Dog

    David Powers wrote:
    > Mad Dog wrote:
    >> That's the problem, both of these are programs that
    automatically
    >> set up their own MySQL databases and make the
    connections (Wordpress
    >> and EasyPHPCalendar), so it's not so easy to control
    the
    >> connections. Each works fine, but if I call the
    calendar from within
    >> Wordpress, it doesn't know to switch to another
    connection and gets
    >> all confused.
    >
    > It sounds as though one or both of those applications
    has been badly
    > set up (although not necessarily by you - it's more
    likely the way it
    > has been designed).
    >
    > Most programs, including Dreamweaver, use the original
    MySQL extension
    > within PHP to connect to MySQL. Specifying which
    connection to use is
    > optional with the original MySQL extension; if no
    connection is
    > specified, PHP uses whichever was opened last. To use
    two separate
    > connections, the correct connection must be specified.
    Dreamweaver
    > does this automatically. You need to look at the PHP
    code in
    > WordPress and EasyPHPCalender to see if either of them
    specifies the
    > connection. The easy way to tell is by looking at any
    line containing
    > mysql_query(). If it contains two arguments, the
    connection is being
    > properly specified. If it contains just one, that's the
    program
    > that's causing the problem.
    I think I've got it. There might be other tweaks needed, but
    I moved the
    EasyPHPCalendar table into the same database as the Wordpress
    table. With
    luck (I'll know tomorrow when I mess with it) that should cut
    the confusion
    factor!
    Thanks,
    MD

  • MySQL - Database location with space

    Hello,
    I accidentally used a database path with a space in it. I have been able to rename the volume path, but I am still having a problem with MySQL starting up.
    The Service Log has the following:
    101013 8:49:11 [Warning] Can't create test file /Volumes/SEG RD1/ServiceData/MySQL/seg1.lower-test
    101013 8:49:11 [Warning] Can't create test file /Volumes/SEG RD1/ServiceData/MySQL/seg1.lower-test /usr/libexec/mysqld: Can't change dir to '/Volumes/SEG RD1/ServiceData/MySQL/' (Errcode: 2)
    101013 8:49:11 [ERROR] Aborting
    101013 8:49:11 [Note] /usr/libexec/mysqld: Shutdown complete
    The "SEG RD1" volume is now "SEG-RD1". I cannot find the script that is trying to create the file mentioned so that it may also be updated. I have checked the com.apple.MySQLService.plist file and /etc/my.cnf file.
    Any help would be greatly appreciated.

    For reference, I talked to Apple Care and we did the following:
    1) Moved the MySQL folder referenced in Server Admin to the Trash.
    2) Trashed the preference file in /Library/Preferences/com.apple.MySQLService.plist
    3) Ran Disk Utility and did a repair of permissions on the boot volume.
    4) Rebooted server
    5) Opened Server Admin and selected MySQL. (ignore error messages [2])
    6) In Settings, browsed and created new folder for MySQL data. Save.
    MySQL at this point appears to be working in both logs. Server Admin had all the Settings for MySQL grayed out. So, I used the CLI to set password, add network connections as stated in the Web Technologies Administration manual. After performing the steps, The MySQL service in Server Admin was operating normally. Status reflected the correct state, Settings was editable.
    Hope this helps anyone else that runs into this problem. It should be noted that all the data was lost, but since this appears in other posts to be an initial setup problem, I had no data to lose.

  • Transferring DB2 JDBC Calls to MySQL Database

    I am working on J2EE technology and the DB Tier for it is on IBM DB2. At offshore we are setting up the database as MySQL and not DB2. How should I implement this so that without changing any part of the existing application code, all the JDBC calls meant for DB2 is directed to MySQL database. What
    (The same code has to be moved to Client Side Server so I am very much reluctant to change the code for beans.) The application is developed on Websphere IDE
    Thanks In Advance
    KK
    The greatest thing since the creation of the world,except for the incarnation and death of Him who created it,is the discovery of the Indies. -- Francisco Lopez De Gomara
    ****************************

    Hi,
    I do not know how have you implemented your application.I guess that the most correct thing is to define a datasource in your application server and access it from there. If you have hardcoded the database connection settings then you cannot avoid the changes.
    Kiros

  • Connecting to a Mysql database using CF Administrator and DW

    I can't create a mysql datasource in CF Administrator.
    If I use the following datasource settings in CF
    Administrator:
    JDBC URL: jdbc:mysql://localhost:3306/test
    Drive Class: MySQL Connector J
    AND (note the emphasis) I set my local and remote folders in
    my DW site local folder, remote folder and testing server folders
    all to C:\CFusionMX\db\, I can connect to my mysql database in CF
    Administrator.
    However, with these DW site folder settings, DW doesn't
    recognize any databases (Access or Mysql) at all.
    When I change my DW site folder settings to 'wwwroot'
    (e.g.local folder C:\CFusionMX\db\' is changed to
    'C:\CFusionMX\wwwroot') DW now lists all my CF Administrator
    databases.
    The problem is CF Administrator can't connect to my Mysql
    data sources. It gives me the error:
    "Connection verification failed for data source: javaserver
    []java.sql.SQLException: SQLException occurred in JDBCPool
    while attempting to connect, please check your username, password,
    URL, and other connectivity info.
    The root cause was that: java.sql.SQLException: SQLException
    occurred in JDBCPool while attempting to connect, please check your
    username, password, URL, and other connectivity info"
    I've tried changing the 3306 port to 8500, but this doesn't
    help.
    My java path and connector file is:
    C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar,
    Is this a ID/password problem? I've tried both 'root' and
    leaving the ID field in the CF Administrator add data source block,
    both to no avail. I don't have a password set in Mysql for 'root'
    either.
    Any help would be gratefully appreciated. I've been working
    on this for weeks and keep running into one problem after another.
    Thanks a million in advance.
    Sincerely,
    Graham A. Kerby

    1) ensure mysql server is running
    2) there are numerous tutorials for mysql installation out
    there
    3) there are good free mysql admin tools out there
    4) use both the above to verify your mysql installation is
    correct
    5) please tell me you do have your zonealarm DISABLED
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Connecting to a Mysql database using a ColdFusion server

    can't create a mysql datasource in CF Administrator.
    If I use the following datasource settings in CF
    Administrator:
    JDBC URL: jdbc:mysql://localhost:3306/test
    Drive Class: MySQL Connector J
    AND (note the emphasis) I set my local and remote folders in
    my DW site local folder, remote folder and testing server folders
    all to C:\CFusionMX\db\, I can connect to my mysql database in CF
    Administrator.
    However, with these DW site folder settings, DW doesn't
    recognize any databases (Access or Mysql) at all.
    When I change my DW site folder settings to 'wwwroot'
    (e.g.local folder C:\CFusionMX\db\' is changed to
    'C:\CFusionMX\wwwroot') DW now lists all my CF Administrator
    databases.
    The problem is CF Administrator can't connect to my Mysql
    data sources. It gives me the error:
    "Connection verification failed for data source: javaserver
    []java.sql.SQLException: SQLException occurred in JDBCPool
    while attempting to connect, please check your username, password,
    URL, and other connectivity info.
    The root cause was that: java.sql.SQLException: SQLException
    occurred in JDBCPool while attempting to connect, please check your
    username, password, URL, and other connectivity info"
    I've tried changing the 3306 port to 8500, but this doesn't
    help.
    My java path and connector file is:
    C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar,
    Is this a ID/password problem? I've tried both 'root' and
    leaving the ID field in the CF Administrator add data source block,
    both to no avail. I don't have a password set in Mysql for 'root'
    either.
    Any help would be gratefully appreciated. I've been working
    on this for weeks and keep running into one problem after another.
    Thanks a million in advance.
    Sincerely,
    Graham A. Kerby

    If it were me I would use the MySQL JDBC driver and not ODBC. Then DSN versus not-DSN wouldn't be an issue.

  • Can't connect a servlet to a mysql database (jdbc)

    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class LoginServletJDBC extends HttpServlet{
         public void doGet(HttpServletRequest request,HttpServletResponse response)
         throws ServletException,IOException{
              sendLoginForm(response,false);     }
         public void sendLoginForm(HttpServletResponse response,boolean error)
         throws ServletException,IOException{
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("<html><head>");
              out.println("<title>Login</title>");
              out.println("</head>");
              out.println("<body>");
              out.println("<center>");
              if(error)
                   out.println("<b>Failed login. Please try again</b>");
              out.println("<br><br>");
              out.println("<h2>Login page</h2>");
              out.println("<br>Please enter your username and password");
              out.println("<br><br>");
              out.println("<form method=post>");
              out.println("<table>");
              out.println("<tr>");
              out.println("<td>Username : </td>");
              out.println("<td><input type=text name=userName></td>");
              out.println("</tr>");
              out.println("<tr>");
              out.println("<td>Password : </td>");
              out.println("<td><input type=password name=password></td>");
              out.println("</tr>");
              out.println("<tr>");
              out.println("<td align=right colspan=3>");
              out.println("<input type=submit value=Login></td>");
              out.println("</tr>");
              out.println("</table>");
              out.println("</form>");
              out.println("</center>");
              out.println("</body></html>");
    public void doPost(HttpServletRequest request,HttpServletResponse response)
         throws ServletException,IOException{
              String userName = request.getParameter("userName");
              String password = request.getParameter("password");
              if(login(userName,password)){
                   RequestDispatcher rd = request.getRequestDispatcher("AnotherServlet");
                   rd.forward(request,response);
              else{
                   sendLoginForm(response,true);
         boolean login(String userName,String password){
              try{
                   String url = "jdbc:mysql://localhost:3306/Users";
                   Class.forName("com.mysql.jdbc.Driver");
                   Connection con = DriverManager.getConnection(url,"root","");
                   //System.out.println("got connection");
                   Statement s = con.createStatement();
                   String sql = "select userName from Users where userName='"+userName+"and password='"+password+"';";
                   ResultSet rs = s.executeQuery(sql);
                   if(rs.next()){
                        rs.close();
                        s.close();
                        con.close();
                        return true;
                   rs.close();
                   s.close();
                   con.close();
              catch(ClassNotFoundException e){
                   System.out.println(e.toString());
              catch(SQLException e){
                   System.out.println(e.toString());
              catch(Exception e){
                   System.out.println(e.toString());
              return false;
    }so ...
    here i'm trying to connect to Users mysql database (i use Tomcat 4.1 and mysql servers and clients 4.0.1-alpha)
    where is the problem ? when i run this servlet (http://localhost:8080/example/servlet/LoginServletJDBC ) it works ;
    BUT when i type an username and a password (any user&pass) my servlet doesn't connect to the database (become a infinite loop without output ; i mean no any errors and exceptions)
    i try other think : i changed the database with unexisting database and the result was that i was expected (Unknow database 'unexistingdatabase' )
    what i miss ?
    please... can anyone help me...
    thank`s in advance

    The wireless security setting that the Actiontec modem/router is using may be different...and not compatible....than the setting that the Comcast product was using.
    If you think that might the case, and you have the time to troubleshoot......
    Temporarily, turn off the wireless security on the Actiontec modem/router
    Reset an AirPort Express back to default settings, then see if it will connect using no security and allow an Internet connection when you do the Ethernet port test in the post above again.
    If the AirPort Express cannot connect correctly using no security on the wireless network.....then it is a no brainer to know that it will never connect when security is enabled.  So, if the AirPort will not connect using no security, you may have an incompatibility issue between the Actiontec and Apple products.
    However, if the AirPort Express connects OK with no security, then this tells you that you will need to use a different setting for security on the Actiontec...the same that the Comcast router was using before.....so the Express will have a better chance of connecting.
    That setting would be something like WPA/WPA2 Personal, or the same setting stated another way would be WPA-PSK-TKIP.

  • Access to MySql Database in the Web Service

    Hi all,
    In my j2me web service project, i want to access to MySql database in the web service and
    my installation is
    Tomcat 5.0 for Java WSDP,
    Java Web Services Developer Pack 1.5,
    MySql Server 5.0 and environment variables are adjusted...
    server.xml where is in "C:\tomcat50-jwsdp\conf" is adjusted like this
    <!-- Replace the above Realm with one of the following to get a Realm
    stored in a database and accessed via JDBC -->
    <Realm className="org.apache.catalina.realm.JDBCRealm"
         debug="99"
         driverName="com.mysql.jdbc.Driver"
         connectionURL="jdbc:mysql://localhost:3306/erendb"
         connectionName="root"
         connectionPassword=""
    />
    but i have not access to MySql database in the web service yet...
    please help...

    Hi Luis,
    If you see closely, the productID is actually a concatenation of the areaID and the productID. The reasoning here is that a product can be in multiple nodes of the product catalog and one would need to specify the product on a particular node for the direct URL to work.
    On a client site, we came up with a better solution by creating a new FM to retrieve the specific areaID and productID for a product. This FM could be called by extending the webshop. Then a .NET program was written to re-direct a shortened form of the URL to the long URL and therefore the specific product in the product catalog. Eg.: http://yyyyy.com/b2c/b2c/product would be automatically redirected to http://yyyyy.com/b2c/b2c/init.do?shop=<shop name>&areaID=<area Guid>&productID=<product Guid>, something similar to the concept behind "tinyurl.com". A point to remember here is that this would work only for the B2C webshop.
    Hope this helps.
    Cheers,
    Ashok.

  • Problem with inserting data into mySQL database with jsp

    I have a jsp page that collects infromation about a users vehicle and puts the data into a mySQL database. Iv'e been messing around with it for ages & i can't seem to get it to work even though i cannot see anything wrong with the code, which can be seen below.
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ include file="Connections/connection.jsp" %>
    <%
    // *** Restrict Access To Page: Grant or deny access to this page
    String MM_authorizedUsers="";
    String MM_authFailedURL="login_form.jsp";
    boolean MM_grantAccess=false;
    if (session.getValue("MM_Username") != null && !session.getValue("MM_Username").equals("")) {
      if (true || (session.getValue("MM_UserAuthorization")=="") ||
              (MM_authorizedUsers.indexOf((String)session.getValue("MM_UserAuthorization")) >=0)) {
        MM_grantAccess = true;
    if (!MM_grantAccess) {
      String MM_qsChar = "?";
      if (MM_authFailedURL.indexOf("?") >= 0) MM_qsChar = "&";
      String MM_referrer = request.getRequestURI();
      if (request.getQueryString() != null) MM_referrer = MM_referrer + "?" + request.getQueryString();
      MM_authFailedURL = MM_authFailedURL + MM_qsChar + "accessdenied=" + java.net.URLEncoder.encode(MM_referrer);
      response.sendRedirect(response.encodeRedirectURL(MM_authFailedURL));
      return;
    String vehicle_details__registration = null;
    if(request.getParameter("txt_registration") != null){ vehicle_details__registration = (String)request.getParameter("txt_registration");}
    String vehicle_details__make = null;
    if(request.getParameter("txt_make") != null){ vehicle_details__make = (String)request.getParameter("txt_make");}
    String vehicle_details__model = null;
    if(request.getParameter("txt_model") != null){ vehicle_details__model = (String)request.getParameter("txt_model");}
    String vehicle_details__colour = null;
    if(request.getParameter("txt_colour") != null){ vehicle_details__colour = (String)request.getParameter("txt_colour");}
    String vehicle_details__tax_class = null;
    if(request.getParameter("select_tax_class") != null){ vehicle_details__tax_class = (String)request.getParameter("select_tax_class");}
    String vehicle_details__chasis_num = null;
    if(request.getParameter("chasis_num") != null){ vehicle_details__chasis_num = (String)request.getParameter("chasis_num");}
    String vehicle_details__status = null;
    if(request.getParameter("radio_status") != null){ vehicle_details__status = (String)request.getParameter("radio_status");}
    String owner_details__MMColParam = "1";
    if (session.getValue("MM_Username") !=null) {owner_details__MMColParam = (String)session.getValue("MM_Username");}
    Driver Drivervehicle_details = (Driver)Class.forName(MM_connection_DRIVER).newInstance();
    Connection Connvehicle_details = DriverManager.getConnection(MM_connection_STRING,MM_connection_USERNAME,MM_connection_PASSWORD);
    PreparedStatement vehicle_details = Connvehicle_details.prepareStatement("INSERT INTO vehicle_man_db.vehicle_details (registartion, make, model, colour, tax_class, chasis_num) VALUES ('"+ String vehicle_details__registration + "', '"+ String vehicle_details__make + "', '"+ String vehicle_details__model + "', '"+ String vehicle_details__colour + "', '"+ String vehicle_details__tax_class + "', '"+ String vehicle_details__chasis_num + "', '"+ String vehicle_details__status + "')");
    vehicle_details.executeUpdate();
    %>
    <form name="add_vehicle_form" id="add_vehicle_form">
      <p>Registration mark:
        <input name="txt_registration" type="text" id="txt_registration">
    </p>
      <p>Make:
        <input name="txt_make" type="text" id="txt_make">
    </p>
      <p>Model:
        <input name="txt_model" type="text" id="txt_model">
    </p>
      <p>Colour:
        <input name="txt_colour" type="text" id="txt_colour">
      </p>
      <p>Tax Class:
        <select name="select_tax_class" id="select_tax_class">
          <option value="AAA">Band AAA (up to 100g/km)</option>
          <option value="AA">Band AA (101 - 120g/km)</option>
          <option value="A">Band A (121 - 150g/km)</option>
          <option value="B">Band B (151 - 165g/km)</option>
          <option value="C">Band C (166 - 185g/km)</option>
          <option value="D">Band D (Over 185g/km)</option>
        </select>
      </p>
      <p>Chasis Number:
        <input name="txt_chassis_num" type="text" id="txt_chassis_num">
    </p>
      <p>Status: active:
        <input name="radio_status" type="radio" value="1" checked>
        off-road
        <input name="radio_status" type="radio" value="0">
      </p>
      <p>
        <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    <%
    Connvehicle_details.close();
    %>This is the error I am getting from the server
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 3 in the jsp file: /add_vehicle_form.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\Assignment\org\apache\jsp\add_005fvehicle_005fform_jsp.java:113: ')' expected
    PreparedStatement vehicle_details = Connvehicle_details.prepareStatement("INSERT INTO vehicle_man_db.vehicle_details (registartion, make, model, colour, tax_class, chasis_num) VALUES ('"+ String vehicle_details__registration + "', '"+ String vehicle_details__make + "', '"+ String vehicle_details__model + "', '"+ String vehicle_details__colour + "', '"+ String vehicle_details__tax_class + "', '"+ String vehicle_details__chasis_num + "', '"+ String vehicle_details__status + "')");
    ^
    1 error
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Any help would be much appreciated.
    Thanks

    use this ...
    PreparedStatement vehicle_details =
    Connvehicle_details.prepareStatement("INSERT INTO
    vehicle_man_db.vehicle_details (registartion, make,
    model, colour, tax_class, chasis_num) VALUES
    vehicle_details .setString(1,String
    vehicle_details__registration );
    vehicle_details setString(2,String
    vehicle_details__make );
    vehicle_details .setString(3,String
    vehicle_details__model );
    vehicle_details .setString(4,vehicle_details__colour
    vehicle_details .setString(5,String
    vehicle_details__tax_class);
    vehicle_details .setString(6,String
    vehicle_details__chasis_num );
    vehicle_details .executeQuery();Even you need a screwing up... what's the point putting that String inside. That's the bloody error.

  • Problem with connection in Mysql database in struts application

    Helllo
    i've just started learning struts for my new project where i'm having problem in accessing mysql database
    the datasource being defined in struts-config.xml is as follows:
    <data-sources >
        <data-source type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
          <set-property property="driverClassName" value="com.mysql.jdbc.Driver" />
          <set-property property="user" value="root" />
          <set-property property="password" value="" />
          <set-property property="minCount" value="" />
          <set-property property="maxCount" value="" />
          <set-property property="description" value="A" />
          <set-property property="url" value="jdbc:mysql:///dnbotind_nbotdb" />
          <set-property property="readOnly" value="false" />
          <set-property property="autoCommit" value="true" />
          <set-property property="loginTimeout" value="" />
        </data-source>
      </data-sources>as i run the application
    it gives the errors HTTP status 404-Servlet action is not available
    Thx in advance

    student-java wrote:
    it gives the errors HTTP status 404-Servlet action is not availableThis is unrelated to the datasource configuration.
    HTTP 404 is a "Page not found" error. The request URL is simply wrong. Either there's a typo in the URL, or there is a typo in the servlet mapping, or the servlet is not there where you think.

  • I can't get my website to connect to mysql database hosted on my yahoo site

    I used David Powers tutorials to build a CMS website in Dreamweaver using a testing site set up on my computer. I installed XAMPP and got it working on my computer. (I have a Windows 7 PC with Dreamweaver CS6)
    Now I have installed the mysql database on my remote site following the instructions in the help section of Yahoo Small Business, where my website is hosted. I recreated the same database on the myPHPAdmin on my remote site. (If I understood what I found out when searching for a solution, Yahoo doesn't allow me to see the database from Dreamweaver. It seems that I have to make sure the connections are correct and then upload my site to the remote server. Then it should work once up)
    Following the instructions I could find on Yahoo it seems that all I needed to do was make sure that the user name and password were the same as on my local computer and change the my Sql Server in the Server Connection in Dreamweaver CS6 to mysql instead of localhost, upload my website and it should connect. When I go to my webpage online I get "No database selected".
    I know html, css, some php, and mysql.
    I have been using Dreamweaver for approximatley 2 years and have created 2 successful websites for my husband, who is a photographer. He now wants to have a blog type news website and since I couldn't get Wordpress to do what he wanted to do I decided to create a CMS website. It works great on my computer, but now I need it to work on my remote site.
    I know it's probably something really stupid that I have overlooked and I would really appreciate any help I could get.
    I'm more than happy to learn whatever I need to learn to get this done. I have been searching all kinds of forums and I can find a lot of posts about this or a similar problem, but no solutions.
    Please let me know if I need to provide more information.

    I'm sorry, the way I wrote that was confusing. In mysql it suggested you create a new user that had limited access to access each database you created, rather than use the root user which had all permissions. So in both the mysql on my computer and the mysql on my website I created a user with the same username and password, so that when my website was on my remote server the username and password were the same as when I was testing it on my local computer.
    SnakEyez02 wrote:
    Following the instructions I could find on Yahoo it seems that all I needed to do was make sure that the user name and password were the same as on my local computer and change the my Sql Server in the Server Connection in Dreamweaver CS6 to mysql instead of localhost, upload my website and it should connect. When I go to my webpage online I get "No database selected".
    Just looking at that part of your response, I don't get what they are asking you.  Typically the remote host will require that you update the username/password and possibly SQL server.  When you are in most shared environments, which is what I presume you are in, you typically have a username that is prefix_username.  So you should be updating your script to match that information, not the other way around.  Also with the "mysql instead of localhost" comment, you would only change the script from localhost to another server (ip address) if the mySQL server is not on your web server.  If you host tells you this is true thent he value should be an IP address instead of localhost.  Is that the case?
    For the second part of your question in the "Why can't I access my database" help on Yahoo it says "If your PHP or Perl configuration files require a host name, you may have a problem with your host name. Make sure that you are using the host name mysql, not the default host name localhost." I assumed that meant that in the setup menu when establishing a server connection I needed to replace "localhost" as the mysql Server with "mysql" and then upload my website. This didn't work. Since the mysql server I am trying to access can be accessed using phpmyadmin at www.mywebsite.com/phpmyadmin this seemed to make sense to me. I think I might have managed to access the mysql server, but I'm not choosing the database I want correctly.

  • MySQL Database Connection (two databases at the same time)

    I have never had to open more than one MySQL database from within the same website before, but I do now.  The website I have is designed where all the content comes from within the main database.  I am building an Inventory system that I want within it's own database, in the event I would ever need to move the application to another server or something, I don't want this data residing in the main database.
    Currently, I open the database connection from within a file called "common.php" that resides in a directory called "lib" that can be accessed from the root directory.  Below is the proposed code that would be placed within the "common.php" file:
    // Define Database Variables
    $dbserver = "127.0.0.1";
    $dbuser  = array('clevelan_user1', 'clevelan_user2');
    $dbpass  = array('P@ssw0rd', 'P@ssw0rd2');
    $dbname  = array('clevelan_database1', 'clevelan_database2');
    // Start Session
    session_start();
    // Connect to Databases
    connectdb($dbserver, $dbuser[0], $dbpass[0], $dbname[0]);
    connectdb2($dbserver, $dbuser[1], $dbpass[1], $dbname[1]);
    // Database 1 Connection
    function connectdb($dbserver, $dbuser, $dbpass, $dbname) {
    // connects to db
      global $connection;
      $connection = @mysql_connect($dbserver, $dbuser, $dbpass) or die ("could not connect to server");
      $db = @mysql_select_db($dbname, $connection) or die ("could not select databsase");
      return $connection;
    // Database 2 Connection
    function connectdb2($dbserver, $dbuser, $dbpass, $dbname) {
    // connects to db
      global $connection2;
      $connection2 = @mysql_connect($dbserver, $dbuser, $dbpass) or die ("could not connect to server");
      $db2 = @mysql_select_db($dbname, $connection2) or die ("could not select databsase");
      return $connection2;
    //End of Code Within the "common.php"
    From within any page of the website, I want to access both connections by placing an include at the top of each page:
    include_once("lib/common.php");
    Currently, when I run the code above, any page within the website (the home page) provides error messages with regards to database connectivity (the pages are looking for there content from within the second database.  It's as if the second database is the only database seen by the website.
    I need help figuring out how I can have two MySQL databases open at the same time (the second database will only be open for short periods of time and then closed).  But the main database is always open.

    Create one project using one copy of the exact tables.
    create 2 different sessions.xml files each pointing to the same project. Set the login information in the sessions.xml files.
    That should work fine.
    Peter

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

  • How to get data into the mySQL database?

    First some background.
    I have a website that has outgrown its designed dimensions and is a huge burden to maintain. See PPBM5 Benchmark
    There is a lot of maintenance work involved, so I'm investigating a PHP/MySQL approach to easen the burden and to add functionality to the site. With the current Excel based structure and over 420 entries, it is cumbersome for me to maintain, but also for users to find what they need.
    A MySQL based dynamic structure is a lot easier and offers vastly more selection capabilities, like selecting only records that meet specific criteria.
    Data submission is done with a form, that contains most of the relevant data, but the drawack is that people submitting their data are often not technically inclined, give wrong answers due to a lack of understanding or making typo's. The test results are attached in one or two separate .txt files, but often they have not read the instructions correctly or did something wrong, so these attached .txt files can not be trusted automatically, they have to be checked before inclusion.
    These were my initial thoughts:
    1. Data collection:
    To avoid spending all our energy and time  on correcting typo's, getting missing data, correcting errors, I am  investigating the use of CPU-Z in Ghost mode to create a .txt or .html  file that contains all relevant hardware info we need and even more. It gives all the info we currently have, but adds  data like number of memory sticks, DDR timings, stock clock speed and  BCLK setting, video card info and VRAM size, etc.
    To see what I mean, run CPU-Z, go to the About tab and press the Save Report button and look at the results.
    This can all be done without user intervention in an automatic way, but  maybe I need to add an Auto-It file to the test to make it all run as  desired.
    If this works and I'm able to extract the relevant data from the created  file and can insert it into the database, we may be in business for the  next version of PPBM5.5 or PPBM6. It does require a modification to the instructions, making them a lot  easier, because there is less data to fill out.
    2. Data submission:
    The submission form can be simplified if  the CPU-Z data can be used. We have to create an automatic way to attach  the created .html file from CPU-Z to the submission form and we have to  streamline the Output.txt and Output-MPE.txt files to be more easily included in the 'form.lib.php' file. It  currently is manual labor and very time consuming.
    3. Adding to Database:
    I have to find a way to create database  records from the Gmail forms I receive. All incoming mail messages need  to be checked on relevancy and if relevant, need to be added  automatically to the database and then offered for approval before final inclusion in the database. Data included in the database  will then include submission date and time, Email address,  IP address  used, plus links to the files submitted and available on the website.
    4. Publication of the database:
    After approval of new records from step  3, all updates will be automatically applied to the database and  accessible for users. I do not yet intend to introduce a user account ,  requesting login before all functionality is accessible. Too much trouble and administration.
    Queries should be possible on things like CPU (check box), so include  17-920, i7-930, i7-950 but exclude i7-980X and i7-990X, Size of memory  (check box), Overclocked (boolean, yes, no), SSD as OS disk, and similar  options.
    The biggest problem is to keep the color grading and statistical  indicators (Top, D9, Q3, Med, Q1 and D1) intact on dynamically generated  queries. Say you make a query which results in 20 observations, this  should show the related colors and legends. Next query results in 48 observations and of course the color grading and legends  do need to reflect that. Question in my mind, does the RPI remain  constant, independent of the query or does that need to be recalculated  on the basis of the query?
    Next thing is to allow a user to select a specific observation and by  simply clicking on it be shown, in a separate window (detail page) or  accordion, all the CPU-Z related information about the hardware.
    The graphs, Top-20 and MPE Gains, need to be dynamically adjusted, based on the query used.
    5. Ideally, external links:
    In an ideal situation, one could link the  CPU-Z data to external price databases, looking up current prices for  CPU, memory, video card, disks, raid controller, etc. to get instant  BFTB charts, based on the query made. But that is the next step.
    Situation now:
    I have a MySQL database that is easily updated with the new submissions. Simply create a .CSV flie from the submitted forms and import that into the database. The bulk of the initial work is done.Lots remain to be done as you can see above, but that is for a later time.
    Question:
    I have this table, that needs to be filled with data in the submitted and attached files. Mr. X submitted his data and can be uniquely identified by his "Ref_ID". He attached one or two files in .TXT format with the relevant test data. These files are stored on the server with a concatenated name:
    "Ref_ID","-","filename"
    Say his Ref-ID is: 20110204-6cf5 and his submitted file is called: Output(99).txt then the file can be found on the server as
    20110204-6cf5-Output(99).txt
    I need to be able to open that comma delimited file, the contents may look like this: "439","1036","819","531" and insert these contents into the relevant record and fields.
    Graphically,
    is what I want to achieve.
    This being my first exposure to PHP/MySQL, you can imagine I'm not clear on how to go from here.
    Added complication is that I actually have 5 numbers to insert per record and two calculated fields, Total Score and RPI should be calculated fields. Haven't yet figured out how to handle calculated fields, maybe only in the PHP/HTML code and not in the database.
    I hope someone can help me.

    You do have a very complex looking site and may need several tables in mysql to handle all that data. If you knew to phpmysql I would suggest taking a look at this tutorial it will help get you started in understanding how to $_GET info from a database and also how to $_POST data to a database. I am no expert just learning myself and I found this very helpful. This is the link http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html
    There are also many tutorials on Youtube to help build a CMS Content Management Site I would suggest the following: -
    http://www.youtube.com/user/phpacademy
    http://www.youtube.com/user/betterphp
    http://www.youtube.com/user/flashbuilding
    And many more on my channel here
    http://www.youtube.com/user/Whisperingonthewind
    CMS's are easier to maintain, add edit and delete content.
    I have also recently bought a Book by David Powers Training from the Source very helpful.
    Anyway hope you get it sorted.

Maybe you are looking for

  • Hidding Password in JSP page

    Hi all, I m using the password value in the jsp page as ahidden variable which is thereafter used in the java script. but the problem is that while in view mode of the jsp page if u right click and view the source the password is getting displayed. w

  • BAPI FM to set the  "Material Number used by Vendor" and the "Order Unit"

    Hi, is there any bapi or fm to set these two fields in the purchase view of the material? to create the material i've used the "BAPI_MATERIAL_SAVEDATA" but i don't have a clue where those field's can be set. thkzs to all in advanced Regards Jaime

  • Imessage & ios7

    Hi Folks, Anybody know when this imessage/ios7 bug will be fixed? Its stopping messages being received by every memember of my household - we all have iphones and have had to switch immessage off. Often the messages are not received until hours later

  • Web Analysis, Smart View Bandwidth

    Hi Guys, I have the unusual urge do find out about the bandwidth that is actually used by web analysis or smart view when using it remotely off site. Well, I guess its impossible to tell, depends on the data set. Small (less than 10 rows, 10 columns)

  • Why i cant view package body ?

    hi all, i cant view package body in my pl/sql. pls help. tks.