Connecting To Mysql Server

Hi all,
In SAP is it possible to connect a mysql database and get data from? Our resources(machines) have a server and this server keeps data about production. And i want to connect this db server and get data with my syntax, constraints? Can i directly do that in SAP ?
Regards,

I only want to connect the mysql server and get some of data from tables on mysql and save this data in the table of SAP system ? How can i do that ?
Regards,

Similar Messages

  • Database error #2002 can not connect local mysql server to socket through '/var/run/mysqld/mysqld.sock'(2) on mac os x 10.9.2

    Dear Fellas:
    I received "database error #2002 can not connect local mysql server to socket through '/var/run/mysqld/mysqld.sock'(2)" on mac os x 10.9.2.
    mysql info:
    ps -ef | grep mysql
        0    66     1   0 11:06AM ??         0:00.04 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql
       74   225    66   0 11:06AM ??         0:02.50 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/Chuans-MacBook-Pro-2.local.err --pid-file=/usr/local/mysql/data/Chuans-MacBook-Pro-2.local.pid --socket=/var/run/mysqld/mysqld.sock
      501   952   947   0  3:52PM ttys000    0:00.00 grep mysql
    Please help!!

    Fascinated and guessing:
    Something related to sock(2) because that's not part of your copied info. I'm thinking you've doubled up on sockets and the second socket doesn't exist, meaning you should be connecting to the first socket "mysqld.sock" whether automatic or not.
    I've only used GUI tools on purpose, so does this mean you've already got MySQL running and you tried to launch it again manually? Perhaps you already have one instance of a db and you're trying to launch a second instance, and the two can't coexist with a single user local db?
    Assuming this is all local, I'd shut down the db service and restart it, out of hand. I've seen similar messages when I set the db to start up on boot, and it didn't finish shutting down when I tried to restart it manually. Usually the GUI won't let me turn it on because it reports it's already running, but in that case it hadn't finished performing what the GUI was reporting.
    Just speculating.

  • ERROR#: 2002 can't connect to MySQL server through socket '/var/mysql/mysql.sock'

    I was following this adobe article (
    http://www.adobe.com/devnet/dreamweaver/articles/php_macintosh.html)
    to set up PHP and MySQL and connect a MySQL database to dreamweaver
    in Mac OS 10.4.8 and I kept getting:
    "Can't connect to MySQL server through socket
    '/var/mysql/mysql.sock' ERROR#: 2002".
    After a lot of searching I came across
    this
    article which said that there was an error in the PHP and MySQL
    connection or something.
    Anyway all I had to do was type (in a TERMINAL window):
    $ sudo mkdir /var/mysql
    $ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
    and that fixed the problem, otherwise the adobe article
    worked very well.
    Check out the "this article" link to get the fix straight
    from the horse's mouth.

    I was following this adobe article (
    http://www.adobe.com/devnet/dreamweaver/articles/php_macintosh.html)
    to set up PHP and MySQL and connect a MySQL database to dreamweaver
    in Mac OS 10.4.8 and I kept getting:
    "Can't connect to MySQL server through socket
    '/var/mysql/mysql.sock' ERROR#: 2002".
    After a lot of searching I came across
    this
    article which said that there was an error in the PHP and MySQL
    connection or something.
    Anyway all I had to do was type (in a TERMINAL window):
    $ sudo mkdir /var/mysql
    $ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
    and that fixed the problem, otherwise the adobe article
    worked very well.
    Check out the "this article" link to get the fix straight
    from the horse's mouth.

  • Connection to db rejected.Cannot connect to MySQL server

    here is the excaption
    connectToDb:02 - connection to db rejected.Cannot connect to MySQL server on localhost:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.net.BindException)
    and her is the class
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class DBconnect
    {  final static private String _url        = "jdbc:mysql://localhost:3306/diamonds";     //final static private String _driver     = "sun.jdbc.odbc.JdbcOdbcDriver";
        //final static private String _url        = "jdbc:odbc:diamonds";     //final static private String _driver     = "sun.jdbc.odbc.JdbcOdbcDriver";
        public Connection     _con                     = null;
         //private static Driver          driver          = null;
         private static Properties     properties     = null;
         Statement stmt                                 = null;
         public PrintStream     out;
            **connectToDb **
            public void connectToDb()        throws IOException
            //connect to the server and open the database
             try{
                   Class.forName("org.gjt.mm.mysql.Driver");
                   //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   //driver = (Driver)Class.forName (_driver).newInstance();
                   properties = new Properties();
                properties.put("user","sa");
                   properties.put("password","");
            catch (ClassNotFoundException e)
                   System.out.println("class not found:");
                   e.printStackTrace();
              catch (Exception e) {
                        e.printStackTrace();
                 throw new IOException("connectToDb:01- JDBC driver not found."+e.getMessage());
         synchronized void open()throws Exception
              try
                   if(_con == null)
                        try
                             _con = DriverManager.getConnection(_url,properties);
                             //_con = driver.connect(_url,properties);
                        catch (SQLException e)
                             e.printStackTrace();
                             System.out.println("connectToDb:02 - connection to db rejected."+e.getMessage());
                        stmt = _con.createStatement();
              catch (Exception e)
                   e.printStackTrace();
                   System.out.println("connectToDb:02 - connection to db rejected."+e.getMessage());
         synchronized void close()
              try
                   if(_con != null)
                        if(!_con.isClosed())
                             stmt.close();
                             _con.close();
                             _con = null;
              catch (Exception e)
                   System.out.println("es:fail to close connection!!");
    }the problem occars when there are a lot of queries that the project is sending to the DB (about 10000) the last half queries fails and send an excaption .
    after 2 minutes the system seems like working fine.
    I am stack with this problem about a year and cann't resolve it.
    any idea????
    regards
    amnon m

    well...new it seems to work fine, but is it ok to
    keep connection open for good ???
    isn't there any other alternative ???I am bit confused are you pooling the connections?
    If so, actually the connections will not always stay open.. they will time out after a while when they are not in use but to specifically answer your question.. how could it possible be a bad thing. If the server/your app was getting bogged down with opening and closing connections then pooling solves this..
    Finally as to your question of the alternatives... if the problem was opening and closing connections and reusing them through a pool solved this then I think the answer is no. If you don't like a specific part of the way the pool works it is probably configurable in some way and you could always implement your own pool.. although I wouldn't overly recommend that. The bottom line is that you need to keep your connections open for reuse.. pooling is the simplest way to achieve this.. but no there is no alternative to keeping your connections open if you are having the load problems you described.

  • MySQL conversion: can't connect to mysql server

    Hi all,
    I've downloaded the latest migration workbench with the mysql plugin. After I've choosen the source database, I don't get a connection to the source database. The hourglass stays visible for about an hour, no message is shown.
    The error.log file complains about a NoClassDefFound, but I've installed the latest mysql jdbc driver.
    Did I miss something?
    Any help appreciated.
    Best Regards,
    Richard den Adel
    Java Architect, Vodafone Netherlands
    error.log:
    ** Oracle Migration Workbench
    ** Release 9.2.0.1.0 Production
    ** ( Build 20020308 )
    ** ORACLE_HOME: C:\ORANT\MigrationWorkbench
    ** user language: en
    ** user region: US
    ** user timezone: ECT
    ** file encoding: Cp1252
    ** java version: 1.1.8.16
    ** java vendor: Oracle Corporation
    ** o.s. arch: x86
    ** o.s. name: Windows NT
    ** o.s. version: 4.0
    ** Classpath:
    C:\ORANT\MigrationWorkbench\Omwb\olite\Oljdk11.jar;C:\ORANT\MigrationWorkbench\Omwb\olite\Olite40.jar;C:\Program Files\Oracle\jre\1.1.8\lib\rt.jar;C:\Program Files\Oracle\jre\1.1.8\lib\i18n.jar;C:\ORANT\MigrationWorkbench\Omwb\jlib;C:\ORANT\MigrationWorkbench\Omwb\jlib\Omwb.jar;C:\ORANT\MigrationWorkbench\Omwb\jlib\oembase-9_2_0.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\SQLServer6.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\SQLServer7.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\SQLServer2K.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\Sybase11.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\Sybase12.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\MSAccess.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\MySQL.jar;C:\ORANT\MigrationWorkbench\Omwb\drivers\mm.mysql.jdbc-1.2a;C:\ORANT\MigrationWorkbench\Omwb\plugins\Informix7.jar;C:\ORANT\MigrationWorkbench\Omwb\drivers\ifxjdbc.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\db2400v4r5.jar;C:\ORANT\MigrationWorkbench\Omwb\drivers\jt400.jar;C:\ORANT\MigrationWorkbench\lib\xmlparserv2.jar;C:\ORANT\MigrationWorkbench\rdbms\jlib\xsu111.jar;C:\ORANT\MigrationWorkbench\jdbc\lib\classes111.zip;C:\ORANT\MigrationWorkbench\lib\vbjorb.jar;C:\ORANT\MigrationWorkbench\jlib\netcfg.jar;C:\ORANT\MigrationWorkbench\jlib\ewt3.jar;C:\ORANT\MigrationWorkbench\jlib\ewtcompat-3_3_15.jar;C:\ORANT\MigrationWorkbench\jlib\share.jar;C:\ORANT\MigrationWorkbench\jlib\help3.jar;C:\ORANT\MigrationWorkbench\jlib\oracle_ice5.jar;C:\ORANT\MigrationWorkbench\jlib\kodiak.jar
    ** Started : Fri Aug 23 14:23:14 CEST 2002
    ** Workbench Repository : Oracle Lite ORDBMS 4.0.1.0.7
    ** The following plugins are installed:
    ** MySQL Release 9.2.0.1.0 Production
    ** Active Plugin : MySQL
    Exception occurred during event dispatching:
    java.lang.NoClassDefFoundError: org/gjt/mm/mysql/Driver
         at java.util.Vector.<init>(Vector.java:128)
         at oracle.mtg.mysql.server.MySQLServiceImpl.getDatabases(MySQLServiceImpl.java:1123)
         at oracle.mtg.mysql.ui.MySQLCaptureWizard._populateDatabases(MySQLCaptureWizard.java:1093)
         at oracle.mtg.mysql.ui.MySQLCaptureWizard.wizardValidatePage(MySQLCaptureWizard.java:633)
         at oracle.ewt.wizard.WizardPage.processWizardValidateEvent(Unknown Source)
         at oracle.ewt.wizard.WizardPage.validatePage(Unknown Source)
         at oracle.ewt.wizard.BaseWizard.validateSelectedPage(Unknown Source)
         at oracle.ewt.wizard.BaseWizard.doNext(Unknown Source)
         at oracle.ewt.wizard.BaseWizard$Action.actionPerformed(Unknown Source)
         at oracle.ewt.button.PushButton.processActionEvent(Unknown Source)
         at oracle.ewt.button.PushButton.processEventImpl(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at oracle.ewt.button.PushButton.activate(Unknown Source)
         at oracle.ewt.lwAWT.AbstractButton.processMouseReleased(Unknown Source)
         at oracle.ewt.lwAWT.AbstractButton.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Component.java:2210)
         at java.awt.Container.processEvent(Container.java:901)
         at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)
         at oracle.ewt.button.PushButton.processEventImpl(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Component.java:1819)
         at java.awt.Container.dispatchEventImpl(Container.java:946)
         at java.awt.Component.dispatchEvent(Component.java:1751)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:1848)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:1637)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1538)
         at java.awt.Container.dispatchEventImpl(Container.java:933)
         at java.awt.Window.dispatchEventImpl(Window.java:509)
         at java.awt.Component.dispatchEvent(Component.java:1751)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    ** Shutdown : Fri Aug 23 14:29:03 CEST 2002
    ** Oracle Migration Workbench
    ** Release 9.2.0.1.0 Production
    ** ( Build 20020308 )
    ** ORACLE_HOME: C:\ORANT\MigrationWorkbench
    ** user language: en
    ** user region: US
    ** user timezone: ECT
    ** file encoding: Cp1252
    ** java version: 1.1.8.16
    ** java vendor: Oracle Corporation
    ** o.s. arch: x86
    ** o.s. name: Windows NT
    ** o.s. version: 4.0
    ** Classpath:
    C:\ORANT\MigrationWorkbench\Omwb\olite\Oljdk11.jar;C:\ORANT\MigrationWorkbench\Omwb\olite\Olite40.jar;C:\Program Files\Oracle\jre\1.1.8\lib\rt.jar;C:\Program Files\Oracle\jre\1.1.8\lib\i18n.jar;C:\ORANT\MigrationWorkbench\Omwb\jlib;C:\ORANT\MigrationWorkbench\Omwb\jlib\Omwb.jar;C:\ORANT\MigrationWorkbench\Omwb\jlib\oembase-9_2_0.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\SQLServer6.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\SQLServer7.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\SQLServer2K.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\Sybase11.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\Sybase12.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\MSAccess.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\MySQL.jar;C:\ORANT\MigrationWorkbench\Omwb\drivers\mm.mysql.jdbc-1.2a;C:\ORANT\MigrationWorkbench\Omwb\plugins\Informix7.jar;C:\ORANT\MigrationWorkbench\Omwb\drivers\ifxjdbc.jar;C:\ORANT\MigrationWorkbench\Omwb\plugins\db2400v4r5.jar;C:\ORANT\MigrationWorkbench\Omwb\drivers\jt400.jar;C:\ORANT\MigrationWorkbench\lib\xmlparserv2.jar;C:\ORANT\MigrationWorkbench\rdbms\jlib\xsu111.jar;C:\ORANT\MigrationWorkbench\jdbc\lib\classes111.zip;C:\ORANT\MigrationWorkbench\lib\vbjorb.jar;C:\ORANT\MigrationWorkbench\jlib\netcfg.jar;C:\ORANT\MigrationWorkbench\jlib\ewt3.jar;C:\ORANT\MigrationWorkbench\jlib\ewtcompat-3_3_15.jar;C:\ORANT\MigrationWorkbench\jlib\share.jar;C:\ORANT\MigrationWorkbench\jlib\help3.jar;C:\ORANT\MigrationWorkbench\jlib\oracle_ice5.jar;C:\ORANT\MigrationWorkbench\jlib\kodiak.jar
    ** Started : Mon Aug 26 08:29:36 CEST 2002

    What is the version of your mm.mysql driver? We test using version 1.2a
    Have you placed the zip files (mm.mysql.jdbc-1.2a.zip) in the %ORACLE_HOME%\Omwb\drivers directory?
    Donal

  • Plz help me--error connecting to MySQL server

    While trying to connect to the MySQL server database,
    SqlConn = DriverManager.getConnection("jdbc:mysql://" + "database_server_addr/database_name?user=kiosk&password=!xyzabc");
    I get the following error.
    Error while connecting to mysql
    Communication link failure: null
    Notice the ! symbol(exclamation mark) present in the connection string above for the password value i.e., !xyzabc
    Is the problem with the ! symbol in my password, coz I am able to connect
    if I changed my password omitting the ! symbol. But I would like to connect with the ! symbol in the password. Any quick help is appreciated.
    Thanks,
    Bussa.
    [email protected]

    specify the database Server address, you can't do it with the "HTTP URL"
    String url = "jdbc:mysql://xxx.xxx.xxx.xxx";
    Class.forName("mySql spec");
    Connection con = DriverManager.getConnection(url,"user", "pass");

  • Problem of remote connection on MySql Server from Mac OSX

    Hi everyone,
    I have a flash application that work on both plateforms Pc and Mac. In this application i do a connection to a MySqlDatabase to activate it.
    so, to make my tests i have a pc and mac on the same home network
    to make sure it works fine, i have installed EasyPhp on my PC and MAMP on the Mac, to be able to test the connection to local MySqlServer.
    the syntaxe that i use to connect to the database is this one :
    mdm.Database.MySQL.connect(host:String, port:String, compression:Boolean, userName:String, password:String, databaseName:String)
    So, to connect to local MySqlServer : i have this code:
    mdm.Database.MySQL.connect("localhost", "3306", true, "root", "", "DBName");
    and it work just fine on the PC using EasyPhp and on the Mac using MAMP. I can connect on my database on each plateform.
    So now, i want to connect to our remote MySqlServer, so, to connect to our Private server : i have this code:
    mdm.Database.MySQL.connect("64.150.160.230", "3306", true, "userName", "userPassword", "DBName");
    on the PC: it works just fine, i am able to connect to our database and do queries on our private server.
    on the Mac : it cannot connect... errore message: unable to connect to server
    I really don't know where it is coming from.
    I would like to test a connexion to my remote MySqlDatabase, by sinf just the terminal. Does anyone know the syntaxe to use to connect to a remote MySqlDatabase using the Terminal?
    It can be a blocked port on my Mac, because i am able to connect with this port on my local MySql Server...
    Any help will be welcome.
    Best regards.
    Mac OS X (10.4.9) 2Ghz Intel Core 2 Duo
      Mac OS X (10.4.9)   2Ghz Intel Core 2 Duo

    Dud you install the mysql software?

  • Establishing connection to MySQL server/database

    Hi! I've got a question about subj. Here is my code:
    import java.sql.*;
    import java.util.*;
    class SQLDB {
        int db_port;
        String db_url, db_name, db_table, db_user, db_passwd;
        public void dbConnect() throws SQLException {
            Connection con = new Connection();
            Properties prop = new Properties();
            prop.put("charSet", "utf8");
            prop.put("user", db_user);
            prop.put("password", db_passwd);
            con = DriverManager.getConnection(db_url, prop);
    }NetBeans says that Connection (Connection con = new Connection()) object is abstract and can't be instantiated. Can anyone suggest me what to do?

    Agree :) But faced another problem. I made this part of code after reading various info on this matter:
    package dbCinema;
    import java.sql.*;
    //import java.util.*;
    class SQLDB {
        private int db_port;
        private String db_url, db_name, db_user, db_passwd;
        private Connection con = null;
        private Statement db_query = null;
        private ResultSet rs = null;
        SQLDB(String dburl, String dbname, String dbuser, String dbpasswd, int dbport) {
            db_url = dburl;
            db_name = dbname;
            db_user = dbuser;
            db_passwd = dbpasswd;
            db_port = dbport;
        public void dbConnect() {
            String url;
            //url = "jdbc:mysql://" + db_url + ":" + db_port + "/" + db_name;
            url = "jdbc:mysql://" + db_url + "/" + db_name;
            try {
                Class.forName("org.gjt.mm.mysql.Driver");
                con = DriverManager.getConnection(url, db_user, db_passwd);
                if (!con.isClosed())
                    System.out.println(db_name + ": connection established.");
            } catch (SQLException e) {
                System.err.println("Exception: " + e.getMessage());
            } catch (ClassNotFoundException e) {
                System.err.println("Exception: " + e.getMessage());
        public void dbQuery(String query) throws SQLException {
            db_query = con.createStatement();
            rs = db_query.executeQuery(query);
            while (rs.next()){
                System.out.println(rs.getString(3));
        public static void main(String args[])  {
            SQLDB comm = new SQLDB("localhost", "cinema", "", "", 3306);
            try {
                comm.dbConnect();
                comm.dbQuery("SELECT * from t_movies WHERE id=1");
            } catch (SQLException e) {
                System.err.println("Exception: " + e.getMessage());
    }And having this error as a result of running this class:
    > "java" SQLDB
    java.lang.NoClassDefFoundError: SQLDB (wrong name: dbCinema/SQLDB)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.access$000(Unknown Source)
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Exception in thread "main"
    Process Exit Code: 1
    Time Taken: 00:01I've downloaded and installed into my java jre/lib/ext folder this driver (mysql-connector-java-5.1.6-bin.jar) to make connection possible. What's wrong?
    Edited by: Utah on Aug 14, 2008 12:12 PM

  • Unidentified error when connecting to Mysql server

    Hello,
    I have two computers. Both computer 1 is configured with dreamweaver cs5 and is successfully connected to the ftp server and its database.
    Computer 2 on the other hand with the same version of Dreamweaver and the same settings gives me an unidentified error when I try connecting to the database. I spoke to help chat for my server and confirmed all of the fields are entered in correctly and that I have allowed access to my server from any IP!
    I have tried re-installing !
    Localhost with Xampp works also!
    No success !

    Are you using any firewall/antivirus on computer 2?
    If so, try to disable and then try,
    Also make sure you have the Admin rights on Comp2.
    Thanks
    Harshit

  • Cannot connect to mysql server

    [530211450FCD7FAD57BCBD082C766733] [ERR] Errore JDBC:java.lang.NoClassDefFoundError: java/sql/SQLClientInfoException.
    Even i already set mysql-connector-java-5.1.3-rc-bin in JDK1.5\lib\ext folder.

    SQLClientInfoException is a rather new class that was added only in Java 6.
    It seems that this version of the MySQL JDBC driver requires Java 6.

  • Address book application in java using jdbc to connect to mySQL server

    hi there .....
    as clear from the topic i want to make an address book.....as above
    this is my first ever proper application of java
    i have this plan
    class GUI{* contains all components */}
    class links_GUI_to_db{* contains business logic simple enough from name */}
    then i make objects of both classes in "Main" class and all processes are done there
    as i am totally new to this thing , i would like some advice and an initial guideline on how to proceed
    i am NOT ASKING for code but advice on interaction of classes and how to proceed intitially
    thanks

    Hi,
    The answer depends pretty much on how ambitious you are, and several articels and books can be written on the topic, so it's unfortunately not something that can be fully answered in a short post.
    My best advice is that you google on MVC and on how to create layered applications. You can after that start reading e.g. JDBC tutorials and Swing tutorials (if that is the UI that you are going to use).
    Kaj
    Ps. I would probably not use MySQL as database for an address book. I would instead use a database that doesn't require installation. E.g. H2 or Derby.

  • Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'

    I'm using the pre-installed versions of php and mysql under Mac OS X Server 10.4.4 running on a G4 and am unable to get anything involving mysql to work.
    I ssh to the server and enter various commands in Terminal:
    on typing "mysql" I get
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
    and on typing "mysqladmin version" I get
    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
    On typing "sudo mysqld_safe" I get
    Starting mysqld daemon with databases from /var/mysql
    STOPPING server from pid file /var/mysql/MyServer.local.pid
    070722 16:06:05 mysqld ended
    /var/mysql/MyServer.local.err contains
    070722 16:06:04 mysqld started
    070722 16:06:04 [Warning] Setting lowercase_tablenames=2 because file system for /var/mysql/ is case insensitive
    070722 16:06:04 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    070722 16:06:05 InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 43634.
    /var/mysql has permissions 775.
    The line
    mysql.default_socket = /var/mysql/mysql.sock
    is in /etc/php.ini
    whereis mysqladmin ->
    /usr/bin/mysqladmin
    whereis mysql ->
    /usr/bin/mysql
    ls /var/mysql ->
    MyServer.local.err
    ib_logfile1
    mysql
    ib_logfile0
    ibdata1
    test
    Can't find my.cnf or my.ini anywhere
    Can't find mysql.sock anywhere
    I'm trying to get a bug database running (mantis) under Mac OS X Server 10.4.4 that I can access from local clients.
    I'm trying to follow directions at http://www.mantisbugtracker.com/manual/manual.installation.php
    without knowing anything about mysql or php and I'm stuck on step 3:
    "Next we will create the necessary database tables and a basic configuration
    file."
    I get a message saying
    "Does administrative user have access to the database? ( Lost connection to MySQL server during query )"
    I don't even know if following the mantis directions has resulted in the creation of a database or not. Where would it be?
    Thanks for any help.
    Intel iMac   Mac OS X (10.4.10)  

    I've just done a clean install of OSX Server and added the latest MYSQL packaged installer. Afterwards I found the lock file in /private/tmp/mysql.lock
    The easiest way to solve this problem is to create a symbolic link so that the lock file appears to be in right place.
    e.g.
    cd /var
    sudo mkdir mysql <== this assumes the directory is missing
    cd mysql
    sudo ln -s /private/tmp/mysql.sock mysql.sock
    After this msql commands should work fine, and you've not fiddled with the security settings on users/groups.
    HTH
    Christian

  • Cannot connect java to mysql server 2000

    I was unable to connect to the mysql server 2000 with the jcreator.
    The following exception was thrown:
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection refused: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection refused: connect at com.mysql.jdbs.StandardSocketFactory.connect<StandardSocketFactory.java:156?
    at com.mysql.jdbc.MysqlIO.<init><MysqlIO.java:284>
    ** END NESTED EXCEPTION **
    and the code i used was :
    package com.stardeveloper.example;
    import java.sql.*;
    public class JCustomer {
    public static void main(String args[]) {
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con = DriverManager.getConnection("jdbc:mysql:///Customer", "user", " ");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    I donot have any user and pwd for the MYsql server, it is local host connection and window authentication is used.

    eventhough it is local ,you may need to specify dns/localhost/ip with port number.
    otherwise you can use myODBC driver which is freely available in mysql website. you can connect to the database using Data source Name, just like using any other ODBC connectivity.

  • Connecting to SQL Server and MYSQL from a Java stored procedure

    hope someone can help with this. i'm trying to connect to different databases (My SQL, SQL Server) from a java stored procedure. when invoking from within an oracle 9i database, i get the java exception error -
    "Cannot connect to MySQL server on 135.177.196.75:3306. Is there a MySQL server running on the machine/port you are trying to connect to?java.security.AccessControlException)".
    this store procedure works fine when invoked from outside of oracle. any replies would be greatly appreciated. thanks!

    the correct drivers have been loaded. it works when called from outside of oracle. only when invoking from within oracle do we get the error message "Cannot connect to MySQL server on 135.177.196.75:3306. Is there a MySQL server running on the machine/port you are trying to connect to?(java.security.AccessControlException)". it sounds like a permissions/security/configuration issue - oracle is not allowing access to the machine/port for the MySQL or SQL Server database. appreciate the responses so far.

  • Mysql_connect "Lost connection to MySQL..." error 61

    A web developer is getting this error on a test web server of ours that is running 10.5.7 Server.
    "Warning: mysql_connect() function.mysql-connect: Lost connection to MySQL server at 'reading initial communication packet', system error: 61 in..."
    I've seen other postings online for this error suggesting that the line containing 'bind-address 127.0.0.1' be commented out within /etc/my.conf... but this line doesn't exists on my installation.
    MySQL and php have been working well for other databases and developers. This is a newly created database.
    Has anyone else seen this error and found a fix?
    Thanks!

    This is more than likely a firewall problem on your users end. I just ran into this when moving my servers to a colocation. Everything was fine until i tried to connect to an outside database from the machines behind the new firewall. was set to allow 3306 in, but not out. And would connect without issues to localhost:/var/mysql/mysql.sock .
    from the machine trying to connect from try
    shell> telnet <servername> 3306
    should be able to login. if refused, then port is closed.
    -------

Maybe you are looking for

  • Acrobat 9.3.2 crashes at every OCR attempt (Windows 7)

    Title says it all. Every time I try to use OCR functionality I get a popup that says: "Adobe Acrobat 9.3 has stopped working" "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is avai

  • Apple DVD player not working on Mid 2011 iMac running 10.7.2

    I have a 21.5-inch, Mid 2011 iMac which came with Lion preinstalled.  When I insert a DVD, Apple's DVD player comes up with the following error: "A valid video device could not be found for playback. [-70017]" The DVD player works.  I can play DVDs u

  • Why is the Macbook Pro graphics card worse than my school's Macbooks.

    I have some problems with games on my Macbook Pro and I usually have to play games on low quality. So I checked on System profiler what my graphics card is, (I can't list it becase i'm at school) and compared it with my schools graphic card. I think

  • Stock Transport in Plants Abroad and Tax Reporting

    Hello, We have Plants Abroad and we need to account stock transports between our plants abroad. We have defined a billing document type for determining taxes for plants that are abroad, so it appears on Tax Report and EC Sales List. The issue is that

  • How to run [strike]line thru work[/strike] while leaving it visible

    in body of text sometimes useful to 'strike' one term out, leaving it visible to recipient, while adding an alternate term after '/strike' Have been unable to figure out how to do this, or read any prior tip. Please advise.