Skip to content
Snippets Groups Projects
Commit 480a2daf authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#193580 by chx: given recent improvements, Drupal does not require CREATE...

#193580 by chx: given recent improvements, Drupal does not require CREATE TEMPORARY TABLE and LOCK TABLES permissions, so do not check on install and do not advise people giving these rights
parent 4615c96d
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -21,8 +21,7 @@ initial database files. Next you must login and set the access database rights:
Again, you will be asked for the 'username' database password. At the MySQL
prompt, enter following command:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE
TEMPORARY TABLES, LOCK TABLES
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER
ON databasename.*
TO 'username'@'localhost' IDENTIFIED BY 'password';
......
......@@ -86,28 +86,6 @@ function drupal_test_mysql($url, &$success) {
$success[] = 'UPDATE';
}
// Test LOCK.
$query = 'LOCK TABLES drupal_install_test WRITE';
$result = mysql_query($query);
if ($error = mysql_error()) {
drupal_set_message(st('Failed to lock a test table on your MySQL database server. We tried locking a table with the command %query and MySQL reported the following error: %error.', array('%query' => $query, '%error' => $error)), 'error');
$err = TRUE;
}
else {
$success[] = 'LOCK';
}
// Test UNLOCK.
$query = 'UNLOCK TABLES';
$result = mysql_query($query);
if ($error = mysql_error()) {
drupal_set_message(st('Failed to unlock a test table on your MySQL database server. We tried unlocking a table with the command %query and MySQL reported the following error: %error.', array('%query' => $query, '%error' => $error)), 'error');
$err = TRUE;
}
else {
$success[] = 'UNLOCK';
}
// Test DELETE.
$query = 'DELETE FROM drupal_install_test';
$result = mysql_query($query);
......
......@@ -81,28 +81,6 @@ function drupal_test_mysqli($url, &$success) {
$success[] = 'UPDATE';
}
// Test LOCK.
$query = 'LOCK TABLES drupal_install_test WRITE';
$result = mysqli_query($connection, $query);
if ($error = mysqli_error($connection)) {
drupal_set_message(st('Failed to lock a test table on your MySQL database server. We tried locking a table with the command %query and MySQL reported the following error: %error.', array('%query' => $query, '%error' => $error)), 'error');
$err = TRUE;
}
else {
$success[] = 'LOCK';
}
// Test UNLOCK.
$query = 'UNLOCK TABLES';
$result = mysqli_query($connection, $query);
if ($error = mysqli_error($connection)) {
drupal_set_message(st('Failed to unlock a test table on your MySQL database server. We tried unlocking a table with the command %query and MySQL reported the following error: %error.', array('%query' => $query, '%error' => $error)), 'error');
$err = TRUE;
}
else {
$success[] = 'UNLOCK';
}
// Test DELETE.
$query = 'DELETE FROM drupal_install_test';
$result = mysqli_query($connection, $query);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment