A Rust-Powered MySQL-to-PostgreSQL Translation Layer
Seamlessly run your MySQL applications on PostgreSQL without code changes
- MySQL Protocol: Accepts MySQL connections and translates queries to PostgreSQL
- Authentication: Configurable MySQL authentication
- High Performance: Built with Rust and async Tokio
- Docker Ready: Easy deployment with Docker Compose
- Query Translation: Handles MySQL-specific syntax differences
git clone https://github.com/mikeshootzz/PostMyRustache.git
cd PostMyRustache
docker-compose up -d
# Connect with any MySQL client
mysql -h localhost -P 3306 -u admin -p
# Password: passwordgit clone https://github.com/mikeshootzz/PostMyRustache.git
cd PostMyRustache
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Build and run
cargo run --releaseCreate a .env file in the project root:
# PostgreSQL Connection
DB_HOST=localhost
DB_USER=postgres
DB_PASSWORD=your_postgres_password
# MySQL Authentication
MYSQL_USERNAME=admin
MYSQL_PASSWORD=password
# Optional
BIND_ADDRESS=0.0.0.0:3306
RUST_LOG=infoConnect using any MySQL client:
mysql -h localhost -P 3306 -u admin -pExample queries:
CREATE DATABASE myapp;
USE myapp;
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(255)
);
INSERT INTO users (name, email) VALUES ('John Doe', 'john@example.com');
SELECT * FROM users;# Build
cargo build
# Run with logging
RUST_LOG=debug cargo run
# Run tests (single-threaded to avoid env var conflicts)
cargo test -- --test-threads=1
# Format code
cargo fmt
# Run clippy linting
cargo clippy
# Security audit
cargo audit- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Made with ❤️ and 🦀 Rust
