#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2014
    Posts
    8
    Rep Power
    0

    Cannot open connection programatically (C#)


    I get as far as creating a connection of type MySql.Data.MySqlClient.MySqlConnection, but when I try to open it I get: Authentication to host '127.0.0.1' for user 'JonJacobs' using method 'mysql_native_password' failed with message: Access denied for user 'JonJacobs'@'localhost' (using password: YES) However, with the same user and password I have no problem in HeidiSQL

    The connection string is "Server=127.0.0.1;Uid=JonJacobs;Pwd=blahblah;Database=SS;"

    I get the same issue if I use "localhost" instead of "127.0.0.1"

    My guess is that I will have to uninstall MySQL from my computer and lose all my data, and start over. Is there any alternative solution?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Apr 2009
    Posts
    2,232
    Rep Power
    1296
    Can you login with the mysql root user? If so, then login as root and correct the user rights for the "JonJacobs" user.

    Comments on this post

    • JonJacobs agrees
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2014
    Posts
    8
    Rep Power
    0
    >login as root and correct the user rights
    That did the job. Thank you very much.

IMN logo majestic logo threadwatch logo seochat tools logo