Connecting from C++ to remote MySQL RDBMS, running on Linux Mandriva server
location: linuxexchange.com - date: November 4, 2014
On remote Linux Mandriva server running MySQL database, which I need to connect from Windows host to perform some data manipulation using C++ program. Actually, the following code does not allow it to start:
std::wcout << "Error: can't create MySQL-descriptor" << endl;
std::wcout << "Error: can't connect to MySQL server" << endl;
if(mysql_query(&conn, "SELECT VERSION()") != 0)
std::wcout << "Error: can't execute SQL-query" << endl;
I opened port 3306 on the remote server -
iptables -A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
Failed to connect to database:Error: Can't connect to MySQL server on 'ip_..' (10060)
I would be most grateful for information about how to connect to a remote database server, running on Linux.
[SOLVED] Qt4 + Firebird (RDBMS)
location: ubuntuforums.com - date: January 16, 2008
I'm developing a toy in C++ using Trolltech's Qt4 library, just a small GUI for altering rows of a few tables.
My toy is working properly using QSQLITE driver (Sqlite3), QMYSQL (MySQL 5) and QPSQL (PostgreSQL 8.x), absolutely no problems with those RDBMS, but..
This week I looked at Firebird2 and decided to give it a try. In a few minutes I discovered that the package libqt4-sql (the one that provides support for accessing databases from Qt4 apps) comes with just a few drivers enabled (coincidentally the ones that I mentioned above). Firebird is NOT enabled by default.
I've noticed that OpenSUSE provides independent packages, as plugins, for each RDBMS, for example "libqt4-sql-drivernamehere", while Ubuntu (probably Debian also) provides only one package that enables support for three RDBMSs. I guess if Suse's way of solving this is more convenient...
I've found posts in some mailing lists suggesting to recompile the libqt4-sql package in order to enable the QIB
Approach for storing temporary and permanent address in rdbms
location: linuxexchange.com - date: January 1, 1970
We need to store user's temporary and permanent address in database.I am planning to create only one table address in database and will use same table for both temporary and permanent address.Is there any better approach ?
Also there is condition -temporary address field can be null like city,state but these fields can't be null for permanent address.