MySQL databases missing

Hi,
I ran an update on our Xserve running 10.3.9 Server last week that left me unable to login to MySQL. After trying a number of solutions, I found the only way to "fix" this problem was to kill MySQL then backup and delete the "/var/mysql/mysql" directory. After this, I was able to reset the password by "/usr/bin/mysqlinstalldb".
When I login to phpMyAdmin, all of my databases are listed in the dropdown list but I get a MySQL error "#12 - Can't read dir of './site_blog/' (Errcode: 13)". In Terminal I can see all of this data in "/var/mysql" but how do I get MySQL to see it again?
I'm using phyMyAdmin, but I'm not tied down to it and am open to any solution.
Thanks in advance,
Andy
Dual G4 Xserve   Mac OS X (10.3.9)  
Dual G4 Xserve    

Maybe you should take a look at this article. It explains the differences in the installation of mySQL in Tiger.
PowerMac G5 1.8   Mac OS X (10.4.5)   MacOS 10.4.5 Server, 2nd internal HD, LaCie FW 500GB, QPS FW 80MB

Similar Messages

  • BusinessObjects XI 3.1 - Missing MySql Database Server?

    Hi all
    I've installed the BusinessObjects XI 3.1 on my desktop and during the installation process i have chosen to install the MySql database server together with it.
    I'm now trying to create a database, but i can't seem to locate where the mysql database server is installed on my desktop.
    Am i suppose to install something else or did i miss something out?
    Thanks
    jazreeel

    BO XI 3.1 server should be installed on Windows Server 2003 or 2008. Windows VIsta is not offcially supported for the installation of the server software.
    Regards,
    Stratos
    PS: Take a look at the Supported platforms documentation (http://service.sap.com/bosap-support)

  • 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.

  • 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.

  • Does Time Machine back up MySQL database?

    My medical practice billing software runs on MySQL. I upgraded to Leopard specifically to enable Time Machine backups - more frequent than nightly backups, with recovery much faster in the event of problems in the middle of a busy day. The software vendor tech rep stated that the MySQL database is not backed up by Time Machine. That seems very strange, since it backs up all the System files and everything else not specifically excluded. Am I missing something?

    I don't understand what he said. It sounds like something to do with the Exclude list of TM preferences. Are you only backing up the MacPractice folder or is TM backing up your entire hard drive? What it reads to me is that if you backup only the MacPractice folder that the folder does not include the MySQL database. That is correct since MySQL creates the database file in its own special folder. But if you backup the entire hard drive then everything is backed up including the database files.
    BTW, since this is a business entity I would strongly advise that you not rely entirely on Time Machine backups. TM can be finicky and unreliable. Potential problems escalate when you use a Time Capsule because of the mechanism TM uses for backing up networked drives such as TC.
    I would recommend you use another backup utility and do additional backups to other external or internal drives depending upon what your computer supports. You should also make at least one separate full backup archive monthly that can be stored off-site in the case of theft, vandalism, storm, earthquake, or other hazard that could result in loss of data. See the following:
    Basic Backup
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    1. Retrospect Desktop (Commercial - not yet universal binary)
    2. Synchronize! Pro X (Commercial)
    3. Synk (Backup, Standard, or Pro)
    4. Deja Vu (Shareware)
    5. Carbon Copy Cloner (Donationware)
    6. SuperDuper! (Commercial)
    7. Intego Personal Backup (Commercial)
    8. Data Backup (Commercial)
    The following utilities can also be used for backup, but cannot create bootable clones:
    1. Backup (requires a .Mac account with Apple both to get the software and to use it.)
    2. Toast
    3. Impression
    4. arRSync
    Apple's Backup is a full backup tool capable of also backing up across multiple media such as CD/DVD. However, it cannot create bootable backups. It is primarily an "archiving" utility as are the other two.
    Impression and Toast are disk image based backups, only. Particularly useful if you need to backup to CD/DVD across multiple media.
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore. Also read How to Back Up and Restore Your Files.
    Although you can buy a complete FireWire drive system, you can also put one together if you are so inclined. It's relatively easy and only requires a Phillips head screwdriver (typically.) You can purchase hard drives separately. This gives you an opportunity to shop for the best prices on a hard drive of your choice. Reliable brands include Seagate, Hitachi, Western Digital, Toshiba, and Fujitsu. You can find reviews and benchmarks on many drives at Storage Review.
    Enclosures for FireWire and USB are readily available. You can find only FireWire enclosures, only USB enclosures, and enclosures that feature multiple ports. I would stress getting enclosures that use the Oxford chipsets (911, 921, 922, for example.) You can find enclosures at places such as;
    Cool Drives
    OWC
    WiebeTech
    Firewire Direct
    California Drives
    NewEgg
    All you need do is remove a case cover, mount the hard drive in the enclosure and connect the cables, then re-attach the case cover. Usually the only tool required is a small or medium Phillips screwdriver.

  • Connection to MySQL Database

    I am trying to work on a new site and get it connected to a MySQL database.  All setups for site and servers are complete, the testing server is working fine but when I click on the + to create a connection no dropdown appears.  There is no MySQL selection to make - nothing at all.  This is in Dreamweaver CS5.5.  Is there something I am missing?

    Hi
    Have you correctly defined your site definition server settings? Are you using the php page type, (file extension)? Have you created your database tables?
    PZ

  • 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

  • Conntect to MySQL Database

    Hello SAP Community!
    I need a connection to a MySQL database from SAP. I read the post from Gudmundur Karlsson, How can I connect to MySQL external database, and followed his description. He said that we should use MSSQL as DBMS, but I am not able to connect to a MySQL Database.
    Firstly, I installed the MySQL Connector/ODBC 5.1.6 and set up an ODBC connection called TEST on the Application Server in the control panel -> administrative tools. The connection test was successfully.
    After that I made an entry in the transaction DBCO with the following details, based on the post from Gudmundur Karlsson:
    Connection Name: MYSQL
    DBMS: MSS
    Username and Password from the MySQL Database.
    Connection info: MSSQL_DSN=TEST
    Then I wrote the following report to test the connection:
    PARAMETERS: p_dbs TYPE dbcon-con_name DEFAULT 'MYSQL'.
    EXEC SQL.
      CONNECT TO :p_dbs
    ENDEXEC.
    WRITE: sy-subrc.
    The sy-subrc is always 4.
    Has anybody an explanation, how I can connect to a MySQL Database.
    Kind regards!

    Hi,
    SAP System in which DBCO entry is maintained is running on which OS Platform ?
    Required DLL (DBMSSSLIB.DLL) has been put in SAP Instance's Kernel executable directory (If SAP system is running on Windows platform)?
    Have you referred this Useful [SAP Note 323151 - Several DB connections with Native SQL|https://service.sap.com/sap/support/notes/323151] and [SAP Note 738371 - Creating DBCON multiconnect entries for SQL Server|https://service.sap.com/sap/support/notes/738371] ? Read them and do the required configuration settings if any one is missing.
    As per SAP Note 738371,
    The application server(s) where a DBCON connection is used must be running Windows,
    and they must have the MS SQL Server DBSL library dbmssslib.dll installed in the run directory (/sapmnt/<SAPSID>/exe).
    If your database platform is not SQL Server, then this DLL must be downloaded from the SAP Service Marketplace for your R/3 kernel version.
    Regards,
    Bhavik G. Shroff

  • [b] Populating List Box from MySQL Database[/b]

    Hi all,
    I'm trying to populate a JComboBox from MySQL database, I Have an applet which send's the query to a server through sockets on the localhost, but when i try to retrieve the result set from the MySQL database, i get an index out of bounds exception, It's probably something simple, any help regarding the above problem!! I've included the code below!!
    Cheers
    Dave
    java.lang.ArrayIndexOutOfBoundsException: 1
    at dbWrapper1.Select(dbWrapper1.java:97)
    at TestUpdateDB.main(TestUpdateDB.java:29)
    Applet Code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    *     @version  04/18/05
    *     @author David Lawless
    public class cust extends JApplet implements ActionListener
    //Declare Labels for Form
    private JLabel titleLabel;
    private JLabel firstNameLabel;
    private JLabel lastNameLabel;
    private JLabel addressLabel;
    private JLabel countyLabel;
    private JLabel countryLabel;
    //Declare Input fields for user
    private JTextField firstNameText;
    private JTextField lastNameText;
    private JTextField addressLineOneText;
    private JTextField addressLineTwoText;
    private JTextField addressLineThreeText;
    //Declare list for title box
    private JComboBox titleList;
    private String[] title = {"Mr.","Mrs.","Miss","Ms","Dr."};
    //Declare list for county box
    private JComboBox countyList;
    //Called when this applet is loaded into the browser.
    public void init()
    lookAndFeel();
    //Initialise Labels
    firstNameLabel = new JLabel("First Name * ");
    lastNameLabel = new JLabel("Last Name * ");
    titleLabel = new JLabel("Title * ");
    addressLabel = new JLabel("Address *");
    countyLabel = new JLabel("County *");
    countryLabel = new JLabel("Country *");
    //Initialise title List
    titleList = new JComboBox( title );
    titleList.setActionCommand("Title");
    //Set up Text fields
    firstNameText = new JTextField(30);
    firstNameText.setToolTipText("Please enter your first name here");
    lastNameText = new JTextField(30);
    lastNameText.setToolTipText("Please enter your surname here");
    addressLineOneText = new JTextField(30);
    addressLineTwoText = new JTextField(30);
    addressLineThreeText = new JTextField(30);
    //Retrieve County List From Database
    //countyList = new JComboBox( counties );
    try
         try
              Socket mySocket = new Socket ("127.0.0.1", 1983 );
              ObjectOutputStream out = new ObjectOutputStream(mySocket.getOutputStream());
              String entry1 ="SELECT county FROM data";
              out.writeObject(new String(entry1));
              ObjectInputStream in = new ObjectInputStream(mySocket.getInputStream());
              int size = in.readInt();
              Object [] results = new Object[size];
              for (int i=0; i < size  ; i++ )
                   results[i] = in.readObject();
              countyList = new JComboBox( results );
              countyList.setActionCommand("County");
              mySocket.close ();
         catch (Exception exp)
              exp.printStackTrace();
    // detect problems interacting with the database
    catch ( Exception sqlException )
         System.exit( 1 );
    //set up command buttons
    submitButton = new JButton("Submit");
    submitButton.setToolTipText("Click here to submit your details ");
    submitButton.addActionListener(this);
    cancelButton = new JButton("Cancel");
    cancelButton.setToolTipText("Click here to cancel order");
    cancelButton.addActionListener(this);
    Container topLevelContainer = getContentPane();
    getContentPane().setBackground(Color.blue);
    //Create Layout
    JPanel contentPane = new JPanel();
    //Set transparent background instead of blue
    contentPane.setBackground(Color.white);
    contentPane.setLayout(null);
    contentPane.setOpaque(true);
    titleLabel.setBounds(37,10,75,20);
    contentPane.add(titleLabel);
    firstNameLabel.setBounds(93,10,100,20);
    contentPane.add(firstNameLabel);
    lastNameLabel.setBounds(198,10,100,20);
    contentPane.add(lastNameLabel);
    titleList.setBounds(37,35,50,20);
    contentPane.add(titleList);
    firstNameText.setBounds(93,35,100,20);
    contentPane.add(firstNameText);
    lastNameText.setBounds(198,35,100,20);
    contentPane.add(lastNameText);
    addressLabel.setBounds(37,65,100,20);
    contentPane.add(addressLabel);
    addressLineOneText.setBounds(37,90,125,20);
    contentPane.add(addressLineOneText);
    addressLineTwoText.setBounds(37,115,125,20);
    contentPane.add(addressLineTwoText);
    addressLineThreeText.setBounds(37,140,125,20);
    contentPane.add(addressLineThreeText);
    countyLabel.setBounds(37,165,100,20);
    contentPane.add(countyLabel);
    countyList.setBounds(37,190,100,20);
    contentPane.add(countyList);
    submitButton.setBounds(60,250,100,20);
    contentPane.add(submitButton);     
    cancelButton.setBounds(180,250,100,20);
    contentPane.add(cancelButton);
    topLevelContainer.add(contentPane);
    }//End init()
    static void lookAndFeel()
         try
              UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
         catch(Exception e)
    }//End look and feel method
    public synchronized void actionPerformed(ActionEvent e)
    String actionCommand = e.getActionCommand();
    if (e.getSource() instanceof JButton)
         if (actionCommand.equals("Cancel"))
                   int returnVal = JOptionPane.showConfirmDialog(null,
                        "Are you sure you want cancel and discard your order?",
                        "Cancel Order", JOptionPane.YES_NO_OPTION);
                   if(returnVal == JOptionPane.YES_OPTION)
                        System.exit(0);
         if (actionCommand.equals("Submit"))
              firstName = firstNameText.getText();
              Surname = lastNameText.getText();
         }//end action command for submit button
    }//end method actionperformed
    }//End class customerDatabase Connection Code:
    import java.sql.*;
    import java.util.*;
    class dbWrapper1
        private Statement statement;
        private Connection connection;
        private String strUserName;
        private String strPassword;
         Object [] results = null;
         static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
         static final String DATABASE_URL = "jdbc:mysql://localhost:3306/ecommerce";
        public dbWrapper1()
            // the DSN for the Db connection
            strUserName = "root";
            strPassword = "password";
        public void Open()
            try
                // Load the jdbc-odbc bridge driver
                Class.forName ( JDBC_DRIVER );
                   //                    ***** TESTING PURPOSES *****
                   //Check currently loaded drivers
                   System.out.println("Currently loaded drivers...");   
                   for
                        Enumeration enum1 = DriverManager.getDrivers() ;
                        enum1.hasMoreElements();
                   System.out.println(enum1.nextElement().getClass().getName());
                // Attempt to connect to a driver.
                connection = DriverManager.getConnection ( DATABASE_URL, strUserName, strPassword );
                // Create a Statement object so we can submit
                // SQL statements to the driver
                statement = connection.createStatement();
            catch (SQLException ex)
                while (ex != null)
                    System.out.println ("SQL Exception:  " + ex.getMessage () );
                    ex = ex.getNextException ();
            catch (java.lang.Exception ex)
                ex.printStackTrace ();
        public void Update( String strUpdate )
            try
                // Submit an update or create
                statement.executeUpdate( strUpdate );
              catch (SQLException ex)
                while (ex != null)
                    System.out.println ("SQL Exception:  " + ex.getMessage () );
                    ex = ex.getNextException ();
        public Object[] Select( String strQuery )
            try
                // Submit a query, creating a ResultSet object
                ResultSet resultSet = statement.executeQuery( strQuery );
                // process query results
                   ResultSetMetaData metaData = resultSet.getMetaData();
                   int numberOfColumns = metaData.getColumnCount();
                   results = new Object[numberOfColumns];
                   while ( resultSet.next() )
                        for ( int i = 1; i <= numberOfColumns; i++ )
                             results[i] = resultSet.getObject(i);
                             System.out.print(resultSet.getString(i) + " | " );
                        System.out.println();
                   resultSet.close();
            catch (SQLException ex)
                while (ex != null)
                    System.out.println ("SQL Exception:  " + ex.getMessage () );
                    ex = ex.getNextException ();
              for (int i=0;i<results.length ;i++ )
                   System.out.println(results);
              return results;
    public void Close()
    try
    statement.close();
    connection.close();
    catch (SQLException ex)
    while (ex != null)
    System.out.println ("SQL Exception: " + ex.getMessage () );
    ex = ex.getNextException ();
    Server Code:
    import java.io.*;
    import java.net.*;
    public class TestUpdateDB
         public static void main(String[] args)
              System.out.println ( "Server is active" );
              try {
              ServerSocket sock = new ServerSocket ( 1983 );
              while ( true )
                   try
                        Socket mySock = sock.accept();
                        ObjectInputStream iStream = new ObjectInputStream(mySock.getInputStream());
                        ObjectOutputStream oStream = new ObjectOutputStream(mySock.getOutputStream());
                        Object temp = iStream.readObject();
                        String entry = (String)temp;
                        System.out.println ( entry );
                        dbWrapper1 myDB = new dbWrapper1();
                        myDB.Open();
                        Object [] query = myDB.Select(entry);
                        int size = query.length;
                        oStream.writeInt(size);
                        for (int i=1 ; i <= query.length ; i++)
                             oStream.writeObject( query );
                        myDB.Close();
                   catch ( Exception exp )
                        exp.printStackTrace ();
              catch ( Exception exp ) {
                exp.printStackTrace();

    Sir,
    The exception is probably in here.
    for ( int i = 1; i <= numberOfColumns; i++ ){
      results[i] = resultSet.getObject(i);
      System.out.print(resultSet.getString(i) + " | " );
    }ResultSet counting begins with 1 but array indexing begins with 0 your code should look more like.
    for ( int i = 0; i <= numberOfColumns; i++ ){
      results[i] = resultSet.getObject(i+1);
      System.out.print(resultSet.getString(i+1) + " | " );
    }Sincerely,
    Slappy

  • Creating a connection to a mysql database

    New to CQ5.
    Version: CQ5_5
    Running a local instance on my desktop.
    Trying to connect to localhost:3306 mysql database
    I downloaded the mysql driver and used the instructions here to create and build an OSGI bundle.
    http://cq-ops.tumblr.com/post/21893960212/how-to-turn-a-jdbc-driver-jar-into-an-osgi-bundl e-jar
    Next, I followed instructions here to create a osgiconfig node, populate it and update my component jsp accordingly.
    http://dev.day.com/docs/en/cq/current/developing/jdbc.html?cq_ck=1362183869402#comments-nf fb-unsuccessfullyspent
    On my page - I see the error message
    No data source found with name 'testdb' (after asking 0 providers)
    Any likely gotchas that I might be missing?
    If you have got it working and can just describe the steps you used, I could give that a try too.
    Any pointers are welcome.
    Thanks,

    Hi Andrew,
    check out this <a href="http://developers.sun.com/product/jdbc/drivers">site</a>, maybe you find a suitable driver there? The SAP Press and Helpfiles say, that connecting to a microsoft SQL Database is possible.
    In our portal I found a MSsql jdbc driver installed, with sucessful connection test to northwind-database. Unfortunately, I cannot find out what driver we used.
    If you still don't find a driver, I will ask my colleague if he remembers.
    Best Regards, Benni
    Message was edited: Sorry, I meant MSsql, not mysql. We have a MSSQL-JDBC-System defined, with working connection.

  • Save an Image in a MySQL database

    I am trying to save an image in a MySQL database. This is what I have done so far; I have created a table with one of the variables called
    photo  blob, this is what you use to save an image right?
    When I write the image to the database after getting connected to it is where I am stuck, so far I can save Ints, Strings and Enum s values but I do not know how to convert my image into a Blob and save the blob. I have been doing some light reading and I am guessing I have to convert the image into a Stream of some sort. What type of stream I do not know. This is the java command I have to save the Blob but do not know what to use as the variable for the Blob.
    prst.setBlob(5,  "??????");As you can tell by the ????? marks, I do not know how to convert my image into the proper data type(whatever the data type is?) to save the contents into the database.
    If somebody has the exact copy of the all the java coded steps that is needed to save an image as a Blob into a prepared database, that would be extremelu helpful to me.
    Thank-you.

    The answer has to be quite simple. If you do not have
    the answer please do not reply.Unfortunately it's not simple. This is one of my betes noire about the java libaries. The Blob stuff has gaping holes in it. There's no method, anywhere, to create a new Blob or Clob (also the design of the Blob and Clob interfaces tends to miss the point).
    The ways arround this, there being no legitimate approach, vary with the database provider.
    If the program an the server are running on the same machine (or files can be shared through NFS or the like) you can try the "LOAD_FILE" function.
    With some databases I believe setBinaryStream instead of setBlob works, but I'm not sure the mySql driver is that smart.

  • Linking Postfix to the PostfixAdmin MySQL database

    I am building a hosting platform on OS X Server. Thus, I want to manage mail users and virtual domains in a database.
    First, I followed Pterobyte's advises in order to manage virtual domains with Postfix, using Apple's administration tools (http://downloads.topicdesk.com/virtual-users.pdf).
    Then, I recompiled Postfix with MySQL support, following advises found on this forum.
    Finally, I installed Postfix Admin and its MySQL database.
    And everything works! So, I should be happy, but the glue between Postfix and the PostfixAdmin database is missing. The reason is very simple: Postfix is still configured to use the "/var/imap" database. So, my questions are very simple:
    1. How can I say to Postfix to use the Postfix Admin MySQL database instead of LDAP?
    2. Will I still be able to use Apple's Server Admin to manage my mail service? Of course, not for users and virtual domains management, but at least to start/stop mail, read logs...
    David

    Alex,
    You will find my current master.cf at the end of this post.
    -Use 127.0.0.1 instead of localhost.
    I tried that, but it seems to imply that I modify my MySQL configuration, which is not so easy because I have 10 sites running on MySQL for clients. But I will try again later.
    -Check permissions on the socket are correct.
    777 should be good.
    -Check if you have any issues with the socket locking up
    Hard to tell, but my other sites connect to MySQL with no error.
    So, here is my master.cf :
    ==========================================================================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (yes) (never) (100)
    # ==========================================================================
    smtp inet n - n - - smtpd
    #smtps inet n - n - - smtpd
    # -o smtpdtlswrappermode=yes -o smtpdsasl_authenable=yes
    #submission inet n - n - - smtpd
    # -o smtpdenforcetls=yes -o smtpdsasl_authenable=yes
    #628 inet n - n - - qmqpd
    pickup fifo n - n 60 1 pickup
    cleanup unix n - n - 0 cleanup
    qmgr fifo n - n 300 1 qmgr
    #qmgr fifo n - n 300 1 nqmgr
    #tlsmgr fifo - - n 300 1 tlsmgr
    rewrite unix - - n - - trivial-rewrite
    bounce unix - - n - 0 bounce
    defer unix - - n - 0 bounce
    flush unix n - n 1000? 0 flush
    proxymap unix - - n - - proxymap
    smtp unix - - n - - smtp
    relay unix - - n - - smtp
    # -o smtphelotimeout=5 -o smtpconnecttimeout=5
    showq unix n - n - - showq
    error unix - - n - - error
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - n - - lmtp
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    # maildrop. See the Postfix MAILDROP_README file for details.
    maildrop unix - n n - - pipe
    flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
    # The Cyrus deliver program has changed incompatibly, multiple times.
    old-cyrus unix - n n - - pipe
    flags=R user=cyrusimap argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    # Cyrus 2.1.5 (Amos Gouaux)
    cyrus unix - n n - 10 pipe
    user=cyrusimap argv=/usr/bin/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    uucp unix - n n - - pipe
    flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    ifmail unix - n n - - pipe
    flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp unix - n n - - pipe
    flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
    smtp-amavis unix - - y - 2 smtp
    -o smtpdata_donetimeout=1200
    -o smtpsend_xforwardcommand=yes
    -o disablednslookups=yes
    127.0.0.1:10025 inet n - y - - smtpd
    -o content_filter=
    -o localrecipientmaps=
    -o relayrecipientmaps=
    -o smtpdrestrictionclasses=
    -o smtpdclientrestrictions=
    -o smtpdhelorestrictions=
    -o smtpdsenderrestrictions=
    -o smtpdrecipient_restrictions=permitmynetworks,reject
    -o mynetworks=127.0.0.0/8
    -o smtpdenforcetls=no
    -o strictrfc821envelopes=yes
    -o smtpderror_sleeptime=0
    -o smtpdsoft_errorlimit=1001
    -o smtpdhard_errorlimit=1000
    -o receiveoverride_options=no_header_bodychecks
    As you can see, the 2 chrooted processes are :
    smtp-amavis unix - - y - 2 smtp
    127.0.0.1:10025 inet n - y - - smtpd
    I tried to unchroot smtp-amavis, but it did not solve anything (except that I do not have any more information in mail.log, but I do not know if it is related). Anyway, in amavis.log, I have:
    Apr 25 09:22:35 beta.local /usr/bin/amavisd[808]: (00808-01) mailviasmtp: 451 4.1.0 <[email protected]>: Temporary lookup failure
    Apr 25 09:26:13 beta.local /usr/bin/amavisd[807]: (00807-02) mailviasmtp: 451 4.1.0 <[email protected]>: Temporary lookup failure
    So my problem is not solved.
    Thanks for you help
    David

  • Beware: Time Machine doesn't backup MySQL databases regularly!

    I have a Mac OS X Server which runs as a webserver. I had to replace the internal harddisk, which is backupped with TM too. So after replacement I restored the system from the TM backup and discovered that I lost some database content. The contents of the restored database content was several days old. This means that TM doesn't backup the database hourly.
    FYI I had backupped the database myself to be sure, so I didn't lost any data. But it took some extra work after restoring. All other files on the server were okay.

    I'm making an assumption here... but your post doesn't have a ton of detail about your setup so...
    It probably has more to do with the fact that you actually shouldn't be backing up a mysql database with time machine if the database is running/live (Of which Time machine has no idea about any of this).
    You can't backup open database just like that and it doesn't only apply to time machine. You need to first be doing a dump of the database either manually or with an automated script and then you could allow time machine to backup the dump. You're asking for trouble and behavior similar to what you noticed here if you backup a mysql (or any other open database) in this manner. This includes the LDAP database if this machine is an OD master and cyrus database if you run the OS X mail server (pre 10.6).
    Just an FYI that it is quite likely that time machine backed up the files in question but that the database was probably damaged or missing data for the reasons I mentioned above.
    There are tools out there that can automate this process (mysql website itself has a Mac GUI client that can do automated backups).

  • Unable to login to MySQL Database

    Hi ,
    I have dumped the MySQL database from production database to the Testing server ........
    Then i have created a new user and then try to login to the Web application but it is showing authentication failed error.
    Below is the trace of the jboss error ...............
    09:06:02,629 INFO  [STDOUT] User name gpms password gpms
    09:06:02,637 INFO  [STDOUT] Connection com.mysql.jdbc.Connection@1cc5d23
    09:06:02,637 INFO  [STDOUT] SELECT U.ID, U.USER_ID, U.PASSWORD,  U.DATE_CREATED, U.CREATED_BY, U.MODIFIED_BY, U.DATE_MODIFIED, U.STATUS, U.MANAGER_ID, U.EMAIL, U.ROLE_ID,  R.NAME ROLE_NAME, U.COMPANY_ID, ST.NAME GROUP_NAME, LT.NAME LOCATION_NAME,  U.LOCATION_ID, U.GROUP_ID,  U.FIRST_NAME, U.LAST_NAME, U.MIDDLE_NAME, U.OFFICE_PHONE_NO, U.OFFICE_PHONE_EXTN,  U.EMERGENCY_CONTACT, U.EMERGENCY_PHONE, U.RESIDENT_ADDRESS, U.RESIDENT_PHONE_NO,  U.CELL_PHONE_NO, U.PREFERRED_NAME, U.SALES_SUPPORT  FROM USER U, ROLES R, STATIC_TYPES ST, STATIC_TYPES LT WHERE ST.ID = U.GROUP_ID AND LT.ID = U.LOCATION_ID AND  R.ID = U.ROLE_ID AND UPPER(U.USER_ID) = UPPER('gpms')  AND U.PASSWORD=PASSWORD('gpms')
    09:06:02,637 INFO  [STDOUT] User name isgpms
    09:06:02,637 INFO  [STDOUT] Password isgpms
    09:06:02,642 ERROR [STDERR] java.lang.Exception: Unable to authenticate
    09:06:02,643 ERROR [STDERR]     at com.gda.common.AuthenticationDAO.authenticate(AuthenticationDAO.java:164)
    09:06:02,643 ERROR [STDERR]     at com.gda.common.AuthenticationDAO.authenticate(AuthenticationDAO.java:38)
    09:06:02,644 ERROR [STDERR]     at org.apache.jsp.login_jsp._jspService(login_jsp.java:54)
    09:06:02,644 ERROR [STDERR]     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
    09:06:02,644 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    09:06:02,644 ERROR [STDERR]     at sSecurityMgrRealm.java:220)
    09:06:02,657 ERROR [STDERR]     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    09:06:02,657 ERROR [STDERR]     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    09:06:02,658 ERROR [STDERR]     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    09:06:02,658 ERROR [STDERR]     at
    09:06:02,660 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:534)
    09:06:02,661 INFO  [STDOUT] Error in authentication for gpms
    09:06:02,661 INFO  [STDOUT] java.lang.Exception: Unable to authenticateNarendra
    09:06:02,661 INFO  [STDOUT] Unable to authenticate
    09:06:02,662 INFO  [STDOUT] Authentication failed null

    Ok, I've tried a lot of stuff. I have modified my application to display error message instead of "Login Failed".
    It says: "com.mysql.jdbc.Driver" so like you said the mysql jar is missing.
    I have copied the whole mysql-connector-java-5.0.4-bin directory into my application directory. My manifest.mf looks like:
    Manifest-Version: 1.0
    Class-Path: mysql-connector-java-5.0.4/mysql-connector-java-5.0.4-bin.
    jar
    Sealed: true
    Main-Class: GUI.LoginScreenI have also tried changing names to mysql/mysql.jar.
    I have also tried coping just the jar file in the project folder
    Class-Path: mysql-connector-java-5.0.4-bin.jar
    There is also some .classpath file in the jar and it looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
         <classpathentry kind="src" path="src"/>
         <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
         <classpathentry exported="true" kind="lib" path="F:/CurrentDocuments/Fall2006/JavaProjectsTemp/RentItOut/mysql-connector-java-5.0.4/mysql-connector-java-5.0.4-bin.jar"/>
         <classpathentry kind="output" path="bin"/>
    </classpath>I don't know. According to the:
    http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html
    You specify classes to include in the Class-Path header field in the manifest file of an applet or application. The Class-Path header takes the following form:
    Class-Path: jar1-name jar2-name directory-name/jar3-name
    By using the Class-Path header in the manifest, you can avoid having to specify a long -classpath flag when invoking Java to run the your application.
    END OF QUOTATION.
    Tomorrow I'll try doing it manually under Linux. Maybe Eclipse is doing something. I don't know

  • Connecting to an online mysql database

    Good morning,
    I've been developing a website using Dreamweaver, Coldfusion,
    and MySQL on my local computer. On the localhost the website works
    well. Now I'm ready to upload my pages and need to update the data
    source so my pages can access the MySQL databases hosted by
    GoDaddy.com. I've had no luck talking with their customer service
    about which driver / which port I should use to make the
    connection. I understand that Remote Development Services (RDS) is
    disabled on their server. Am I missing any steps? Any ideas?
    Thanks,
    Tony

    This TechNote may help:
    http://www.adobe.com/go/kb400539

Maybe you are looking for

  • Exception while calling BPEL from Java Class

    Hi All, I am trying to call BPEL from my Java Code. but i am getting following exception. java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/syste

  • 503 Internal Server Error

    Hi all, We r in EP7 and ECC6. EP was working fine till yesterday when I tried to open today I am getting the error as 500   Internal Server Error Failed to process request. Please contact your system administrator. It appears only for ESS. Please gim

  • After Effects layer render breaks

    Adjustment layer breaks 3d render for layers below.  Is there a way to break Stencil mode at a layer (other than precomposing)?

  • Create dynamic context node

    Hi Experts, I have tried the given example for Dynamic Context Node in Webdynpro ABAP https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783 But getting the Error when executing this application Note

  • I think i went over my prepaid card funds. It no longer lets me download apps. HELP!

    I think i may have gone over the amount of money i had. What am i supposed to do now ? It keeps saying my credit card is invalid. Any ideas on how to fix this? thanks!