MySQLDatabaseConfigurationHelper
class MySQLDatabaseConfigurationHelper implements DatabaseConfigurationHelper
This is a helper class for the SS installer.
It does all the specific checking for MySQLDatabase to ensure that the configuration is setup correctly.
Methods
Ensure that the database function for connectivity is available.
Ensure that the database server exists.
Determines the version of the database server
Ensure that the MySQL server version is at least 5.0.
Ensure a database connection is possible using credentials provided.
Determines if a given database name is a valid Silverstripe name.
Checks if a specified grant proves that the current user has the specified permission on the specified database
Checks if the current user has the specified permission on the specified database
Ensure that the database connection is able to use an existing database, or be able to create one if it doesn't exist.
Ensure we have permissions to alter tables.
Details
at line 134
boolean
requireDatabaseFunctions(array $databaseConfig)
Ensure that the database function for connectivity is available.
If it is, we assume the PHP module for this database has been setup correctly.
at line 140
array
requireDatabaseServer(array $databaseConfig)
Ensure that the database server exists.
at line 151
string
getDatabaseVersion(array $databaseConfig)
Determines the version of the database server
at line 170
array
requireDatabaseVersion(array $databaseConfig)
Ensure that the MySQL server version is at least 5.0.
at line 189
array
requireDatabaseConnection(array $databaseConfig)
Ensure a database connection is possible using credentials provided.
The established connection resource is returned with the results as well.
at line 212
boolean
checkValidDatabaseName(string $database)
Determines if a given database name is a valid Silverstripe name.
at line 234
boolean
checkDatabasePermissionGrant(string $database, string $permission, string $grant)
Checks if a specified grant proves that the current user has the specified permission on the specified database
at line 263
boolean
checkDatabasePermission(mixed $conn, string $database, string $permission)
Checks if the current user has the specified permission on the specified database
at line 274
array
requireDatabaseOrCreatePermissions(array $databaseConfig)
Ensure that the database connection is able to use an existing database, or be able to create one if it doesn't exist.
at line 297
array
requireDatabaseAlterPermissions(array $databaseConfig)
Ensure we have permissions to alter tables.