<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Using ODBC for MySQL Connection -&gt; Error]]></title><description><![CDATA[<p dir="auto">I try using ODBC for MySQL Connection -&gt; Error.<br />
I have an extern MySQL Server and the MySQL ODBC-Driver is installed and configured on my PC.</p>
<p dir="auto">C:\Users\chris\Desktop\musikkiosk\qt-anwendung\musikkiosk-build-desktop\debug\musikkiosk.exe...Failed to connect to root mysql admin</p>
<p dir="auto">@</p>
<pre><code>QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
db.setDatabaseName("Driver={MySQL ODBC 5.1 Driver};DATABASE=_s0525289__kiosk;");
db.setUserName("s0525289");
db.setPassword("*****");

if (!db.open())
{
 qDebug() &lt;&lt; "Failed to connect to root mysql admin";
 return db;
}
else
{
 return db;
}
</code></pre>
<p dir="auto">@</p>
]]></description><link>https://forum.qt.io/topic/17172/using-odbc-for-mysql-connection-error</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 05:29:33 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/17172.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 May 2012 12:15:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using ODBC for MySQL Connection -&gt; Error on Fri, 01 Jun 2012 17:11:27 GMT]]></title><description><![CDATA[<p dir="auto">the error was that the odbc driver on my pc diddn't work</p>
<p dir="auto">yeah on my university i cant use mysql connector!</p>
]]></description><link>https://forum.qt.io/post/140602</link><guid isPermaLink="true">https://forum.qt.io/post/140602</guid><dc:creator><![CDATA[Furtano]]></dc:creator><pubDate>Fri, 01 Jun 2012 17:11:27 GMT</pubDate></item><item><title><![CDATA[Reply to Using ODBC for MySQL Connection -&gt; Error on Wed, 30 May 2012 23:24:15 GMT]]></title><description><![CDATA[<p dir="auto">Your connection string does not tell the driver where the server is, and you don't tell Qt either.  It <em>may</em> default to localhost but I don't know.</p>
<p dir="auto">If you look at QSqlDatabase::lastError() you might get a clue as to why it is failing.</p>
<p dir="auto">There is a native Qt - MySQL connector but your school(?) environment may not have it installed.</p>
]]></description><link>https://forum.qt.io/post/140347</link><guid isPermaLink="true">https://forum.qt.io/post/140347</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Wed, 30 May 2012 23:24:15 GMT</pubDate></item></channel></rss>