Trying to connect remotely to a MySQL database

Hi.
I'm trying to connect to a MySQL database remotely (located on the internet).
I'm behind a proxy too.
The code I use is:
public class MysqlConnect{
public static void main(String[] args) {
System.out.println("MySQL Connect Example.");
Connection conn = null;
String url = "jdbc:mysql://216.75.32.55:3306/";
String dbName = "**********";
String driver = "com.mysql.jdbc.Driver";
String userName = "***********";
String password = "*************";
try {     
Class.forName(driver);
conn = DriverManager.getConnection(url+dbName,userName,password);
System.out.println("Connected to the database");
conn.close();
System.out.println("Disconnected from database");
} catch (Exception e) {
e.printStackTrace();
but i get nested exception like this:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException
MESSAGE: Connection timed out: connect
STACKTRACE:
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:208)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:267)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at consola.MysqlConnect.main(MysqlConnect.java:25)
** END NESTED EXCEPTION **
Last packet sent to the server was 31 ms ago.
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2814)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at consola.MysqlConnect.main(MysqlConnect.java:25)
Can you please tell me what am I doing wrong?
Thank you

I'm behind a proxy too.Does this proxy allow connections on port 3306?

Similar Messages

  • Connection of Forms6i with MySQL database

    Hi all,
    Can any knows how to connect Form builder to MySQL Database.
    I'am using Oracle Form builder 6i
    and MySQL 3.23 Under Windows NT 4.0( Service pack 5a)
    Pls give me your valuable suggestion
    Regards,
    Seema

    use odbc

  • Problem connecting my webservice to mysql database

    Hi,
    I am trying to connect a webservice to a mysql database. I am using sun application server 8.1 and Mysql 4.1.
    I have been using the application servers examples to achieve my goals thus far. I have made the following progress.
    - I have got a simple jdbc web application on the application server to access my mysql database.
    - I have got a web service on the application server to work properly, in regards to performing a simple rpc method such as 'sayHello'.
    - I now want my webservice to have similar functionality to the jdbc application. A simple query or update to the database installed on the application server invoked from the webservice deployed on the application server.
    I have been having difficulty in achieveing this. I don't understand why I can't get this to work as i can achieve access to the database from the jdbc app. I am getting the following errors on the application server log:
    [#|2005-03-01T14:22:59.739+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    retrieving_initial_context...|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    retrieved_initial_context_successfully|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    recording_the_greeting...|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_datasource...|#]
    [#|2005-03-01T14:22:59.799+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_datasource_successfully|#]
    [#|2005-03-01T14:22:59.799+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_connection...|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_connection_successfully|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_statement...|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_statement_successfully|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    executing_query...|#]
    [#|2005-03-01T14:22:59.900+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    could_not_interact_with_db|#]
    [#|2005-03-01T14:22:59.910+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    excpetion: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.io.IOException
    MESSAGE: An established connection was aborted by the software in your host machine
    STACKTRACE:
    java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
    at sun.nio.ch.IOUtil.read(IOUtil.java:206)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207)
    at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:75)
    at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:66)
    at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:75)
    at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(Re adAheadInputStream.java:94)
    at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:122)
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1842)
    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2292)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2291)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2226)
    at com.mysql.jdbc.Statement.executeQuery(Statement.java:1159)
    at goodbyeservice.GoodbyeImpl.sayGoodbye(Unknown Source)
    at goodbyeservice.GoodbyeIF_Tie.invoke_sayGoodbye(GoodbyeIF_Tie.java:54)
    at goodbyeservice.GoodbyeIF_Tie.processingHook(GoodbyeIF_Tie.java:124)
    at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:321)
    at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate. java:443)
    at com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterCha in.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.ja va:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextVal ve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 173)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:13 2)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.ja va:653)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.ja va:534)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.jav a:403)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    ** END NESTED EXCEPTION **
    I can't think of what the problem may be other then the following issues:
    - the mysql database would allow access from the jdbc application as it is seen as a local process whereas it may not for the webservice as it is seen as a remote process???
    - I may need to utilize a different datasource class to give the webservice access rights?
    Any help or advice in how this problem might be resolved or even just what it is would help me greatly. Thanks for you time in advance.
    Alvee

    The driver is in right place
    Originally I placed him in wrong directory and got an error, indicationg, that Driver class is not found, but then I corrected it, The problem is in connection to database - it doesn't work.
    I tired to load the same driver into Netbeans and could easyli create a connection to database, but I get it not working ander Sun Application server

  • 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

  • Error message when trying to connect to a SQL Server Database

    All:
    I get the following message when I try to connect to a SQL Server Database within a form:
    "Connection for Source DataConnection failed because the environment is not trusted"
    Can anyone help me solve this problem?
    Thanks,
    BR

    Hi Brian,
    In Acrobat, security concerns dictate that you cannot specify an ODBC connection string by using the Driver=; syntax. Therefore, the client computer using the form needs to have a DSN pre-configured for ODBC connections.
    Denver
    Adobe Enterprise Developer Support

  • Errors in visual studio webpage code (Trying to connect the website to a database)

    I am trying to create a website on (visual studio) and connect it to database(Microsoft sql server 2014) first I am learning from a video on youtube the tutorial is about a coffee website and database
    I have a few errors but I dont know where is the problem
    the errors in this page(Coffee.aspx.cs)
    Error    1    Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).    C:\Users\Ziyad 1\Documents\Visual Studio
    2013\WebSites\MyWebsite\Pages\Coffee.aspx.cs    7    33    MyWebsite
    Error    4    'ASP.pages_coffee_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to override    c:\Users\Ziyad 1\AppData\Local\Temp\Temporary ASP.NET Files\root\e78a0b4c\be391a08\App_Web_k4b10ys2.0.cs  
     572    
    Error    3    'ASP.pages_coffee_aspx.GetTypeHashCode()': no suitable method found to override    c:\Users\Ziyad 1\AppData\Local\Temp\Temporary ASP.NET Files\root\e78a0b4c\be391a08\App_Web_k4b10ys2.0.cs  
     567    
    Error    5    'ASP.pages_coffee_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable'    c:\Users\Ziyad 1\AppData\Local\Temp\Temporary ASP.NET Files\root\e78a0b4c\be391a08\App_Web_k4b10ys2.0.cs  
     185    
    and here is the page (Coffee.aspx.cs) code
    using System;
    using System.Collections;
    using System.Text;
    namespace Pages
    public partial class Pages_Coffee : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
    FillPage();
    private void FillPage()
    ArrayList coffeeList = ConnectionClass.GetCoffeeByType(DropDownList1.SelectedValue);
    StringBuilder sb = new StringBuilder();
    foreach (Coffee coffee in coffeeList)
    sb.Append(
    string.Format(
    @"<table class='coffeeTable'>
    <tr>
    <th rowspan='6' width='150px'><img runat='server' src='{6}' /></th>
    <th width='50px'>Name: </td>
    <td>{0}</td>
    </tr>
    <tr>
    <th>Type: </th>
    <td>{1}</td>
    </tr>
    <tr>
    <th>Price: </th>
    <td>{2} $</td>
    </tr>
    <tr>
    <th>Roast: </th>
    <td>{3}</td>
    </tr>
    <tr>
    <th>Origin: </th>
    <td>{4}</td>
    </tr>
    <tr>
    <td colspan='2'>{5}</td>
    </tr>
    </table>", coffee.Name, coffee.Type, coffee.Price, coffee.Roast, coffee.Country, coffee.Review, coffee.Image));
    lblOuput.Text = sb.ToString();
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    FillPage();
    also tis is the page (Coffee.aspx)code
    <%@ Page Title="" Language="C#" MasterPageFile="~/Masterpage.master" AutoEventWireup="true" CodeFile="Coffee.aspx.cs" Inherits="Coffee" %>
    <script runat="server">
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    </script>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p>
    Select a type:<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="sds_type" DataTextField="type" DataValueField="type" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
    </asp:DropDownList>
    <asp:SqlDataSource ID="sds_type" runat="server" ConnectionString="<%$ ConnectionStrings:CoffeeDBConnectionString %>" SelectCommand="SELECT DISTINCT [type] FROM [coffee] ORDER BY [type]"></asp:SqlDataSource>
    </p>
    <p>
    <asp:Label ID="lblOutput" runat="server" Text="Label"></asp:Label>
    </p>
    </asp:Content>
    this is th (ConnectionClass.cs)code
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Collections;
    using System.Configuration;
    using System.Data.SqlClient;
    public static class ConnectionClass
    private static SqlConnection conn;
    private static SqlCommand command;
    static ConnectionClass()
    string connectionString =
    ConfigurationManager.ConnectionStrings["coffeeConnection"].ToString();
    conn = new SqlConnection(connectionString);
    command = new SqlCommand("", conn);
    public static ArrayList GetCoffeeByType(string coffeeType)
    ArrayList list = new ArrayList();
    string query = string.Format("SELECT * FROM coffee WHERE type LIKE '{0}'", coffeeType);
    try
    conn.Open();
    command.CommandText = query;
    SqlDataReader reader = command.ExecuteReader();
    while (reader.Read())
    int id = reader.GetInt32(0);
    string name = reader.GetString(1);
    string type = reader.GetString(2);
    double price = reader.GetDouble(3);
    string roast = reader.GetString(4);
    string country = reader.GetString(5);
    string image = reader.GetString(6);
    string review = reader.GetString(7);
    Coffee coffee = new Coffee(id, name, type, price, roast, country, image, review);
    list.Add(coffee);
    finally
    conn.Close();
    return list;
    (web.confg)code
    <?xml version="1.0"?>
    <configuration>
    <appSettings/>
    <connectionStrings>
    <clear/>
    <add name="coffeeConnection"
    connectionString="Data Source=LOCALHOST\SQLEXPRESS;Initial Catalog=CoffeeDB;Integrated Security=True"
    providerName="System.Data.SqlClient"/>
    </connectionStrings>
    <system.web>
    <compilation debug="true" targetFramework="4.0">
    <assemblies>
    <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    </assemblies>
    </compilation>
    <authentication mode="Windows"/>
    </system.web>
    </configuration>
    and finally this is the SQL code
    GO
    CREATE TABLE [dbo].[coffee](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [name] [varchar](50) NOT NULL,
    [type] [varchar](50) NOT NULL,
    [price] [float] NOT NULL,
    [roast] [varchar](50) NOT NULL,
    [country] [varchar](50) NOT NULL,
    [image] [varchar](255) NULL,
    [review] [text] NOT NULL,
    PRIMARY KEY CLUSTERED
    [id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    SET IDENTITY_INSERT [dbo].[coffee] ON
    INSERT [dbo].[coffee] ([id], [name], [type], [price], [roast], [country], [image], [review]) VALUES (1, N'Café au Lait', N'Classic', 2.25, N'Medium', N'France', N'../Images/Coffee/Cafe-Au-Lait.jpg', N'A coffee beverage consisting strong or bold coffee (sometimes espresso) mixed with scalded milk in approximately a 1:1 ratio.')
    INSERT [dbo].[coffee] ([id], [name], [type], [price], [roast], [country], [image], [review]) VALUES (2, N'Caffè Americano', N'Espresso', 2.25, N'Medium', N'Italy', N'../Images/coffee/caffe_americano.jpg', N'Similar in strength and taste to American-style brewed coffee, there are subtle differences achieved by pulling a fresh shot of espresso for the beverage base.')
    INSERT [dbo].[coffee] ([id], [name], [type], [price], [roast], [country], [image], [review]) VALUES (3, N'Peppermint White Chocolate Mocha', N'Espresso', 3.25, N'Medium', N'Italy', N'../Images/coffee/white-chocolate-peppermint-mocha.jpg', N'Espresso with white chocolate and peppermint flavored syrups.
    Topped with sweetened whipped cream and dark chocolate curls.')
    INSERT [dbo].[coffee] ([id], [name], [type], [price], [roast], [country], [image], [review]) VALUES (4, N'Irish Coffee', N'Alcoholic', 2.25, N'Dark', N'Ireland', N'../Images/coffee/irish coffee.jpg', N'A cocktail consisting of hot coffee, Irish whiskey, and sugar, stirred, and topped with thick cream. The coffee is drunk through the cream.')
    SET IDENTITY_INSERT [dbo].[coffee] OFF
    I am still a beginner ~~ I need to understand what are these errors and how to solve them

    Hello,
    Welcome to MSDN forum.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because your issue is about website, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Connecting to a LIVE mySQL database via Dreamweaver (ASP)

    Hi All,
    Have a bit of of an issue with connecting to my live database... I've created several sites in PHP and each time its been really easy to set up a connection to the live database (on a shared server), and work using live data... but I can't figure out how to do it when working on an ASP (vb) site!? Can anyone direct my on how to do it please? ... or direct to some documentation on the subject? Cheers!
    Regards,
    Dan

    Sorry for jumping into the thread with a bit of an off topic question, but how do you find out what kind of a db the asp server is using? I've asked my company's web host a number of times for info/help in getting connected using Dreamweaver so I can redesign our site and I never hear back from them. It's a very specialized web hosting server set up for rubber stamp web sites. Looks like most of their customers use the online website design tool that they provide, but it is very limited in what it can do. Very limited.
    They give me ftp access and I've changed what I can on the page, but with out access to the db it's hard to really change the look of the site.
    Here's the link:
    http://www.tacomarubberstamp.com

  • Three error message while trying to connect remotely to my desktop.

    Hi,
    I've been trying to access my desktop remotely, no success.  I keep getting THREE error messages.
    1. Remote acces to sever is not enables.
    2. The remote computer is turned off.
    3. The remote computer is not available on the network.
    Please help!  I've been trying since yesterday.  Note that this is the first time I've been trying to use the 'remote' feature.  Maybe there was something I forgot to setup?  I've enable remote access on both my laptop and desktop. 
    Was there more I was supposed to do?  Both my laptop and desktop are running Windows 7.
    Thank you!

    What version of Windows 7 are you using?
    Are you able to ping your desktop to verify the 2 devices can communicate over the network properly? 
    Do you have any 3rd party firewall software installed?
    Regards,
    Jason Wilder
    | MCIPT:SharePoint 2010 | MCSA:Server 2003 | MCTS:SharePoint 2010, SharePoint 2007, Windows Vista |

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

  • MySQL database connection: Communications link failure Last packet sent to the server was 0 ms ago.

    Hello,
    I am trying to connect to an external MySQL database from within a bundle.
    But I keep getting this error:
    Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure Last packet sent to the server was 0 ms ago.)
    These are the details of my bundle:
    1)          Spring bundle(using Spring DM)
    2)          MySQL database is at port 7046 so my bean is as below:
    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
                        <property name="driverClassName" value="com.mysql.jdbc.Driver" />
                        <property name="url"  value="jdbc:mysql://instance13550.db.xeround.com:7046/jas" />
                        <property name="username" value="mysql" />
                        <property name="password" value="mysql" />
    </bean>
    My bundle connects to the mysql database from withina  local  felix installation. But when I put the same bundle within CQ I get the error.
    Please help.
    Karan

    I dont know the answer, but if you google for this, some articles listed might help:
    re: "Communications link failure Last packet sent to the server was"
    Note: I use 're:' which is short for 'reply',
    I think you will also be better off using preparedStatements. Dont forget to use preparedStatement.clearParameters() just before preparedStatements.setString() items in the loop
    Also, I question why you need to test having 1000 test users all banging away at your application at once. Chances are, most will be staring at your web page and only a few will ever hit the update/insert button
    within the same 100 milliseconds or so that your process takes to update.

  • CS3 mysql database connection using php

    Hi, this is my first time trying to connect to a database.  I have created a mysql database with my hosting provider.  I am also configured to use php. I have ready numerous threads on this topic, but am still confused.
    I am getting the following error message:
    When I enter the following information into the connection string, I get the following error Error http error code 404 file not found. The site does not map to ftp.readyhosting.com/_mmserverscripts/mmhttdb.php Is the location of mysql server correct? Connection name ? user defined ?aosprod?
    Mysql server = aoswebeditor.readyhostingmysql.com.  Also, this is not the same location as the web server. 
    The hosting company provides the following php code to connect to the database. 
    <?php
    $link = mysql_connect('aoswebeditor.readyhostingmysql.com', 'aosweb', '*password*');
    if (!$link) {
        die('Could not connect: ' . mysql_error());
    echo 'Connected successfully';
    mysql_select_db(aos);
    ?>
    Because of the connection dialog boxes in CS3, I have not used this php code but only used the mysql server aoswebeditor.readyhostingmysql.com.
    My requirements are very simple, I want to use the same remote database for the dreamweaver connection for the remote and testing server.
    Any ideas would be appreciated.
    Thanks. George

    First of all, you seem to be mixed up about terminology. ASP stands for Active Server Pages, and is a type of server technology similar to PHP. I think you mean ISP (Internet Service Provider). However, this is not correct, either. An ISP provides your connection to the internet. Although some ISPs also host websites for their customers, your website is normally located at a hosting company. You need to get that mixup out of the way. Otherwise, you might confuse people with future questions about ASP, when you actually mean something completely different.
    OK, lecture over...
    Your hosting company is following standard procedure by preventing remote access to MySQL databases. However, Dreamweaver does make it possible to use your remote database and website for testing purposes. It does so by uploading a hidden folder called _mmServerScripts to your remote server. This performs a local connection with your database, and then sends the results back to your local computer. When setting up your testing server definition in Dreamweaver, you need to provide the details as I indicated before. When creating a MySQL connection in Dreamweaver, fill in the server name and account details as given to you by your hosting company. If everything is set up correctly, you should be able to use your remote server and database for testing.
    Having said that, it is much better to install a local testing environment. You'll find it faster, and it also lets you make mistakes (an essential part of the learning process) in the security of a closed environment. For details of how to set up a local testing environment, see this article in the Adobe Developer Connection.

  • Error: when connecting to SAP XI to Mysql database server.

    Hi,
    I am getting this error when am trying to connect SAP XI to Mysql server.
    Can any body tell me how to resolve this error.
    Error during database connection to the database URL 'jdbc:mysql://172.17.120.98:3306/portal' using the JDBC driver 'com.mysql.jdbc.Driver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:mysql://172.17.120.98:3306/portal': SAPClassNotFoundException: com.mysql.jdbc.Driver'
    My Databse connection variables as listed below.
    JDBC Driver:com.mysql.jdbc.Driver
    Connection: jdbc:mysql://localhost:3306:portal

    Hi,
    Check wheather JDBC driver for mysql is intalled in your J2ee engine or not. Plz find the threads below.
    http://blog.chinaunix.net/u1/54114/showart_972697.html
    Re: After Delpoying drivers
    also go over the note:
    Note 831162 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 JDBC Adapter
    Note 941317 - known incompatibilities,
    Thanks,
    Venky

  • CONNECTING TO MySql DATABASE FROM Jdeveloper

    Hi,
    How can i connect to MySql database form Oracle Jdeveloper version 11.1.2.0.0.
    I was trying to create connection using create database connection dialog box but it is giving this error:
    Test failed: Driver class not found.
    Verify the Driver location
    Please can I get step by step procedure on how to create this connection.
    Thanks.

    Connect JDeveloper to a MySQL database - YouTube
    http://people.cis.ksu.edu/~hankley/d764/tut06/Ross_mySQL/mySQL.htm
    Hil &amp;amp; Co IT Solutions: Connecting to MySQL in JDeveloper

  • Cannot connect remotely to Database

    Dears,,
    I can connect to database as following:
    sqlplus sys/pass as sysdba
    But when trying to connect remotely as following:
    sqlplus sys/pass@vis as sysdba ( It gave me error )
    [oravis@ebsibm dbs]$ sqlplus sys/pass@vis as sysdba
    SQL*Plus: Release 10.2.0.3.0 - Production on Sat Apr 25 09:34:24 2009
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    ERROR:
    ORA-01031: insufficient privileges
    Enter user-name:
    _[oravis@ebsibm VIS_ebsibm]$ tnsping vis_
    TNS Ping Utility for Linux: Version 10.2.0.3.0 - Production on 25-APR-2009 10:15:25
    Copyright (c) 1997, 2006, Oracle.  All rights reserved.
    Used parameter files:
    _/oracle/VIS/db/tech_st/10.2.0/network/admin/VIS_ebsibm/sqlnet_ifile.ora_
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=ebsibm.othaim.corp.net)(PORT=1521)) (CONNECTDATA= (SERVICE_NAME=VIS) (INSTANCE_NAME=VIS)))_
    OK (10 msec)
    Note: I already created the password file
    [oravis@ebsibm dbs]$ orapwd file=/oracle/VIS/db/tech_st/10.2.0/dbs/orapwvis password=pass entries=10
    However, no records in v$pwfile_users:
    SQL> select *
    2 from v$pwfile_users;
    no rows selected
    Please, need your help ASAP
    Edited by: user4520487 on Apr 24, 2009 11:49 PM

    Dear,,
    db listener cannot be started.
    see the following please ( May be there are errors in these files )
    tnsnames.ora
    # This file is automatically generated by AutoConfig. It will be read and
    # overwritten. If you were instructed to edit this file, or if you are not
    # able to use the settings created by AutoConfig, refer to Metalink Note
    # 387859.1 for assistance.
    #$Header: NetServiceHandler.java 120.16.12000000.3 2007/09/14 10:00:07 schagant ship $
    EBS=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521))
    (CONNECT_DATA=
    (SERVICE_NAME=EBS)
    (INSTANCE_NAME=EBS)
    IFILE=/oracle/EBS/db/tech_st/10.2.0/network/admin/EBS_localhost/EBS_localhost_ifile.ora
    listener.ora
    # $Header: ad8ilsnr.ora 120.1 2006/06/07 05:52:02 sbandla noship $
    # This file is automatically generated by AutoConfig. It will be read and
    # overwritten. If you were instructed to edit this file, or if you are not
    # able to use the settings created by AutoConfig, refer to Metalink Note
    # 387859.1 for assistance.
    # Net8 definition for Database listener
    EBS=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521))
    (CONNECT_DATA=(SERVICE_NAME=EBS)(INSTANCE_NAME=EBS))
    #STARTUP_WAIT_TIME_EBS = 0
    #CONNECT_TIMEOUT_EBS = 10
    #TRACE_LEVEL_EBS = OFF
    #LOG_DIRECTORY_EBS = /oracle/EBS/db/tech_st/10.2.0/network/admin
    #LOG_FILE_EBS = EBS
    #TRACE_DIRECTORY_EBS = /oracle/EBS/db/tech_st/10.2.0/network/admin
    #TRACE_FILE_EBS = EBS
    #ADMIN_RESTRICTIONS_EBS = OFF
    #SUBSCRIBE_FOR_NODE_DOWN_EVENT_EBS = OFF
    IFILE=/oracle/EBS/db/tech_st/10.2.0/network/admin/EBS_localhost/listener.ora
    Sqlnet.ora
    # This file is automatically generated by AutoConfig. It will be read and
    # overwritten. If you were instructed to edit this file, or if you are not
    # able to use the settings created by AutoConfig, refer to Metalink Note
    # 387859.1 for assistance.
    #$Header: NetServiceHandler.java 120.16.12000000.3 2007/09/14 10:00:07 schagant ship $
    NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME)
    SQLNET.EXPIRE_TIME= 10
    SQLNET.AUTHENTICATION_SERVICES=(NTS)
    IFILE=/oracle/EBS/db/tech_st/10.2.0/network/admin/EBS_localhost/sqlnet.ora

  • Connection to MySQL database, DBCO settings

    Hi experts,
    I need to connect to a MySQL database located on a different side.
    I do have the IP and domain name (e.g. my.test.com), MySQL DB name (SAPtest), Username (SAPuser) and Password (*****).
    I did following entries under DBCO:
    Name: SQLtest
    DBMS: MSS
    User Name: SAPuser
    DB-Password: *****
    Env. Info: MSSQL_DNS=my.test.com
    Connection Limit: -
    Connection Optimum: -
    I hope you see already, that I get the error message SQL Server does not exists or access denied.
    I check already all kind of forum and posts, but couldn´t find a good and satisfying documentation for this case.
    Yes, MSS is not MySQL, but different user say it is possible with this settings.
    I am thankful for any help!

    Thank you for the answer.
    I know the MSS library is not made by name for connecting to a MySQL DB, but Gudmundur and Pedro Gallardo were giving solutions ON connect SAP to a MySQL database. It really sounds like it is compatible. That might be also the answer why SAP is not offering a special library for MySQL - yes that is really a guess.
    Maybe jdbc would be the best solution, but I have no idea how to use it within my ABAP program. Actually I have never used any Java code or programs under SAP.
    Do you have a sample code, where there is theI call for the JDBC connection out of my ABAP program to connect and disconnect to the MySQL DB? This would be very helpful.
    I simply want to open the connection write some data into the MySQL DB and then close the connection.
    Thanks!
    Edited by: Rene Gegusch on Jun 14, 2011 8:37 AM

Maybe you are looking for

  • Shipment cost - Europe VAT for carrier

    Hi All, I have problem in creating condition records for tax condition type. I am using below access sequence for tax determination in shipment costing country of departure ALAND , country of destination LLAND , country of service agent TDLNR_LND And

  • Adobe Acrobat Startproblem

    Hallo zusammen Ich habe ein Problem mit Adobe Acrobat Standard 7. Ich habe das Programm auf einem Windows 7 Rechner installiert. Ok, ist gegangen, hat auch super funktioniert etwa ein halbes Jahr. Dann habe ich aus Versehen den USERS Ordner auf dem D

  • Unable to assemble module ?

    Hi , i have an ear project that is assembled from several EJBProjects , utility modules and one dynamicWebPorject 2.3 everythign builds flawless but when deploying it fails when i add the web project , without it it's ok and when i only choose web pr

  • When i select the software in APP Store, the message i get is :App Store run with mistake(100)

    when i want to download  one software with pay in APP store, system send a message : App Store  failure in download, run with mistake 100

  • WBS definition change

    Hi, Actually we want to change the  Definition: WBS element,which it has been cost booked (they have booked cost in wbs as ABC but now in system it is availble as ABCD it is not allowing to change the wbs as ABC) Im having options providing the autho