-
Notifications
You must be signed in to change notification settings - Fork 50
MySQL Proxy for SQLite #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
This is great! Just a little note, there is a typo in the directory |
@akirk Ah, thanks for catching that! I'm also thinking about whether to keep the I guess in this repo, the naming will be generally hard 🙂 |
0f54e9d to
4864a5b
Compare
4864a5b to
aaa498e
Compare
32462e5 to
91bc3e8
Compare
d141047 to
7fb3015
Compare
548d916 to
008f29a
Compare
008f29a to
2049cf0
Compare
|
@adamziel I think this is ready for an initial review. The code needs more polishing, and we'll need some more functionality (prepared statements for |
| public function start() { | ||
| $this->socket = socket_create( AF_INET, SOCK_STREAM, SOL_TCP ); | ||
| socket_set_option( $this->socket, SOL_SOCKET, SO_REUSEADDR, 1 ); | ||
| socket_bind( $this->socket, '0.0.0.0', $this->port ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning: socket_bind(): Unable to bind address [48]: Address already in use in /Users/cloudnik/www/Automattic/core/plugins/sqlite-database-integration/packages/wp-mysql-proxy/src/class-mysql-proxy.php on line 22
MySQL PHP Proxy listening on port 3306...
Let's exit(1) on any and all errors
|
Not a blocker for this PR, but something about the CLI client derails it: If I send a password, it's fine: |
|
Hey, look at me using MySQL 🔥 |
Implements a basic MySQL proxy that bridges the MySQL wire protocol to the SQLite driver, based on adamziel/mysql-sqlite-network-proxy#1.
This enables the usage of phpMyAdmin, Adminer, and other tools on top of SQLite.
The PR includes tests for
PDOandmysqliconnections and query commands.See also the MySQL proxy package README.
CLI usage:
PHP usage: