AltME: Databases

Messages

Bo
Hmm, I use mysql-protocol a lot, and I've never seen that type of error before.

DocKimbel
Never seen that error before. Might be caused by a change in the protocol, so that pl/capabilities is not decoded properly anymore.
DideC
Same with a probe of the binary data readed form the mysql server at handshake :
Net-log: ["Opening" "tcp" "for" "MySQL"]
connecting to: localhost
Net-log: "low level read of 4 bytes"
#{42000000}
Net-log: "low level read of 66 bytes"
#{
FF6A04486F737420273132372E302E302E3127206973206E6F7420616C6C6F77
656420746F20636F6E6E65637420746F2074686973204D7953514C2073657276
6572
}
** Script Error: find expected series argument of type: series object port bitset
** Where: read-packet
** Near: parse/all next pl/buffer case [
    find pl/capabilities 'protocol-41 [
        [
            read-int (pl/error-code: i...
(note: first probe is the header, so the length of the packet, second probe is the data).
DocKimbel
>> probe as-string #{
{    FF6A04486F737420273132372E302E302E3127206973206E6F7420616C6C6F77
{    656420746F20636F6E6E65637420746F2074686973204D7953514C2073657276
{    6572
{    }
{ÿj^DHost '127.0.0.1' is not allowed to connect to this MySQL server}
== {ÿj^DHost '127.0.0.1' is not allowed to connect to this MySQL server}
;-)
DideC
Easier when you know you can do that :-)
Thanks, need to investigate that now.
OK, I changed the 'locals-class object! prototype to have an empty block for 'capabilities, and know I get :
Net-log: ["Opening" "tcp" "for" "MySQL"]
connecting to: localhost
Net-log: "low level read of 4 bytes"
Net-log: "low level read of 66 bytes"
#{
FF6A04486F737420273132372E302E302E3127206973206E6F7420616C6C6F77
656420746F20636F6E6E65637420746F2074686973204D7953514C2073657276
6572
}
** User Error: ERROR 1130 : Host '127.0.0.1' is not allowed to connect to this MySQL server
** Near: p: open mysql://user:1Cuqb!40@localhost/adgo-cmde
DocKimbel
Looks better.
DideC
I don't know if it need to be corrected in your protocol implementation. Sure there is something that do not goes as expected if the 'capabilities word is not set to a block! at this time.
DocKimbel
I just pushed my MySQL and Pgsql drivers on Github, feel free to post PRs for fixes/improvements:
https://github.com/dockimbel/r2-tools
DideC
PR done :-)
Now, any idea about the problem ? Because the "user" user is the one used by phpMyAdmin to manage the DB and it works form there !
form=from
DocKimbel
I haven't touch MySQL since 7 years. From what I remember, it has to do with the access permissions table (`user` and `host` tables?).
DideC
Seems to. Maybe related to this :
"Combine dlo's answer with Darren Chamberlain's. The reason for this is that the special meaning that 'localhost' has in MySQL is that it signifies to use the local unix socket (mysql.sock) vs the TCP socket. This is why specifying 127.0.0.1 as the host will get you in so that you can fix the situation; it signifies to the MySQL client to use the TCP socket."
Nop. Localhost or 127.0.0.1, same error result.
DocKimbel
There's a table for giving permissions to (user, IP) couples, I think it is `host` or `hosts`, you should check that.

Last message posted 341 weeks ago.