MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
BootstrapMySQLAccount Class Reference

#include <bootstrap_mysql_account.h>

Classes

struct  UndoCreateAccountList
 

Public Member Functions

 BootstrapMySQLAccount (mysqlrouter::MySQLSession *session)
 
std::string create_router_accounts (const UserOptions &user_options, const std::set< std::string > &hostnames, const std::string &username, const std::string &password, bool password_change_ok)
 create account to be used by Router. More...
 

Private Member Functions

std::string create_accounts_with_compliant_password (const UserOptions &user_options, const std::string &username, const std::set< std::string > &hostnames, const std::string &password, bool password_change_ok, bool if_not_exists)
 
void create_accounts (const UserOptions &user_options, const std::string &username, const std::set< std::string > &hostnames, const std::string &password, bool if_not_exists=false)
 
void create_users (const std::string &username, const std::set< std::string > &hostnames, const std::string &password, bool if_not_exists)
 
void give_grants_to_users (const UserOptions &user_options, const std::string &new_accounts)
 
std::set< std::string > get_hostnames_of_created_accounts (const std::string &username, const std::set< std::string > &hostnames, bool if_not_exists)
 

Private Attributes

struct BootstrapMySQLAccount::UndoCreateAccountList undo_create_account_list_
 
mysqlrouter::MySQLSessionmysql_
 

Constructor & Destructor Documentation

◆ BootstrapMySQLAccount()

BootstrapMySQLAccount::BootstrapMySQLAccount ( mysqlrouter::MySQLSession session)
inline

Member Function Documentation

◆ create_accounts()

void BootstrapMySQLAccount::create_accounts ( const UserOptions user_options,
const std::string &  username,
const std::set< std::string > &  hostnames,
const std::string &  password,
bool  if_not_exists = false 
)
private

◆ create_accounts_with_compliant_password()

std::string BootstrapMySQLAccount::create_accounts_with_compliant_password ( const UserOptions user_options,
const std::string &  username,
const std::set< std::string > &  hostnames,
const std::string &  password,
bool  password_change_ok,
bool  if_not_exists 
)
private

◆ create_router_accounts()

std::string BootstrapMySQLAccount::create_router_accounts ( const UserOptions user_options,
const std::set< std::string > &  hostnames,
const std::string &  username,
const std::string &  password,
bool  password_change_ok 
)

create account to be used by Router.

<host> part of <user>@<host> will be %, unless user specified otherwise using –account-host switch. Multiple –account-host switches are allowed.

◆ create_users()

void BootstrapMySQLAccount::create_users ( const std::string &  username,
const std::set< std::string > &  hostnames,
const std::string &  password,
bool  if_not_exists 
)
private

◆ get_hostnames_of_created_accounts()

std::set< std::string > BootstrapMySQLAccount::get_hostnames_of_created_accounts ( const std::string &  username,
const std::set< std::string > &  hostnames,
bool  if_not_exists 
)
private

◆ give_grants_to_users()

void BootstrapMySQLAccount::give_grants_to_users ( const UserOptions user_options,
const std::string &  new_accounts 
)
private

Member Data Documentation

◆ mysql_

mysqlrouter::MySQLSession* BootstrapMySQLAccount::mysql_
private

◆ undo_create_account_list_

struct BootstrapMySQLAccount::UndoCreateAccountList BootstrapMySQLAccount::undo_create_account_list_
private

The documentation for this class was generated from the following files: