MariaDB Logo MariaDB Logo
  • Knowledge Base
  • Login
  • Products
    MariaDB Enterprise Platform

    Run enterprise applications with the ultimate peace of mind

    Contact Sales
    Components
    Enterprise ServerEnterprise-grade open source database
    MaxScaleAdvanced database proxy
    ColumnStoreColumnar storage for advanced analytics
    Enterprise ClusterReplication and scalability solution
    ConnectorsConnectors for data access and streaming
    Explore All Products
    Capabilities
    Vector Embedded SearchBuild AI applications with native vector-embedded search
    SecurityProtect data with an end-to-end security strategy
    High Availability24×7 uptime for enterprise reliability
    AnalyticsRun real-time queries with analytical processing (OLAP)
    Disaster RecoveryEnsure business continuity and data protection
    View All Capabilities
    Why MariaDB
    The MariaDB AdvantageLearn why MariaDB is the best choice for modern applications
    Workload VersatilityOLTP, OLAP, AI/ML, structured and semi-structured
    Community vs. EnterpriseLearn when to upgrade
    Compare DatabasesSee how MariaDB stacks up against competitors
    Get Started
    MariaDB Community Server

    One of the most popular database servers in the world

    Download Community Server
    Featured
    White Paper
    White PaperThe Ultimate High Availability Guide
    Webinar
    WebinarThe Next Generation of MariaDB: Powered by Vector Search
    Customer StoriesSee how organizations thrive with MariaDB
    Our Customers

  • Solutions
    Make the Switch

    Seamlessly migrate to MariaDB

    Oracle to MariaDB
    MySQL to MariaDB
    Industry

    Trusted by industries worldwide

    Financial Services
    Public Sector
    Defense & Intelligence
    Support & Services

    Here to support your database success

    Support Services
    Technical Support
    Remote DBA
    Customer Support Portal
    Professional Services
    Consulting Services
    Database Migration
    Technical Account Manager
    Training

  • Resources
    Resources

    Dive deeper into MariaDB

    Contact Sales
    LEARN
    WebinarsLearn how to get the most out of MariaDB
    BlogRead the latest about our products
    Customer StoriesDiscover how organizations power their business with MariaDB
    TrainingElevate your MariaDB skills
    Engage
    EventsMeet our team in person
    Connect with the MariaDB CommunityJoin a global community of developers and users
    BUILD
    DocumentationFind technical documentation and community resources
    Developer HubExplore sample applications and tutorials
    Featured Resources
    White Paper
    White PaperMigrate to MariaDB from Oracle: Lower TCO without Lowering Standards
    Webinar
    WebinarIntroduction to AI-Powered Applications: LLMs, Vector Search & MariaDB
    Get Started with MariaDBInstall and configure MariaDB in 4 simple steps
    Start Now

  • Company
    About MariaDB
    About UsLearn who we are
    NewsroomRead press releases and news articles
    LeadershipMeet our company leaders
    Partnerships
    Find a PartnerLearn about our partner ecosystem
    Become a PartnerApply to become a MariaDB partner
    Featured
    Contact UsGet in touch with MariaDB
    CareersJoin our team
    Customer StoriesDiscover how organizations power their business with MariaDB

  • Pricing
Contact Sales Free Download
MariaDB Hero Background Gradient
Home violator gradient
White Paper: The Ultimate Guide to High Availability
Download the White paper
Download the White paper
Webinar: MariaDB Databases 101
Watch the Webinar
Watch the Webinar
  • Knowledge Base
  • Contact
  • Login
MariaDB Logo
  • Products
    MariaDB Enterprise Platform

    Run enterprise applications with the ultimate peace of mind

    Contact Sales
    Components
    Enterprise ServerEnterprise-grade open source database
    MaxScaleAdvanced database proxy
    ColumnStoreColumnar storage for advanced analytics
    Enterprise ClusterReplication and scalability solution
    ConnectorsConnectors for data access and streaming
    Explore All Products
    Capabilities
    Vector Embedded SearchBuild AI applications with native vector-embedded search
    SecurityProtect data with an end-to-end security strategy
    High Availability24×7 uptime for enterprise reliability
    AnalyticsRun real-time queries with analytical processing (OLAP)
    Disaster RecoveryEnsure business continuity and data protection
    View All Capabilities
    Why MariaDB
    The MariaDB AdvantageLearn why MariaDB is the best choice for modern applications
    Workload VersatilityOLTP, OLAP, AI/ML, structured and semi-structured
    Community vs. EnterpriseLearn when to upgrade
    Compare DatabasesSee how MariaDB stacks up against competitors
    Get Started
    MariaDB Community Server

    One of the most popular database servers in the world

    Download Community Server
    Featured
    White Paper
    White PaperThe Ultimate High Availability Guide
    Webinar
    WebinarThe Next Generation of MariaDB: Powered by Vector Search
    Customer StoriesSee how organizations thrive with MariaDB
    Our Customers

  • Solutions
    Make the Switch

    Seamlessly migrate to MariaDB

    Oracle to MariaDB
    MySQL to MariaDB
    Industry

    Trusted by industries worldwide

    Financial Services
    Public Sector
    Defense & Intelligence
    Support & Services

    Here to support your database success

    Support Services
    Technical Support
    Remote DBA
    Customer Support Portal
    Professional Services
    Consulting Services
    Database Migration
    Technical Account Manager
    Training

  • Resources
    Resources

    Dive deeper into MariaDB

    Contact Sales
    LEARN
    WebinarsLearn how to get the most out of MariaDB
    BlogRead the latest about our products
    Customer StoriesDiscover how organizations power their business with MariaDB
    TrainingElevate your MariaDB skills
    Engage
    EventsMeet our team in person
    Connect with the MariaDB CommunityJoin a global community of developers and users
    BUILD
    DocumentationFind technical documentation and community resources
    Developer HubExplore sample applications and tutorials
    Featured Resources
    White Paper
    White PaperMigrate to MariaDB from Oracle: Lower TCO without Lowering Standards
    Webinar
    WebinarIntroduction to AI-Powered Applications: LLMs, Vector Search & MariaDB
    Get Started with MariaDBInstall and configure MariaDB in 4 simple steps
    Start Now

  • Company
    About MariaDB
    About UsLearn who we are
    NewsroomRead press releases and news articles
    LeadershipMeet our company leaders
    Partnerships
    Find a PartnerLearn about our partner ecosystem
    Become a PartnerApply to become a MariaDB partner
    Featured
    Contact UsGet in touch with MariaDB
    CareersJoin our team
    Customer StoriesDiscover how organizations power their business with MariaDB

  • Pricing
Free Download Contact Us

Simplify User Account Management with MariaDB MaxScale 2.2 and MariaDB Server 10.3

Posted on May 29, 2018 by Esa Korhonen
spacer

Configuring database user accounts for MariaDB MaxScale and a backend cluster has typically required a duplicate effort. This is because an account entry must exist for both the real client host and the MaxScale host. MaxScale authenticates incoming users against the user entry with the real client host. When MaxScale creates the routing session, it uses the client’s username and password scramble to authenticate the client to the backend. The backend sees the connection coming from the machine running MaxScale. Unless the host name uses wildcards (low security), entries for both hosts are required. If user accounts are often modified, this duplication may get cumbersome and lead to errors.

MariaDB Server 10.3 adds support for the proxy protocol which allows a connection to self-designate its host. The protocol states that when a connection has been established, the client should first (before responding to the MySQL handshake) send a proxy protocol header. This header contains the hostname that the server should imagine the connection originating from instead of using the real hostname. For security reasons, proxy headers are only allowed from addresses listed in the server variable “proxy_protocol_networks”. The feature thus allows select ip addresses to act as proxies without having actual user accounts on the database backend. As an example, the header “PROXY TCP4 192.168.0.1 192.168.0.2 56324 443” instructs the server to authenticate the client as if the client was connecting from 192.168.0.1.

This feature can be used to simplify user account management when using MaxScale 2.2 and MariaDB Server 10.3. To enable the feature in MaxScale, add the line “proxy_protocol=on” to a server definition in your MaxScale configuration file (typically this should be added to all server sections).

An example of a MaxScale server definition:

[MyServer1]
type=server
address=123.456.789.0
port=3306
protocol=MariaDBBackend
proxy_protocol=yes

When MaxScale attempts to create a client session on the server, MaxScale first sends a proxy header with the original hostname of the client. If the MaxScale IP is found within the “proxy_protocol_networks” of the server, the header is read and the connection authenticated using the real client address. For the server setting, see server documentation for more information.

Assuming MaxScale IP is “111.222.333.4”, add the following to the [mysqld]-section of the server configuration:

proxy_protocol_networks = 111.222.333.4

With these settings, an incoming client “normal_user” does not need to have an entry for host “111.222.333.4” in the mysql.user-table. Only an entry for the real client host is required.

Get MariaDB MaxScale 2.2 and MariaDB Server 10.3 as part of MariaDB TX 3.0, available for download now.

Tags: Account Management, database, database proxy, MariaDB Server, MariaDB Server 10.3, MaxScale

Post a Comment

Log into your MariaDB ID account to post a comment.
Back to Blog
Download Contact
MariaDB Logo
Subscribe to MariaDB's monthly newsletter!

Thank you! You are now subscribed to the newsletter.

  • Products
    • Enterprise Platform
    • Community Server
    • Download MariaDB
    • Pricing
  • Support
    • Customer Login
    • Technical Support
    • Remote DBA
    • Professional Services
  • Resources
    • MariaDB Blog
    • Webinars
    • Customer Stories
    • MariaDB Events
    • Knowledge Base
    • Developer Hub
  • Company
    • About MariaDB
    • Newsroom
    • Leadership
    • MariaDB Careers

© 2025 MariaDB. All rights reserved.

Legal | Privacy Policy | Cookie Policy | Trust | Sitemap