Feature | ProxySQL | MariaDB | MySQL | Notes |
---|---|---|---|---|
Auth - mysql_native_password |
✔️ | ✔️ | ✔️ | |
Auth - caching_sha2_password |
N/A | N/A | ✔️* | Requires SSL/TLS. |
SSL/TLS - Protocol Encryption | ✔️ | ✔️ | ✔️ | |
Packet compression | ✔️ | ✔️ | ✔️ |
Feature | ProxySQL | MariaDB | MySQL | Notes |
---|---|---|---|---|
COM_PING aka isConnected() |
✔️ | ✔️ | ✔️ | |
COM_QUERY |
❌ | ❌ | ❌ | Target 0.1.2 |
import Foundation
import NIO
import BriskMySQL
var eventLoopGroup: MultiThreadedEventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
let eventLoop = eventLoopGroup.next()
do {
try MySQLConnection.withDatabase(to: URL(string: "mysql://root:@127.0.0.1:3306/mysql")!, on: eventLoop) { conn in
conn.isConnected()
}.map { result in
print(result)
}.wait()
}
catch {
print(error.localizedDescription)
}