16
Support / Re: Cannot get tables list. Please check privileges of mysql database user.
« on: December 10, 2020, 12:57:21 AM »
Hello
I contacted my host support and they checked in depth the cause for this message [ Cannot get tables list. Please check privileges of mysql database user.] and their reply is below.
==================================================================================
The reason for the experienced issue appears to be in the core files of Abantecart and more precisely in the following one:
core/lib/backup.php
In this file there is the following code:
//2. check mysql driver
$sql = "SELECT TABLE_NAME AS 'table_name',
table_rows AS 'num_rows', (data_length + index_length - data_free) AS 'size'
FROM information_schema.TABLES
WHERE information_schema.TABLES.table_schema = '".DB_DATABASE."'";
$result = $this->db->query($sql, true);
if ($result === false && DB_DRIVER == 'mysql') {
$this->error[] = 'Probably error will occur. Please change db-driver to "amysqli" in your /system/config.php file.';
} elseif ($result === false) {
$this->error[] = 'Cannot get tables list. Please check privileges of mysql database user.';
var_dump($result);
}
From what I can see this code is being used to check if the tables and data in your database, however opposite to the expected behavior of the application this SQL query returns false which makes the error "Cannot get tables list. Please check privileges of mysql database user." appear at the top of the extensions installation page.
This issue has nothing to do with the privileges of your MySQL user to the information_schema table as your database use already have full privileges for that table. Instead the issue here is caused by something else and that thing is the error which that SQL query results in:
SQL Error: BIGINT UNSIGNED value is out of range in '((`information_schema`.`TABLES`.`DATA_LENGTH` + `information_schema`.`TABLES`.`INDEX_LENGTH`) - `information_schema`.`TABLES`.`DATA_FREE`)'
Error No: 1690
Now, I am not sure why that error appears but definitely, it has nothing to do with the setup of the web hosting service. You might want to forward this result to the authors of the application. I read quite a lot about this error and I even tried to set the SQL mode to "NO_UNSIGNED_SUBTRACTION", however this error still persist.
By the way, from what I understand the file core/lib/backup.php is used with backup purposes, however, we already provide you with a free complimentary backup service so you should simply disregard this message and proceed further with the installation of the module except of course if that error prevents you to proceed with the installation.
I contacted my host support and they checked in depth the cause for this message [ Cannot get tables list. Please check privileges of mysql database user.] and their reply is below.
==================================================================================
The reason for the experienced issue appears to be in the core files of Abantecart and more precisely in the following one:
core/lib/backup.php
In this file there is the following code:
//2. check mysql driver
$sql = "SELECT TABLE_NAME AS 'table_name',
table_rows AS 'num_rows', (data_length + index_length - data_free) AS 'size'
FROM information_schema.TABLES
WHERE information_schema.TABLES.table_schema = '".DB_DATABASE."'";
$result = $this->db->query($sql, true);
if ($result === false && DB_DRIVER == 'mysql') {
$this->error[] = 'Probably error will occur. Please change db-driver to "amysqli" in your /system/config.php file.';
} elseif ($result === false) {
$this->error[] = 'Cannot get tables list. Please check privileges of mysql database user.';
var_dump($result);
}
From what I can see this code is being used to check if the tables and data in your database, however opposite to the expected behavior of the application this SQL query returns false which makes the error "Cannot get tables list. Please check privileges of mysql database user." appear at the top of the extensions installation page.
This issue has nothing to do with the privileges of your MySQL user to the information_schema table as your database use already have full privileges for that table. Instead the issue here is caused by something else and that thing is the error which that SQL query results in:
SQL Error: BIGINT UNSIGNED value is out of range in '((`information_schema`.`TABLES`.`DATA_LENGTH` + `information_schema`.`TABLES`.`INDEX_LENGTH`) - `information_schema`.`TABLES`.`DATA_FREE`)'
Error No: 1690
Now, I am not sure why that error appears but definitely, it has nothing to do with the setup of the web hosting service. You might want to forward this result to the authors of the application. I read quite a lot about this error and I even tried to set the SQL mode to "NO_UNSIGNED_SUBTRACTION", however this error still persist.
By the way, from what I understand the file core/lib/backup.php is used with backup purposes, however, we already provide you with a free complimentary backup service so you should simply disregard this message and proceed further with the installation of the module except of course if that error prevents you to proceed with the installation.