0

I am trying to access a Mysql Server through Lan using VB6
using ADODB connection

db.Open "DRIVER={MySQL ODBC 5.1 Driver};DATABASE=xxxx;SERVER=192.168.1.6;USER=root;PASSWORD=xxxx;OPTION=3;"

it is giving error

[Mysql][ODBC 5.1 Driver]host couldn't connect to the Mysql Server

My Server IP is :192.168.1.6
user is: root

Firewalls are turned off....
Might be i need to allow lan access in my sever Mysql. I dont know how to do it

Can anyone give me a solution to this problem..

Edited by mike_2000_17: Fixed formatting

3
Contributors
10
Replies
13
Views
7 Years
Discussion Span
Last Post by AndreRet
0

i dont know whether root can be accessed locally or not..
if not then what is the alternative and what i have to do in order to access it locally

0

Create a new user with remote access priviliges, or change the priviliges of root (not recommended).

can u give me exact code to create a user with remote access priviliges...

thank you

0

Yes you can most certainly connect to mySql using root. It took me about a week to find the solution to the same problem and with many posts. Funny, none of the posts could help. It was eventually the MySql ref. manual that gave the answer - you need to reset the roots password and permissions.

The link below gives you a step by step which worked for me. The second link gives you more options as well, although the first was fine for me.

http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

http://search.mysql.com/search?q=read.php&lr=lang_en

I hope this solves your problem without as many headaches as I incurred.:D

0

thanks...!!!
one more thing... if i am installing mysql on a new system which ll be used as server... what command should i give at that time to give privleges to the root user.

0

m still unable to connect to the mysql server after flushing privleges also.. as it was given in the link posted above..

0

Deepmadan, as I said previously, I had major headaches sorting it. I have un-installed MySql completely and then went and re-installed to all its default values. I have then flushed privelages and it worked for me. I am attaching a small sample that I am using in vb6 to connect and create my tables. Try it out and see if it works for you. It is quite rough, because I have used this as a sample and from there I started my application. It test connection, shows databases and tables.

You can also download MySqlcc (just search for it) which connects to MySql, and it is much better than the MySql management console.

You will also note that I have used older drivers, 3.51, but that should not make a difference.

I really hope you find the solution because I know what you are going through.:D

Edited by AndreRet: typing error

0

thanks for ur help..
i just created another user and granted it rights for that database.
my problem is solved
:)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.