MyODBC Connection Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BOBRIVER
    New Member
    • May 2010
    • 3

    MyODBC Connection Problem

    I was trying to establish a DSN using myodbc 5.1 to a live website's mysql database.

    I could finally get the DSN connection to successfully connect to the remote MySQL server using the hostname, username and password only . It succeeded, but when I use the database name in the DSN configuration it fails to connect the username to the database. although the entries are all correct and I tried to create different users for that database.

    The connection succeeded with all the users, it fails only when you input the database name even though they are all users of that specific database.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hey.

    Are you sure you set the correct value for the host when you granted the users access to the database?

    Try checking the mysql.db table and see if it contains the correct values.
    [code=mysql]SELECT `Host`, `Db`, `User` FROM mysql.db WHERE `User` = 'Atli';[/code]

    Comment

    • BOBRIVER
      New Member
      • May 2010
      • 3

      #3
      Dear Atli

      I checked that , everything was okay>
      where can I find the mysql.db table?

      Bob

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        where can I find the mysql.db table?
        It's the "db" table of the "mysql" database. You will need root-like privileges to access it though. Just execute the query I posted and you will see whether you can access it or not.

        Comment

        • BOBRIVER
          New Member
          • May 2010
          • 3

          #5
          I tried to run the query on the sql command window phpmyadmin-mysql
          it returns (no database selected)
          in my databases section I can't see other than the websites databases
          I downloaded the latest version of MyODBC 3.xxx and I still have the same problem. it connects without a database name only

          Comment

          Working...