Removed orphaned SQL users, now getting mysqldump errors

  • Hi all


    i-MSCP 1.1.16 on Debian 7.7


    I cleaned up some orphaned sql users from deleted domains a week ago. Since then I'm getting this error mailed to me, on each backup:


    I get the error message just for this user. The associated database does not exist anymore.
    I can't find the user nowhere in the imscp database, nor /etc/, or /var/www/imscp.


    Does anyone know where this error originates?


    Thanks for all the help,
    Jadawin

  • Hello @Jadawin



    When you say: "I cleaned up some orphaned sql users from deleted domains a week ago.", you're are talking about what entries exactly? If you removed those users from the PMA users interface, you must now also remove those users from the imscp.sql_user table.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • I deleted the domain account over the imscp interface (which in turn should delete all mail accounts, MySQL users/dbs, etc. ). I discovered later, that the database was deleted, but not the related user. So I went ahead and deleted this user. I did not modify anything in the imscp database and the user isn't mentioned anywhere in there.
    - The sql user isn't in imscp nor MySQL anymore.
    - There is no database for this user.
    - I did this with about 10 to 15 other orphaned users, without errors.
    - Backups are created just fine.


    Btw proposal for the logs:
    Insted of this text:

    Quote

    user scheduled deletion of the customer account with ID 1


    Put this text:

    Quote

    user scheduled deletion of the customer account domain.tld with ID 1


    Would make searching for deleted domains a bit easier, since the id doesn't exist anymore :)

  • Re;


    @Jadawin


    This error message:


    Code
    1. iMSCP::Database::mysql::dumpdb: mysqldump: Got error: 1449: The user specified as a definer ('70_dbuser'@'localhost') does not exist when using LOCK TABLES


    means that the user 70_dbuser'@'localhost' still exist somewhere... Give me a root access and I'll check for you..

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Re;


    @Jadawin


    Teamviewer suck sometime (I get disconnected for nothing sometime). We can give a try to it at first if you want. Yes, I'll be there at 14 hours PM (In France, it is 12:20 right now).

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Sure


    Code
    1. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUKOlEhBcNvN/8Dpd5wJJ1N6yc32FJEhQVzJB9Io9ae+3fipvuZbLzXKqOQFl5gTqZdkV/z0ldlOOCljeonWfUA2tRmRbIixD9q6LxAnJm1SsSXDi+AHBp0zLd0qJLcTlwbdoDq0mJvchPXgBlX4VXRMwJe/SqDhTLqJvt3+oUh3jIMofv4ukBhYD5Wn/6PfK1WwLMSDamy+c5xuyM/bTq1BIcU/CEDKIN98y6zmO+IbHSa61A+M6nLOnLH/F/lyVkdrAR8WmtxBAJCBJan0O6YsNDISM/p9YzokxTvDiO5Y+AQ7HRKck1kA2Cl3mF/LsVewBaTL6GTv4MJ8f696xb [email protected]

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Ok @Nuxwin found the problem.


    The user was from a development account for another domain (production). The development database had some sql views, created ("defined") by this user. MySQL stores this information in it's information_schema database. It has a field for the view creater, the "definer" (works for procedures too, btw).
    On the go live I copied over all the tables and views from development to the production database. With it came the little information of the original definer, the development user. Years later I decided to delete the development account, with all it's sql databases and users. But apparently, MySQL didn't like this and threw errors everytime the views in the prodution database got backupped.


    A really strange problem, but I'm glad it got sorted :)