Replace localhost with 10.0.2.2 and you should be all set. See http://developer.android.com/guide/developing/tools/emulator.html#emulatornetworking
On Tue, Feb 9, 2010 at 1:57 AM, saravanan p <[email protected]> wrote: > Hi > > I am new to android development. How to connect mysql > server from our android emulator. I am using > > > > private String url = "jdbc:mysql://localhost:3306/"; > > dbname =test; > > username = ""; > > password = ""; > > Class.forName("com.mysql.jdbc.Driver"); > > Connection con = DriverManager.getConnection(url+dbName, > username, password); > > > > But I got the exception java.lang.ClassNotFoundException: > com.mysql.jdbc.Driver > > > > Please tell me the solution for this proplem. > > > > Thanks > > > > P.saravanan > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

