Mariadb error 1356

Starting with the MariaDB-10.4+ the mysql.user is a view rather than a table. Read the post for to resolve the Error 1356.

I needed to change the hostname on mysql database logins because the application server name was changed. I ran the following command:

MariaDB [mysql]>  update user set host='app1.example.com' where Host='app2.example.com';
ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

Starting with the MariaDB-10.4+ the mysql.user is a view rather than a table.

Always check the official documentation and use SET PASSWORD or ALTER USER to manage user authentication.

If you need to execute massive command rename user, for example because you have change hostname to application server, this script can help you :

An example output :

select user,host from user where host='app1.example.com';
+-----------+-----------------+
| User      | Host            |
+-----------+-----------------+
| USER1     | app1.example.com|
| USER2     | app1.example.com|
| USER3     | app1.example.com|
| USER4     | app1.example.com|
| USER5     | app1.example.com|
+-----------+-----------------+

We need to change Host from app1.example.com to app10.example.com and theoretically you have to run 5 rename user commands, but thanks to this script the command will be generated without writing “by hand”.

SELECT CONCAT('RENAME USER '', user, ''@'',host, '' TO '', user, ''@'app2.example.com';'  ) from mysql.`user` u where host='app1.example.com';
|+-----------+-----------------+-----------------+-----------------+--------------+
|RENAME USER 'USER1'@'app1.example.com' TO 'USER1'@'app2.example.com';            |
|RENAME USER 'USER2'@'app1.example.com' TO 'USER2'@'app2.example.com';            |
|RENAME USER 'USER3'@'app1.example.com' TO 'USER3'@'app2.example.com';            |
|RENAME USER 'USER4'@'app1.example.com' TO 'USER4'@'app2.example.com';            |
|RENAME USER 'USER5'@'app1.example.com' TO 'USER5'@'app2.example.com';            |
+-----------+-----------------+-----------------+-----------------+---------------+

Copy the output and execute.

Enjoy :-).

Содержание

  1. Как мне понять, почему MySQL не позволяет мне запрашивать представление?
  2. Another MySQL DBA
  3. Pages
  4. Friday, December 6, 2013
  5. ERROR 1356 (HY000)
  6. 3 comments:
  7. Resolved View ‘mysql.user’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
  8. samson
  9. ERROR 1356 (HY000): View ‘mysql.user’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them​
  10. IgorG
  11. samson
  12. Bitpalast
  13. Как мне выяснить, почему MySQL не позволяет мне запрашивать представление?
  14. 5 ответов
  15. См. следующий пример:
  16. Как и ожидалось, это не сработает.
  17. Но это тоже не сработает.
  18. Как и ожидалось, это все равно не сработает.
  19. Но странно, теперь это работает!
  20. Ошибка #1356 Invalid table(s) or column(s) or function(s) or definer
  21. Сообщения 2
  22. 1 Тема от mif2001 2016-06-20 15:33:42
  23. Тема: Ошибка #1356 Invalid table(s) or column(s) or function(s) or definer
  24. 2 Ответ от Hanut 2016-06-20 15:58:07
  25. Re: Ошибка #1356 Invalid table(s) or column(s) or function(s) or definer
  26. Сообщения 2

Как мне понять, почему MySQL не позволяет мне запрашивать представление?

Я использую MySql 5.6. Я запрашиваю представление и получаю эту ошибку

Я вижу определение представления и не похоже, что что-то не так.

Как определить, какие столбцы и таблицы недействительны? Обратите внимание, что во время выполнения обеих команд я зарегистрировался как root.

Изменить: Вот результат “SHOW CREATE VIEW report_toc_item” в соответствии с запросом.

Вот гранты, назначенные для данного пользователя

Полное сообщение об ошибке:

Проверьте определитель вида, и если он есть, убедитесь, что учетная запись определителя может выполнить выбор.

Чтобы увидеть определитель, используйте:

DEFINER=myuser@localhost SQL SECURITY DEFINER означает, что представление будет выполнено с правами myuser@localhost (а не как ваш текущий вход в корневой каталог), см. документация:

  • Сохраненная программа или представление, которое выполняется в определенном контексте безопасности, выполняется с привилегиями учетной записи, названной ее атрибутом DEFINER. Эти привилегии могут полностью отличаться от прав доступа вызывающего пользователя. Вызывающий должен иметь соответствующие права для ссылки на объект (например, EXECUTE для вызова хранимой процедуры или SELECT для выбора из представления), но когда объект выполняется, привилегии вызывающего объекта игнорируются и имеют значение только привилегии учетной записи DEFINER. Если эта учетная запись имеет несколько привилегий, объект соответственно ограничен в операциях, которые он может выполнять. Если учетная запись DEFINER имеет высокую привилегию (например, учетную запись root), объект может выполнять мощные операции независимо от того, кто его вызывает.
  • Сохраненная процедура или представление, которое выполняется в контексте безопасности вызывающего, может выполнять только операции, для которых у invoker есть привилегии. Атрибут DEFINER может быть указан, но не влияет на объекты, которые выполняются в контексте invoker.

Итак, в зависимости от того, чего вы хотите достичь, либо предоставите требуемые права на myuser@localhost , измените definer на пользователя, который имеет эти права, либо измените sql security на invoker . Обычно используется второй вариант, если у вас нет причин для этого.

Чтобы изменить definer или sql security , вам нужно будет alter (или отбросить и воссоздать) представление, включая всю часть as select . . Вы можете использовать вывод show create view report_toc_item для этого и просто изменить его в начале. Значения по умолчанию для definer и sql security будут текущим пользователем и definer .

Если представление ссылается на недопустимый столбец, тогда показать, что создание представления не будет работать.

Итак, проверьте следующий запрос, который правильно определяет представление. Потому что, если вы удалите любой столбец из таблицы toc_item , представление не будет работать.

select `ti`.`ID` AS `ID`,`ti`.`PARENT_ID` AS `PARENT_ID`,`ti`.`TOC_ID` AS TOC_ID , `ti`. `TITLE` AS` TITLE`, `ti`.`DESCRIPTION` AS` ОПИСАНИЕ`, `ti««TYPE_ID« « `TYPE_ID`,` ti«`ORDER_NUM` AS `ORDER_NUM`,` ti`.`MY_OBJECT_SEGMENT_ID` AS `MY_OBJECT_SEGMENT_ID`,` ti`.`MY_OBJECT_SEGMENT_ORDER_NUM` AS `MY_OBJECT_SEGMENT_ORDER_NUM`,` ti`.`ELEMENT_ID` AS `ELEMENT_ID`,` ti`.`UNIT_TOC_ITEM_ID` AS ` UNIT_TOC_ITEM_ID`, `ti`.`SHORT_NAME` AS` SHORT_NAME`, `ti«`THIRD_PARTY_PROMPT_ID` AS` THIRD_PARTY_PROMPT_ID`, `pti`.`TYPE_ID` AS` PARENT_TYPE_ID` из (`my_db`.`toc_item« ti` присоединитесь к `my_db`.`toc_item« pti` on ((`pti«««` « « « « `PARENT_ID`)), где ((` ti««TYPE_ID` = ‘sub_segment’) и (( `pti`.`TYPE_ID` = ‘lesson’) или (` pti`.`TYPE_ID` = ‘activity’) или (`pti`.`TYPE_ID` = ‘activity_practice’) или (` pti`.`TYPE_ID` = ‘unit_opener’)));Код >

Источник

Another MySQL DBA

Pages

Friday, December 6, 2013

ERROR 1356 (HY000)

The most important thing to understand when coming upon an error is to take a moment and relax.
Sometimes people run across an error and become flustered and frustrated. Take a deep breath and relax. Sometimes » Madness is like gravity. All that needs is a little push » and “Sometimes the questions are complicated and the answers are simple.”

What is all this about? Well for example I recently was asked to help solve a problem that was troubling another DBA. Nothing meant in disrespect at all to that DBA but being in a rush people just overlook the answer that is in front of them and instead spiral down into madness .

Here is the general concept of the situation.

After doing a mysqldump of a database the user moved it to another database for others to being testing. The import worked just fine. However, the users began to see errors when they tried to query from a prebuilt view.

mysql> select * from limit 1;

ERROR 1356 (HY000): View ‘ . ‘ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

The first reaction was to assume that the something went wrong with the import. Did the view or actually the related tables become corrupt?

No.

To solve this error the first thing todo was to: mysql> show create view G

You likely will see something that begins like this:
*************************** 1. row ***************************
View: Visitors

Create View: CREATE ALGORITHM=UNDEFINED DEFINER=` `@` ` SQL SECURITY DEFINER VIEW

After you see who the definer is : ` `@` ` you can view the grants for that user.

mysql> show grants for ` `@` `;

It turns out the the solution was just what the error said in the first place: » definer/invoker of view lack rights to use them »

To make it easy you can do a show grants in the database where it already works and copy the grant statement, or you can review what type of permissions you need to implement in the new database to enable the view to gather the required data.

A simple update of permissions for the user and the error was gone.

“ Sometimes the answers are simple .”

I am getting this error as root@localhost! I thought root could do anything
Here is what show create view displays
CREATE ALGORITHM=UNDEFINED DEFINER=`abc`@`localhost` SQL SECURITY DEFINER VIEW `open_claim` AS select . list of columns. where isnull(`claim`.`checkout_timestamp`)

regarding my earlier question as to why root can’t select from the view, the solution turned out to be add SECURITY INVOKER VIEW to the create view statement.

Источник

Resolved View ‘mysql.user’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

samson

New Pleskian

Plesk Obsidian
Version 18.0.40

Plesk was unable to update mariadb from 10.3 to 10.4, so I manually upgraded. The mariadb upgrade deleted some of plesks extensions.
Reinstalled plesk sucessfully, however, since mariadb 10.4, they have changed the table mysql.user to mysql.global_priv and now user is only a view.
Plesk will not install any apps with the following error.

ERROR 1356 (HY000): View ‘mysql.user’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them​

IgorG

Forums Analyst

Looks like database is corrupted. Try the following workaround:

1. Insert missing privileges:

2. Restart MariaDB to apply security changes:

# servier mariadb restart

3. Verify that select works now:

select * from user;

samson

New Pleskian

here’s the error after applying insert query

ERROR 1292 (22007): Incorrect datetime value: ‘0000-00-00 00:00:00’ for column `mysql`.`tables_priv`.`Timestamp` at row 1

Bitpalast

Plesk addicted!

then restart MariaDB.
# service mariadb restart

Further, after upgrading MariaDB did you run
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
to upgrade the MySQL scheme? If not, run it. There is no problem to run it again (if you might have done so earlier), it won’t cause any damage.

For Plesk also make sure to run
# plesk sbin packagemng -sdf
to tell Plesk that you have a new version of something.

And finally, if the database itself starts up without problems, run
# plesk repair db -y
because after some upgrades of the database, Plesk needs to update some «datetime» settings, because between older and newer MariaDB versions some aspects of that has changed.

Источник

Как мне выяснить, почему MySQL не позволяет мне запрашивать представление?

Я использую MySql 5.6. Я запрашиваю представление и получаю эту ошибку

Я вижу определение представления и не похоже, что что-то не так.

Как определить, какие столбцы и таблицы недействительны? Обратите внимание, что во время выполнения обеих команд я зарегистрировался как root.

Изменить: Вот результат «SHOW CREATE VIEW report_toc_item» в соответствии с запросом.

Вот гранты, назначенные для данного пользователя

5 ответов

Полное сообщение об ошибке:

Проверьте определитель вида, и если он есть, убедитесь, что учетная запись определителя может выполнить выбор.

Чтобы увидеть определитель, используйте:

Если представление ссылается на недопустимый столбец, тогда показать, что создание представления не будет работать.

Итак, проверьте следующий запрос, который правильно определяет представление. Потому что, если вы удалите любой столбец из таблицы toc_item , представление не будет работать.

select `ti`.`ID` AS `ID`,`ti`.`PARENT_ID` AS `PARENT_ID`,`ti`.`TOC_ID` AS TOC_ID , `ti`. `TITLE` AS` TITLE`, `ti`.`DESCRIPTION` AS` ОПИСАНИЕ`, `ti««TYPE_ID« « `TYPE_ID`,` ti«`ORDER_NUM` AS `ORDER_NUM`,` ti`.`MY_OBJECT_SEGMENT_ID` AS `MY_OBJECT_SEGMENT_ID`,` ti`.`MY_OBJECT_SEGMENT_ORDER_NUM` AS `MY_OBJECT_SEGMENT_ORDER_NUM`,` ti`.`ELEMENT_ID` AS `ELEMENT_ID`,` ti`.`UNIT_TOC_ITEM_ID` AS ` UNIT_TOC_ITEM_ID`, `ti`.`SHORT_NAME` AS` SHORT_NAME`, `ti«`THIRD_PARTY_PROMPT_ID` AS` THIRD_PARTY_PROMPT_ID`, `pti`.`TYPE_ID` AS` PARENT_TYPE_ID` из (`my_db`.`toc_item« ti` присоединитесь к `my_db`.`toc_item« pti` on ((`pti«««` « « « « `PARENT_ID`)), где ((` ti««TYPE_ID` = ‘sub_segment’) и (( `pti`.`TYPE_ID` = ‘lesson’) или (` pti`.`TYPE_ID` = ‘activity’) или (`pti`.`TYPE_ID` = ‘activity_practice’) или (` pti`.`TYPE_ID` = ‘unit_opener’)));Код >

См. следующий пример:

Как и ожидалось, это не сработает.

Но это тоже не сработает.

Как и ожидалось, это все равно не сработает.

Но странно, теперь это работает!

[email protected] SQL SECURITY DEFINER означает, что представление будет выполнено с правами [email protected] (а не как ваш текущий вход в корневой каталог), см. документация:

  • Сохраненная программа или представление, которое выполняется в определенном контексте безопасности, выполняется с привилегиями учетной записи, названной ее атрибутом DEFINER. Эти привилегии могут полностью отличаться от прав доступа вызывающего пользователя. Вызывающий должен иметь соответствующие права для ссылки на объект (например, EXECUTE для вызова хранимой процедуры или SELECT для выбора из представления), но когда объект выполняется, привилегии вызывающего объекта игнорируются и имеют значение только привилегии учетной записи DEFINER. Если эта учетная запись имеет несколько привилегий, объект соответственно ограничен в операциях, которые он может выполнять. Если учетная запись DEFINER имеет высокую привилегию (например, учетную запись root), объект может выполнять мощные операции независимо от того, кто его вызывает.
  • Сохраненная процедура или представление, которое выполняется в контексте безопасности вызывающего, может выполнять только операции, для которых у invoker есть привилегии. Атрибут DEFINER может быть указан, но не влияет на объекты, которые выполняются в контексте invoker.

Итак, в зависимости от того, чего вы хотите достичь, либо предоставите требуемые права на [email protected] , измените definer на пользователя, который имеет эти права, либо измените sql security на invoker . Обычно используется второй вариант, если у вас нет причин для этого.

Чтобы изменить definer или sql security , вам нужно будет alter (или отбросить и воссоздать) представление, включая всю часть as select . . Вы можете использовать вывод show create view report_toc_item для этого и просто изменить его в начале. Значения по умолчанию для definer и sql security будут текущим пользователем и definer .

Обеспечьте аутентификацию с MySQL с localhost как myuser. Перед запуском любых тестов убедитесь, что вы сбросили эти привилегии.

В Руководстве по MySQL: «Чтобы сообщить серверу о перезагрузке таблиц грантов, выполните операцию сброса-привилегий. Это можно сделать, выпустив инструкцию FLUSH PRIVILEGES или выполнив mysqladmin flush-privileges или команду mysqladmin reload».

Вместо предоставления ИСПОЛЬЗОВАНИЯ выделите ВСЕ и удалите «ALGORITHM = UNDEFINED DEFINER = myuser @ localhost SQL Defence Defence».

Поместите условный DROP TABLE IF EXISTS в верхнюю часть исчерпывающего экспериментального файла (который объединяет все настройки и тест)

Запустите тест и попросите его работать в простейшем случае, а затем постепенно добавьте ограничения и функции в таблицу, чтобы найти точку прерывания. Получите все остальное, чтобы работать, но функция, которая нарушает доступ.

Затем вы можете изучить функцию, которая нарушает доступ или не решит ее использовать.

Источник

Ошибка #1356 Invalid table(s) or column(s) or function(s) or definer

Форум PHP-MyAdmin.RU → Работа с phpMyAdmin → Ошибка #1356 Invalid table(s) or column(s) or function(s) or definer

Чтобы отправить ответ, вы должны войти или зарегистрироваться

Сообщения 2

1 Тема от mif2001 2016-06-20 15:33:42

  • mif2001
  • Новичок
  • Неактивен
  • Зарегистрирован: 2016-06-20
  • Сообщений: 1

Тема: Ошибка #1356 Invalid table(s) or column(s) or function(s) or definer

Почтовая программа
Ввод пустой записи и его последующее удаление привело к нарушению связей в Базе данных и таблице, конкретно, «view_users».
Кроме неё есть еще три работающие таблицы.

SQL-запрос: Изменить
SHOW FULL FIELDS FROM `view_users` ;
Ответ MySQL: Документация
#1356 — View ‘mailserver.view_users’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

Как поступить:
1) Где хранит Oracle базу данных с почтой ?
2) Где хранит виртуальный сервер Базу данных с почтой?
3) Каким способом устранить указанную выше ошибку ?

2 Ответ от Hanut 2016-06-20 15:58:07

  • Hanut
  • Модератор
  • Неактивен
  • Откуда: Рига, Латвия
  • Зарегистрирован: 2006-07-02
  • Сообщений: 9,722

Re: Ошибка #1356 Invalid table(s) or column(s) or function(s) or definer

1) вероятно где-то в БД mailserver.
2) Там же, где и Oracle.
3) Ошибка говорит о недостатке прав. Проверьте учетную запись которой идет подключение.

Сообщения 2

Чтобы отправить ответ, вы должны войти или зарегистрироваться

Форум PHP-MyAdmin.RU → Работа с phpMyAdmin → Ошибка #1356 Invalid table(s) or column(s) or function(s) or definer

Форум работает на PunBB , при поддержке Informer Technologies, Inc

Currently installed 7 official extensions . Copyright © 2003–2009 PunBB.

Источник

Hello all!
So, I was messing around with a Dev environment to simulate some strategies, doing some tests, and after a mysqldump exporting, dropping, and reimporting my whole database got this error.

If you arrived here from Google, Is this your case?

Well, this happens for a simple reason. The routines are not exported by mysqldump by default. Why? I don’t know either, this is an abomination to me. This would be very cheap to be the default right?

Happens that even for a new database, when importing a dump generated with –all-databases the sys/information_schema routines are deleted by the restore process. Well, at least this is recognized as a Bug (Bug 83259).

I noticed that when trying to query a sys view to get locks info, as per:

root@localhost-(none)-13:46:26>SELECT waiting_trx_id, waiting_pid, waiting_query, blocking_trx_id,
-> blocking_pid, blocking_query FROM sys.innodb_lock_waits;
ERROR 1356 (HY000): View 'sys.innodb_lock_waits' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

Hm.. Weird message, let’s check for information_schema objects:

root@localhost-(none)-13:46:39>select count(*) from information_schema.ROUTINES where ROUTINE_SCHEMA='sys';
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)

Ok, so, if you are already in this mess, how to quick recover?
Well, just run the mysql_upgrade (assuming you are in the top version/repository you have available on server):

root@localhost-(none)-13:47:34>exit
Bye
[root@greporasrv ~]# mysql_upgrade
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv OK
mysql.db OK
mysql.engine_cost OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.gtid_executed OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.server_cost OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
The sys schema is already up to date (version 1.5.1).
Found 0 sys functions, but expected 22. Re-installing the sys schema.
Upgrading the sys schema.
Checking databases.
mysqlslap.t1 OK
[... my other databases...]
sys.sys_config OK
world.city OK
world.country OK
world.countrylanguage OK
Upgrade process completed successfully.
Checking if update is needed.

Fine, lets test it:

[root@greporasrv ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 32
Server version: 5.7.24-log MySQL Community Server (GPL)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

root@localhost-(none)-13:49:44>select count(*) from information_schema.ROUTINES where ROUTINE_SCHEMA='sys';
+----------+
| count(*) |
+----------+
| 48 |
+----------+
1 row in set (0.00 sec)

root@localhost-(none)-13:49:53>

Hope it helps.
Cheers!

ERROR 1356 (HY000)

The most important thing to understand when coming upon an error is to take a moment and relax. 
Sometimes people run across an error and become flustered and frustrated.  Take a deep breath and relax. Sometimes «Madness is like gravity. All that needs is a little push» and “Sometimes the questions are complicated and the answers are simple.”


What is all this about? Well for example I recently was asked to help solve a problem that was troubling another DBA. Nothing meant in disrespect at all to that DBA but being in a rush people just overlook the answer that is in front of them and instead spiral down into madness


Here is the general concept of the situation. 


After doing a mysqldump of a database the user moved it to another database for others to being testing. The import worked just fine. However, the users began to see errors when they tried to query from a prebuilt view. 


mysql> select * from <View_name> limit 1; 

ERROR 1356 (HY000): View ‘<DB_NAME>.<ViewName>’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them 


The first reaction was to assume that the something went wrong with the import. Did the view or actually the related tables become corrupt? 


No. 


To solve this error the first thing todo was to:    mysql> show create view <View_Name> G 


You likely will see something that begins like this:
*************************** 1. row *************************** 
View: Visitors 

Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`<Some_user>`@`<Some_host_or_IP>` SQL SECURITY DEFINER VIEW


After you see who  the definer is : `<Some_user>`@`<Some_host_or_IP>`   you can view the grants for that user. 


mysql> show grants for `<Some_user>`@`<Some_host_or_IP>`; 


It turns out the the solution was just what the error said in the first place:  «definer/invoker of view lack rights to use them«


To make it easy you can do a show grants in the database where it already works and copy the grant statement, or you can review what type of permissions you need to implement in the new database to enable the view to gather the required data. 


A simple update of permissions for the user and the error was gone.  


Sometimes the answers are simple.”









  • #1

Dear forum,

I’m aware that this is probably in the wrong section and should be among bugs, but I’ve got a problem and no good question to ask, so I’ll explain the problem in short. I believe this could be a bug. Either with DA or with AlmaLinux, I hope someone with a deeper knowledge of either can tell me here.

When suspending, unsuspending a user or attempting to create/edit databases within the user, we’re getting the following error:

Unable to set password for db useramas_db : View ‘mysql.user’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Unable to set password for db useramas : View ‘mysql.user’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

Full situation below.

We’ve got 2 VPS’es right now. An old one that has CentOS 8, and a new one that has AlmaLinux 8.5.
After completely installing AlmaLinux, I’ve moved a user from the old VPS to the new VPS.
When trying to unsuspend the user, we got the aforementioned error.
When Googling for the error, the following suggestions showed up for me:

dbsysupgrade.com

I do not have enough knowledge to take out the neccessary information from the above sources, but what I do understand is that I have to set the MariaDB version to 10.3 in order to get it to work again.
However, the old VPS is using MariaDB 10.4, and the new one is using 10.6. So this should not be a problem. So I had decided to set the MDB versions to the same version: 10.4
After setting the new VPS’ MDB to 10.4, it spewed out the following information:

chrome_ZZDCtjDDUL.png

mRemoteNG_2QYNEyahSn.png

Now I am not completely unable to make changes to a user, but the MDB service is down. It’s now on the same version as the old server is. I need

help

information because I do not have enough knowledge on what is happening here, so I’ve reverted the version from 10.4 back to 10.6. This went without any problems whatsoever.

With no change at all, I could update the user (suspend, unsuspend, create and edit a db user). I did have to delete the existing user and restore it before the whole thing started to work again. I should have probably made a screenshot of this error too, as I could not access the domain userdomain.vps11.dhost.nl (DNS zone A record from [userdomain.vps11.dhost.nl -> 93.119.13.214] (vps14.dhost.nl) to make this userdomain visible while using the old link, but this is completely unrelated to the problem at hand)

I’m aware that everything I’ve just explained looks like a mess, but these are all the steps that I have executed in order to make the best out of the whole thing. Hit me up with any questions you may have.

  • #2

The main problem after you did «downgrade» ? Is it downgrade ? , is that downgrade is not supported!

Doesn’t help you but F.Y.I.

You can try new version and then look in changelogs and error log files which default settings changed or depricated failed, then in the mysql config files put those settings ,, as for example ( «strict» is default on in newer versions)

Only one example i can’t help with MYSQL mariadb only pointing out possible direction to look for. ;)

EDIT:
Also a ticket at DA supporrt while could be BUG:

When suspending, unsuspending a user or attempting to create/edit databases within the user, we’re getting the following error:

EDIT: Also post for support versions of DA, Custombuild, and if used Custom Build GUI plugin.

Last edited: Dec 9, 2021

  • #3

The problem is that the user I tried to edit did not accept any database edits whatsoever. This is why I’ve tried downgrading (which didn’t work). So I’ve effectively done a re-install of 10.6, which is when db changes started working.

  • #4

The problem is that the user I tried to edit did not accept any database edits whatsoever. This is why I’ve tried downgrading (which didn’t work). So I’ve effectively done a re-install of 10.6, which is when db changes started working.

See my edited above for yes no ticket or bug..?.

Downgrade you can forget at all, is not supported and only BIG problems.

Only that one user?
Then support need i think some history for that user to , so in which version suspended // and ….

  • #5

Yeah, I was replying to your unedited message. Either way, a complete re-install of the 10.6 version is what solved the problem. But thank you for pointing out the downgrade issue, that’s useful in the future for me! :) And yes, besides this, it feels like this suffices as a bug, but idk why this has only occured to me and not others afaik

  • #6

And yes, besides this, it feels like this suffices as a bug, but idk why this has only occured to me and not others afaik

First check ( if only that one user has this problem) it could be not only you, only you are the first that see / have this problem in this combination. ;)

I think could be handy to notice DA support for this matter.

smtalk


  • #7

Are you sure directadmin.conf has mysql_detect_correct_methods=1 set?

  • #8

Are you sure directadmin.conf has mysql_detect_correct_methods=1 set?

It seems that it is set to true. However, the file seems to have been edited at 11:40 AM my time, which is 5 minutes

AFTER

BEFORE I had done the re-install of the MDB 10.6, so I cannot confirm or disprove if this flag was set to 1 prior to now

Edit: I understand times are not meaningful, just the order in which the steps were executed in.

Last edited: Dec 9, 2021

  • #9

Additional info: it seems that the update of DirectAdmin from 1.63.2 to 1.63.3 at that time has edited the file. I did the update because it was not working. I updated BEFORE the re-install of 10.6, it was not working then too

Понравилась статья? Поделить с друзьями:
  • Mariadb error 1236
  • Mariadb error 1064 42000
  • Mariadb error 1045 28000 access denied for user root localhost using password yes
  • Mari license error
  • Margin of error статистика