Git Product home page Git Product logo

Comments (4)

xinbenlv avatar xinbenlv commented on May 6, 2024

I have been able to use Sequel Pro to access the server but for some reason I can't use a node-mysql to connect. The MySQL server seems using old password auth

Using node-mysql2 with insecureAuth: true

Error: Server requires auth switch, but no auth switch handler provided
    at PromisePool.query (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql2/promise.js:322:22)

Using node-mysql with insecureAuth: true

/Users/zzn/ws/wikiloop-battlefield/server/index.js:422
      if (error) throw error;
                 ^

Error: MySQL server is requesting the old and insecure pre-4.1 auth mechanism. Upgrade the user password or use the {insecureAuth: true} option.
    at Handshake.UseOldPasswordPacket (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql/lib/protocol/sequences/Handshake.js:105:15)
    at Protocol._parsePacket (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql/lib/protocol/Protocol.js:291:23)
    at Parser._parsePacket (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql/lib/protocol/Parser.js:433:10)
    at Parser.write (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql/lib/protocol/Parser.js:43:10)
    at Protocol.write (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql/lib/Connection.js:91:28)
    at Socket.<anonymous> (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql/lib/Connection.js:525:10)
    at Socket.emit (events.js:198:13)
    at Socket.EventEmitter.emit (domain.js:448:20)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
    --------------------
    at Protocol._enqueue (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql/lib/protocol/Protocol.js:144:48)
    at Protocol.handshake (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql/lib/protocol/Protocol.js:51:23)
    at Connection.connect (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql/lib/Connection.js:119:18)

And if I print out AuthSwitchRequest with this instruction, it gives plugin name as empty.

Error: Unknown AuthSwitchRequest plugin name = ""
    at PromisePool.execute (/Users/zzn/ws/wikiloop-battlefield/node_modules/mysql2/promise.js:335:22)

from wikiloop-doublecheck.

westand avatar westand commented on May 6, 2024

Does the code throwing the error live anywhere on GitHub?

from wikiloop-doublecheck.

xinbenlv avatar xinbenlv commented on May 6, 2024

Resolved

@westand After checking multiple references I was able to resolve it by running the following as instructed by MySQL documentation 5.6 Password Hashing (Pre-4.1 Style Passwords)

This scenario illustrates that, if you must support older pre-4.1 clients, it is problematic to run a 4.1 or higher server without old_passwords set to 1. By running the server with old_passwords=1, password-changing operations do not generate long password hashes and thus do not cause accounts to become inaccessible to older clients. (Those clients cannot inadvertently lock themselves out by changing their password and ending up with a long password hash.)

The downside of old_passwords=1 is that any passwords created or changed use short hashes, even for 4.1 or later clients. Thus, you lose the additional security provided by long password hashes. To create an account that has a long hash (for example, for use by 4.1 clients) or to change an existing account to use a long password hash, an administrator can set the session value of old_passwords set to 0 while leaving the global value set to 1:

In particular, here is it

mysql> SET PASSWORD FOR 'existinguser'@'localhost' = PASSWORD('existingpass');

where as "existinguser" is the <USERNAME> you emailed me
"existingpass" is the <PASSWORD> you emailed me

Conclusion: I rehashed the password using the same password, and it works now

from wikiloop-doublecheck.

xinbenlv avatar xinbenlv commented on May 6, 2024

@westand Thank you for your generous help.

We are now able to get STiki and ClueBotNG score from the database access you grant to us.

We also updated the view to include such two scores (not filtering yet because we don't know how soon of a latency will we be able to get a STiki or ClueBotNG score after a new RecentChange occurs)

Here is the latest Screenshot.
image

We also include a README credit crediting your help.

- We appreciate the courtesy of [Dr. Andrew G. West](http://www.andrew-g-west.com/) for providing us the read access to [STiki](https://en.wikipedia.org/wiki/Wikipedia:STiki) vandalism detection scores .

You can try the API we build here

// http://battlefield.wikiloop.org/extra/stiki/enwiki:908928336
[
  {
    R_ID: 908928336,
    SCORE: 0.0498311223085054
  }
]

from wikiloop-doublecheck.

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.