Methods Summary | ||
---|---|---|
public
|
||
public
|
||
public
|
||
public
|
#
delete_user( string $user , string $host )
bool delete_mysql_user(string, string[, bool = false])
Delete a MySQL user
|
|
public
|
||
public
|
#
set_option( string $option , string $value = NULL, string $group = 'client' )
Set MySQL client option
Reads from ~/.my.cnf and creates if necessary.
Specify a value of null to remove an option.
|
|
public
|
||
public
|
#
get_option( string $option , string $group = 'client' )
Get option from MySQL client/server configuration
|
|
public
|
||
public
|
||
public
|
#
recover_innodb_from_disk( string $db , string $srcdir , bool $force = false )
Recover InnoDB from .ibd files
Existing .ibd are NOT overwritten.
|
|
public
|
#
list_databases( )
array list_mysql_databases ()
Queries the db table in the mysql database for applicable grants
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
create_database( string $db , string $charset = 'latin1', string $collation = 'latin1_swedish_ci' )
Create a new mysql database
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
collation_compatible( string $collation , string $charset )
Verify collation + charset combination are compatible
|
|
public
|
||
public
|
#
create_database_backend( $db , $charset , $collation )
bool create_mysql_database_backend (string)
{@link create_mysql_database}
|
|
public
|
#
add_user_permissions( string $user , string $host , string $db , array $opts )
bool add_mysql_user_permissions (string, string, string, array)
Deprecatedsee |
|
public
|
#
set_privileges( string $user , string $host , string $db , array $privileges )
Set grants for a MySQL user
|
|
public
|
||
public
|
#
revoke_privileges( string $user , string $host , string $db )
Revoke all privileges on a database from a MySQL user
|
|
public
|
||
public
|
#
get_privileges( string $user , string $host , string $db )
Get MySQL grants for a user on a database
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
service_enabled( )
bool service_enabled (string)
Checks to see if a service is enabled
Deprecatedsee |
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
export_pipe_real( $db , $user )
Export a database to a named pipe
Differs from export_pipe in that it may only be called internally
or from backend, no API access
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
get_backup_config( string $db )
Fetch MySQL backup task information
span => (integer) days between backups
hold => (integer) number of backups to preserve
next => (integer) unix timestamp of next backup
ext => (string) extension of backup
email => (string) notify address after backup
|
|
public
|
||
public
|
||
public
|
#
get_processlist( )
Get active mysql connections
Array
(
[0] => Array
(
[id] => 11024
[user] => debug
[host] => localhost
[db] => debug
[command] => Query
[state] => User sleep
[info] => select sleep(1000)
)
)
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
Methods inherited from Module\Skeleton\Standard |
---|
__construct() ,
setUserParameters() ,
autoloadModule() ,
__wakeup() ,
_invoke() ,
__debugInfo() ,
getExportedFunctions() ,
_reset() ,
cleanUserParameters() ,
query()
|
Constants Summary | ||
---|---|---|
public
array
|
DEPENDENCY_MAP
|
#
array (
0 => 'siteinfo',
1 => 'diskquota',
)
|
public
string
|
MYSQL_DATADIR
|
#
'/var/lib/mysql'
|
public
int
|
NEW_API_VERSION
|
#
50720
|
public
int
|
DEFAULT_CONCURRENCY_LIMIT
|
#
10
|
public
int
|
MAX_CONCURRENCY_LIMIT
|
#
20
|
public
string
|
EXPORT_CMD
|
#
'/usr/bin/mysqldump --add-drop-table --add-drop-trigger --triggers --events -q -R'
|
Constants inherited from Module\Support\Sql |
---|
DEFAULT_CONCURRENCY_LIMIT
,
MIN_PASSWORD_LENGTH
,
MIN_PREFIX_LENGTH
,
MASTER_USER
,
DB_BIN2TXT_MULT
|
Constants inherited from Module\Skeleton\Standard |
---|
DEPENDENCY_MAP
|
Properties Summary | ||
---|---|---|
protected
|
$exportedFunctions
|
#
array (
'*' => 2,
'version' => 15,
'get_elevated_password_backend' => 31,
'create_database_backend' => 18,
'delete_database_backend' => 18,
'get_uptime' => 15,
'assert_permissions' => 18,
'set_option' => 15,
'get_option' => 15,
'export_pipe_real' => 18,
'enabled' => 3,
'repair_mysql_database' => 10,
'get_prefix' => 3,
'get_database_size' => 10,
'database_exists' => 10,
'_export_old' => 18,
'recover_innodb_from_disk' => 8,
'stats' => 15,
)
|
Properties inherited from Module\Support\Sql |
---|
$_tempUsers
|
Properties inherited from Module\Skeleton\Standard |
---|
$exportedFunctions ,
$username ,
$password ,
$domain ,
$user_id ,
$group_id ,
$permission_level ,
$session_id ,
$site ,
$site_id
|