473,785 Members | 2,737 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Embedded MySQL Server cannot connect (C-API)?

Hi,

I want to set up a mysql server in an embedded process. I managed to start
the server in my program as described through

mysql_server_in it()

Now I need a client connection to this server.

mysql_real_conn ect

tells me that it could not connect to the server through the
UNIX Domain socket.

How can I tell my client to connect to the embedded server ?

TIA

INGO
Jul 20 '05 #1
1 3023
There is a little mis-conception in the way MySQL configured. When we
got problem like this then we thought it is something related to the
network or configuration file. However, it is not. I got the same
problem before and luckily I figured it out. Here are the steps you
need to check:

1. Make sure you are able to ping the server onwhich the database
located

ping <target_server_ ip_address>

This to make sure the the server is accessible through TCP/IP

2. Telnet into the server at port 3306 (presumably that you use the
default port for MySQL)

telnet <target_server_ ip_address> 3306

If you got something is connection refuse then you are FINE. What it
means is it is allowed you to "talk" to it but it doesn't allow you to
make CONNECTION to the port.

3. Now the step you needs to make it works: on the server that hosts
the database do the following:

a. connect to the database manually

# mysql --user=root --password=<your database root password>

b. Assign the neccessary privilege

mysql> GRANT ALL PRIVILEGES ON db.* TO ''@'';

c. log off the database (either exit or quit will work :-)

Now you should be able to connect to the database from ANY WHERE by
ANY USER. The command on b. will let you do that. For more info
about this (such as restrict a specific user or machine from a DNS
domain, to anything else is completedly describe on chapter 5 of the
MySQL manual (5.5.5 is more specific).
BTW, did you got your MySQL database run on your embedded system ? I
have the problem to get my MySQL database server to run on my SBC.
Any pointer or what are the steps that you get it done ? I posted
another message with full details about my problem on this news group
as well. If you can help then please. Thanks.

Good luck.


i.******@dokom. net (ikrabbe) wrote in message news:<e4******* *************** ****@posting.go ogle.com>...
Hi,

I want to set up a mysql server in an embedded process. I managed to start
the server in my program as described through

mysql_server_in it()

Now I need a client connection to this server.

mysql_real_conn ect

tells me that it could not connect to the server through the
UNIX Domain socket.

How can I tell my client to connect to the embedded server ?

TIA

INGO

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2152
by: quadric | last post by:
Hi, I have an application that has an embedded/extended Python interpreter. I need to add database capabilities and for reasons to lengthy to explain in this email, also require an embedded database server. I have tentatively chosen mySQL 4.0 due to the apparent ease of embedding, along with it having all the necessary database functionality I need.
0
8337
by: Kyle Goetz | last post by:
hey, i'm new to mySQL...this meaning that i have tried ~10000 times to install it and get it working over the past few weeks...and it always gives me the same error (scroll further down to see it) despite following the manual's windows installation exactly i have version 4.0.13 for windows and i used the installer once i was done, i followed the instructions in the manual exactly i have no firewall running
0
1261
by: Vladimir Espinosa Angarica | last post by:
I've installed the last stable MySQL version (4.0.14-standard) under Linux, (Suse-8.0) kernel 2.4.28-64GB SMP, form the binary distribution that i downloaded from www.mysql.com. I'm interested on implementing the embedded server within my clients programs but the distribution do not have included the libmysqld.a library. There is a possible solution to this without having to get the source and compile it. Thanks Vladimir
0
1491
by: Bill Davidson | last post by:
Hello: I have a thin C++ database access library that can be used with MySQL *only* through MyODBC. I would like to use this database access library with embedded mySQL server. Would that be possible ? I guess a more specific question would be: Is it possible to use the embedded mySQL server via MyODBC ? I am using Windows XP.
1
1787
by: TomCullen | last post by:
I am trying to connect a new LBM Laptop to an SQL server on the network and I get "test connection failed because of an error in initializing provider, SQL server does not exist or access denied. The laptom has sql server running on it locally and I am trying to connect to an SQL server on the network. Thanks Tom
1
4512
by: linux | last post by:
Sorry if this is a really dumb question. I am trying to connect to our remote MySQL server (which is running just fine). I have a perl script which worked just fine on my other Fedora 4 box (all servers are Fedora 4 with latests updates). The one that worked fine it down and I cannot compare anything against it (it was a client also). My problem is, when I try to connect to the server I get:
5
5093
by: smatta | last post by:
I have just installed MySql version 5.0-18 on Red Hat Fedora Core 4. It is running but I cant connect to it using MySql Query Browser running on my pc. >From my pc, I can telnet to the sql server / port. I get back a garbled message: 5.0.18-standard§}WxyuadT,☻V6F?J5i1YMT= Should this be garbled ? or is there a problem ?
2
10504
by: zMisc | last post by:
I am using VB.NET 1.1 and cannot connect to a MySQL (v5) database. I've done the following: 1) Create a DSN for MyODBC. 2) Connect using: Driver=MySQL ODBC 3.51 Driver; Server=localhost; Data Source=test; UID=test; PWD=pwd; OPTION=3 When I run my app, I get this error: An OLE DB Provider was not specified in
5
3857
by: Ike | last post by:
Through Java, I am attempting to connect to a MySQL 4.12 server on a remote computer. I can connect fine via php. I cann connect fine via Java, through a servlet, when the servlet is on the same machine (localhost) as the MySQL DB. However, when they are on different machines with different IPs, calling across the Internet (and there are no firewall issues -- I can connect fine to the remote MySQL DB via php from the same machine, not...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10090
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9949
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.