GithubHelp home page GithubHelp logo

Comments (9)

CrabDude avatar CrabDude commented on May 22, 2024

Just for reference, I had this issue in a fresh npm install (node v0.2.0 and node-mysql via npm 8/24/10, don't know how to get it's version) on CentOS.

Felixge suggested resetting the password using PASSWORD (see #2 below).

To rectify I tried the following:

  1. create new user w/new password => FAIL
  2. SET PASSWORD FOR 'your_user'@'your_host' = PASSWORD('your_password'); (and again with OLD_PASSWORD) => FAIL
  3. UPDATE mysql.user SET Password = PASSWORD('your_password') WHERE Host = 'your_host' AND User = 'your_user'; (and again with OLD_PASSWORD) => FAIL

from mysql.

CrabDude avatar CrabDude commented on May 22, 2024

Additionally, my issue is verified related as removal the user's password successfully connected.

from mysql.

iamcal avatar iamcal commented on May 22, 2024

It looks like all of the oldAuth code linked to above has been removed. If I wanted to implement this, where did you intend it to go?

from mysql.

felixge avatar felixge commented on May 22, 2024

iamcal: There is a branch called oldpw, see:

http://github.com/felixge/node-mysql/tree/oldpw

It's not rebased with master right now, but the code in question shouldn't cause any conflicts. It'd be really awesome if you could help me with this, let me know if I can provide any help for you.

from mysql.

iamcal avatar iamcal commented on May 22, 2024

I've gotten hashPassword(), initRandom(), myRnd() and scamble323() all working in this branch: http://github.com/iamcal/node-mysql/tree/oldpw

The implementation of hashPassword() is buggy on your oldpw branch, so that's been rewritten.

There are a bunch of tests for all the new functions that use the output from tests/fixture/libmysql_password.c as reference. They can be found in test/simple/test-auth-old.js

from mysql.

felixge avatar felixge commented on May 22, 2024

Wow, thank you so much for you help on this. There are a few things (tabs vs. spaces, test output, etc.) I like to do differently, but no worries - I'll take care of all that : ).

Right now I'm working on integrating your branch into master and testing it against a mysql install that uses the old password mechanism. Once I got this going I'll let you know if it works!

from mysql.

felixge avatar felixge commented on May 22, 2024

Alright, I got the branch rebased and _sendOldAuth all wired up. When testing against my test install I'm now getting:

Error: Access denied for user 'root'@'my-host-name' (using password: YES)

I've pushed my latest commits up, you can see them here:

http://github.com/felixge/node-mysql/commits/oldpw

If you have a suitable install around it'd be awesome if you could have a look and see if it works for you, or if you are hitting the same problem.

Thanks, --fg

from mysql.

felixge avatar felixge commented on May 22, 2024

Ok, nevermind my previous comment. Your code works fantastically! I just reformatted the styling a little to go along with the rest of the project and merged your commits into master and released v0.4.0 via npm!

Thank you so much for your help on this one. I wasted hours on my buggy version of hash_password alone, it would have probably taken me forever to finish the rest of stuff you ported.

Everybody else: I'm closing this issue now. Please test if you are now able to connect to your databases and let me know if you hit any issues.

from mysql.

iamcal avatar iamcal commented on May 22, 2024

Awesome!

from mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.