About Store Forum Documentation Contact
Donations:
206$/mo



Post Reply 
MySql won't connect
Author Message
fuzzylr Offline
Member

Post: #1
MySql won't connect
Greetings,

I looked through some of the other posts. I have not been able to get mysql to connect. Here is the source.
Code:
switch(SQL_MYSQL)
   {
      case SQL_MSSQL: if(!sql.connectMSSQL("LocalHost\\SQLExpress", "test_DB", "", "", &messages)) Exit(S+"Cannot connect to Server!"); break;
      case SQL_SQLITE: if(!sql.connectSQLite("sqlite.db"))Exit("Unable to connect to Server!"); break;
      case SQL_MYSQL:  if(!sql.connectMySQL("localhost", "EE_Test", "blankedout", "blankedout", &messages))Exit("Unable to connect to MySql!"); break;

I have installed the 5.1 drivers of the ODBC drivers. I have tried pointing it to the odbc connection. I've tried inputting the ip directly. I can't seem to get it to work.


Attached File(s) Image(s)
           

Fuzzy
Student|Westwood
Project V. Studios | Game Dev
(This post was last modified: 02-16-2013 08:26 AM by fuzzylr.)
02-16-2013 08:24 AM
Find all posts by this user Quote this message in a reply
fuzzylr Offline
Member

Post: #2
RE: MySql won't connect
Never mind. I got it to work. I don't know why it didn't work last night. But it's working today.

Fuzzy
Student|Westwood
Project V. Studios | Game Dev
02-17-2013 01:28 AM
Find all posts by this user Quote this message in a reply
fuzzylr Offline
Member

Post: #3
RE: MySql won't connect
Ok, in case anyone else has this issue. There are a couple of things to look out for.

1. Is the firewall blocking on your MySQL box?
2. Can you telnet "server" 3306??
3. Can you connect via odbc?

Those are the things that helped me out.

Fuzzy
Student|Westwood
Project V. Studios | Game Dev
02-17-2013 02:32 AM
Find all posts by this user Quote this message in a reply
TBJokers Offline
Member

Post: #4
RE: MySql won't connect
@fuzzylr, to make it easier you could've done this -

Str message;
if(!sql.connectMysql("","","","",&message))Exit(message);

this way it will show the actual reported message instead of still catching it but not displaying it when you Exit the application.
04-18-2013 06:06 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply