Saturday, November 11, 2006

Mysql server setup

Hi guys, I have a problem, I am setting up Mysql server on the RedHat 4.1.12 enterprise edition as my database server. I want to connect client applications from the windows platform. I am using the 3.51 odbc connector on the client side. When I set up the system DSN to connect to the linux server, the connection is successful. But when I try to run the application from the client side its giving me an error the the tables in the server are not accessible. If the client machine has mysql installed, it tries to access the database on the client machine instead of the linux server. What am I not setting up right??? Pleasae help. I am using the conection string "DSN=dsnmane;DATABASE= " & Trim(mydatabse) & "; USER=username;PASSWORD=password;OPTION=3;"

5 comments:

mwenda said...

Hi Mickey

I just happened to notice that your connection string does not supply the server name. Could this be the source of your problem?

Try building a DSN-les connection using the following connection string:

"Driver={MySQL ODBC 3.51 Driver}; Server=servername; Database=dbname; UID=username; PWD=password; Option=3"

You can also try the following links . hope they point u in the right direction:
http://www.linux-magazine.com/issue/42/Pear_DB.pdf

http://dev.mysql.com/doc/refman/5.0/en/myodbc-configuration-connection-without-dsn.html

blackbird said...

Download and install MyODBC 3.5 first on the developer machine!!!

Use a DNS - less connection, specify the following as the connection string property of your Connection object such as

"DRIVER={MySQL ODBC 3.51 Driver};" _
& "SERVER=svrdbhost;" _
& "DATABASE=dbName;" _
& "UID=uID;PWD=pWD; OPTION=3"

Use variables instead of hard coding the parameters. What happens when the server changes IP or netname.

Make sure your MySQL is configured to accept connections other than on localhost. do this on the My.conf file

blackbird said...

Make sure MySQL ODBC driver 3.51 is installed on your client.

Use DSN - Less connections, easier to package. i.e.

"DRIVER={MySQL ODBC 3.51 Driver};"
& "SERVER=dbSVR;" _
& "DATABASE=dbName;" _
& "UID=uID;PWD=pWD; OPTION=3"

When this works replace the parameters with variables (You'll have to do alot of concatenating). Tis more elegant than hardcoding. What happens when the server changes IP or netname?

Make sure your MySQL on the server allows connections from remote hosts other than localhost - > My.conf

blackbird said...

Yenyewe this blogger thing is a bit confusing to use. Kwanza the signing up process!!

Then what's a blog, is it the message or the accoount or the site?

How do I just post messages quickly like in yahoo, click on Post.

blackbird said...

Now my problem.

I want to purchase a server for our office, and of course as the IT rambo, I have to commend. Any advice?