Closed amir-khoshbakht closed 2 years ago
example address : mysql://test_user:11111????1111@127.0.0.1/test_database?charset=utf8mb4 it works with PDO
it seems the documentation explicitly described this situation :
Note that both the username and password must be URL-encoded (percent-encoded) if they contain special characters:
$user = 'he:llo';
$pass = 'p@ss';
$promise = $factory->createConnection(
rawurlencode($user) . ':' . rawurlencode($pass) . '@localhost:3306/db'
);
@my-random-username Glad to see you've solved this already! And thanks for reporting back, I'm sure this may also help others :+1:
React\MySQL\Factory:166 is trying parse the given URL but it doesn't allow to use database with question mark in password. and in this case it will throw : 'Invalid MySQL URI given (EINVAL)'