cannot restore DBs and account suspended on old server. Please help!

Operating System & Version
CentOS v7.9.2009
cPanel & WHM Version
v100.0.10

masterross

Well-Known Member
Apr 7, 2004
73
5
158
Hi,

Im trying to migrate to new server but DBs cannot be restored :(
Both servers run CentOS v7.9.2009 v100.0.10
and MariaDB 10.2
Only Roundcube on source server is Mysql

And the bad thing is that all accounts are suspended and cannot be unsuspended! (SOLVED) - the tool changed DNS on the OLD server to point to the new one.

Here is the output:


Mysql
Preparing MySQL restore …

Restoring MySQL databases
Restoring the database “ceramic1_glazes_com” as “ceramic1_glazes_com” …
The system has created a new database named “ceramic1_glazes_com”.
Granting “ceramic1” access to “ceramic1_glazes_com” with temporary password …
Spawning restoration subprocess for “ceramic1_glazes_com” …
Connecting to MySQL server as “ceramic1” in order to restore “ceramic1_glazes_com” …
Releasing objects in preparation for database restore for “ceramic1_glazes_com” …
Cleaning up in preparation for database restore for “ceramic1_glazes_com” …
Disabling InnoDB strict mode for database restore for “ceramic1_glazes_com” …
Restoring database data for “ceramic1_glazes_com” …
The database restoration subprocess for “ceramic1_glazes_com” is running …
The WebSocket handshake succeeded: wss://11.22.33.44:2087/websocket/MysqlDump?character_set=utf8mb4&dbname=ceramic1_glazes_com&include_data=1
The remote MySQL dump ended successfully.
The database restoration subprocess for “ceramic1_glazes_com” has ended.
The system has restored the contents of the database “ceramic1_glazes_com”.
Restoring the database “ceramic1_wp_com” as “ceramic1_wp_com” …
The system has created a new database named “ceramic1_wp_com”.
Granting “ceramic1” access to “ceramic1_wp_com” with temporary password …
The system failed to restore the “ceramic1_wp_com” database because of an error: Failed to grant “ceramic1” access to “ceramic1_wp_com”: (XID qgad7s) The system received an error from the “MySQL” database “mysql”: 1 (Can't create/write to file '/mysqltmp/#sql_648_0.MAI' (Errcode: 2 "No such file or directory"))
Retrying …
Restoring the database “ceramic1_wp_com” as “ceramic1_wp_com” …
The system will rename the unmanaged database “ceramic1_wp_com” to “ceramic1_wp_com2”.
The system failed to rename the database “ceramic1_wp_com” because of an error: (XID 7grqsf) The system received an error from the “MySQL” database “mysql”: 1 (Can't create/write to file '/mysqltmp/#sql_648_0.MAI' (Errcode: 2 "No such file or directory"))
Granting “ceramic1” access to “ceramic1_wp_com” with temporary password …
The system failed to restore the “ceramic1_wp_com” database because of an error: Failed to grant “ceramic1” access to “ceramic1_wp_com”: (XID xtk5q2) The system received an error from the “MySQL” database “mysql”: 1 (Can't create/write to file '/mysqltmp/#sql_648_0.MAI' (Errcode: 2 "No such file or directory"))
Restoring the database “ceramic1_new_theme_db” as “ceramic1_new_theme_db” …
The system has created a new database named “ceramic1_new_theme_db”.
Granting “ceramic1” access to “ceramic1_new_theme_db” with temporary password …
The system failed to restore the “ceramic1_new_theme_db” database because of an error: Failed to grant “ceramic1” access to “ceramic1_new_theme_db”: (XID na6ny3) The system received an error from the “MySQL” database “mysql”: 1 (Can't create/write to file '/mysqltmp/#sql_648_0.MAI' (Errcode: 2 "No such file or directory"))
Retrying …
Restoring the database “ceramic1_new_theme_db” as “ceramic1_new_theme_db” …
The system will rename the unmanaged database “ceramic1_new_theme_db” to “ceramic1_new_theme_db2”.
The system failed to rename the database “ceramic1_new_theme_db” because of an error: (XID gm4j5f) The system received an error from the “MySQL” database “mysql”: 1 (Can't create/write to file '/mysqltmp/#sql_648_0.MAI' (Errcode: 2 "No such file or directory"))
Granting “ceramic1” access to “ceramic1_new_theme_db” with temporary password …
The system failed to restore the “ceramic1_new_theme_db” database because of an error: Failed to grant “ceramic1” access to “ceramic1_new_theme_db”: (XID svz943) The system received an error from the “MySQL” database “mysql”: 1 (Can't create/write to file '/mysqltmp/#sql_648_0.MAI' (Errcode: 2 "No such file or directory"))
Restoring MySQL database mappings

Restoring MySQL privileges

Mysql
(XID dr7pe4) The system received an error from the “MySQL” database “mysql”: 1 (Can't create/write to file '/mysqltmp/#sql_648_0.MAI' (Errcode: 2 "No such file or directory")) at /usr/local/cpanel/Cpanel/DBI.pm line 200. Cpanel::DBI::_create_exception(Cpanel::DBI::Mysql::st=HASH(0x7db2ac0), "DBD::mysql::st execute failed: Can't create/write to file '/m"..., undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 188 Cpanel::DBI::_error_handler("DBD::mysql::st execute failed: Can't create/write to file '/m"..., Cpanel::DBI::Mysql::st=HASH(0x7db2ac0), undef) called at /usr/local/cpanel/Cpanel/DBI/Mysql/Utils.pm line 72 Cpanel::DBI::Mysql::Utils::show_grants(Cpanel::DBI::Mysql::db=HASH(0x7d35a30), "ceramic1", "85-17-54-86.cprapid.com") called at /usr/local/cpanel/Cpanel/MysqlUtils/Grants.pm line 591 Cpanel::MysqlUtils::Grants::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100 eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91 Try::Tiny::try(CODE(0x613d928), Try::Tiny::Catch=REF(0x613d478)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Grants.pm line 608 Cpanel::MysqlUtils::Grants::show_grants_for_user(Cpanel::DBI::Mysql::db=HASH(0x7d35a30), "ceramic1") called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 140 Cpanel::Mysql::Create::_dbowner_to_all_without_ownership_checks(Cpanel::Mysql=HASH(0x7d4fb40), "method", "GRANT", "users", HASH(0x71c10e8), "database", "") called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 108 Cpanel::Mysql::Create::_dbowner_to_all_with_ownership_checks(Cpanel::Mysql=HASH(0x7d4fb40), "method", "GRANT", "users", HASH(0x71c10e8), "database", "") called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 58 Cpanel::Mysql::Create::add_dbowner_to_all(Cpanel::Mysql=HASH(0x7d4fb40), "ceramic1", "*D159093C3B960FD2E650F652EDD9FAECD4BAF42C", 1) called at /usr/local/cpanel/Whostmgr/Transfers/Systems/Mysql.pm line 1053 Whostmgr::Transfers::Systems::Mysql::__ANON__(Cpanel::Mysql=HASH(0x7d4fb40)) called at /usr/local/cpanel/Whostmgr/Transfers/SystemsBase/MysqlBase.pm line 935 Whostmgr::Transfers::SystemsBase::MysqlBase::_do_cpanel_mysql_with_newuser_privs(Whostmgr::Transfers::Systems::Mysql=HASH(0x54e1590), CODE(0x6a9be30)) called at /usr/local/cpanel/Whostmgr/Transfers/Systems/Mysql.pm line 1062 Whostmgr::Transfers::Systems::Mysql::_restore_dbowner_password_and_privs(Whostmgr::Transfers::Systems::Mysql=HASH(0x54e1590)) called at /usr/local/cpanel/Whostmgr/Transfers/Systems/Mysql.pm line 219 Whostmgr::Transfers::Systems::Mysql::_restore_mysql(Whostmgr::Transfers::Systems::Mysql=HASH(0x54e1590)) called at /usr/local/cpanel/Whostmgr/Transfers/Systems/Mysql.pm line 85 Whostmgr::Transfers::Systems::Mysql::unrestricted_restore(Whostmgr::Transfers::Systems::Mysql=HASH(0x54e1590)) called at /usr/local/cpanel/Whostmgr/Transfers/Systems.pm line 129 Whostmgr::Transfers::Systems::restore(Whostmgr::Transfers::Systems::Mysql=HASH(0x54e1590)) called at /usr/local/cpanel/Whostmgr/Transfers/AccountRestoration.pm line 268 Whostmgr::Transfers::AccountRestoration::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100 eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91 Try::Tiny::try(CODE(0x361cf40), Try::Tiny::Catch=REF(0x6e2d438)) called at /usr/local/cpanel/Whostmgr/Transfers/AccountRestoration.pm line 272 Whostmgr::Transfers::AccountRestoration::_call_one_restore_module_without_archive_prep_check(Whostmgr::Transfers::AccountRestoration=HASH(0x35110b8), "Mysql") called at /usr/local/cpanel/Whostmgr/Transfers/AccountRestoration.pm line 580 Whostmgr::Transfers::AccountRestoration::_call_one_restore_module_with_notices(Whostmgr::Transfers::AccountRestoration=HASH(0x35110b8), "Mysql") called at /usr/local/cpanel/Whostmgr/Transfers/AccountRestoration.pm line 552 Whostmgr::Transfers::AccountRestoration::_run_restore_system_module(Whostmgr::Transfers::AccountRestoration=HASH(0x35110b8), HASH(0x3511340), HASH(0x4e53728)) called at /usr/local/cpanel/Whostmgr/Transfers/AccountRestoration.pm line 518 Whostmgr::Transfers::AccountRestoration::_run_restore_modules(Whostmgr::Transfers::AccountRestoration=HASH(0x35110b8), HASH(0x3511340)) called at /usr/local/cpanel/Whostmgr/Transfers/AccountRestoration.pm line 451 Whostmgr::Transfers::AccountRestoration::_restore_package(Whostmgr::Transfers::AccountRestoration=HASH(0x35110b8)) called at /usr/local/cpanel/Whostmgr/Transfers/AccountRestoration.pm line 94 eval {...} called at /usr/local/cpanel/Whostmgr/Transfers/AccountRestoration.pm line 94 Whostmgr::Transfers::AccountRestoration::restore_package(Whostmgr::Transfers::AccountRestoration=HASH(0x35110b8)) called at /usr/local/cpanel/Whostmgr/Backup/Restore.pm line 81 eval {...} called at /usr/local/cpanel/Whostmgr/Backup/Restore.pm line 81 Whostmgr::Backup::Restore::load_transfers_then_restorecpmove("shared_mysql_server", 0, "replaceip", "all", "mysql_stream", HASH(0x350c4f0), "restorepsql", 1, ...) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Items/AccountBase.pm line 204 Whostmgr::Transfers::Session::Items::AccountBase::_restore_package(Whostmgr::Transfers::Session::Items::AccountRemoteRoot=HASH(0x350a7f8)) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Item.pm line 359 Whostmgr::Transfers::Session::Item::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100 eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91 Try::Tiny::try(CODE(0x3337870), Try::Tiny::Catch=REF(0x33372b8)) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Item.pm line 388 Whostmgr::Transfers::Session::Item::exec_path(Whostmgr::Transfers::Session::Items::AccountRemoteRoot=HASH(0x350a7f8), ARRAY(0x350a828), ARRAY(0x3337db0), 1) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Items/AccountBase.pm line 39 Whostmgr::Transfers::Session::Items::AccountBase::restore(Whostmgr::Transfers::Session::Items::AccountRemoteRoot=HASH(0x350a7f8)) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Processor.pm line 658 Whostmgr::Transfers::Session::Processor::__ANON__() called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 1484 Whostmgr::Transfers::Session::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100 eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91 Try::Tiny::try(CODE(0x350a768), Try::Tiny::Catch=REF(0x350a930)) called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 1488 Whostmgr::Transfers::Session::exec_with_output_directed_to_fh(Whostmgr::Transfers::Session=HASH(0x32b6980), GLOB(0x350aab0), CODE(0x350a720)) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Processor.pm line 674 Whostmgr::Transfers::Session::Processor::_process_dequeued_item(Whostmgr::Transfers::Session::Processor=HASH(0x3362278)) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Processor.pm line 554 Whostmgr::Transfers::Session::Processor::_process_items(Whostmgr::Transfers::Session::Processor=HASH(0x3362278)) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Processor.pm line 508 Whostmgr::Transfers::Session::Processor::__ANON__() called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 68 eval {...} called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 68 Cpanel::ForkAsync::do_in_child(CODE(0x33120d0)) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Processor.pm line 510 Whostmgr::Transfers::Session::Processor::_spawn_child(Whostmgr::Transfers::Session::Processor=HASH(0x3362278), "CREATE DATABASE /*!32312 IF NOT EXISTS*/ `ceramic1_new_theme_"..., Whostmgr::Transfers::Session=HASH(0x32b6980)) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Processor.pm line 292 Whostmgr::Transfers::Session::Processor::_process_child(Whostmgr::Transfers::Session::Processor=HASH(0x3362278), Whostmgr::Transfers::Session=HASH(0x32b6980), 0) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Processor.pm line 240 Whostmgr::Transfers::Session::Processor::_process_child_with_output_redirection(Whostmgr::Transfers::Session::Processor=HASH(0x3362278), Whostmgr::Transfers::Session=HASH(0x32b6980), 0, "9475248177copya20220222225446BIoeHE8") called at /usr/local/cpanel/Whostmgr/Transfers/Session/Processor.pm line 205 Whostmgr::Transfers::Session::Processor::__ANON__() called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 68 eval {...} called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 68 Cpanel::ForkAsync::do_in_child(CODE(0x3347770)) called at /usr/local/cpanel/Whostmgr/Transfers/Session/Processor.pm line 207 Whostmgr::Transfers::Session::Processor::start(Whostmgr::Transfers::Session::Processor=HASH(0x3362278)) called at bin/start_transfer.pl line 57 main::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100 eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91 Try::Tiny::try(CODE(0x32b6788), Try::Tiny::Catch=REF(0x1fe1bf8)) called at bin/start_transfer.pl line 72

Any idea what is wrong?
 
Last edited by a moderator:

Spirogg

Well-Known Member
Feb 21, 2018
700
161
43
chicago
cPanel Access Level
Root Administrator
Found this online and seemed to help someone else.. MySQL: Can't create/write to file '/tmp/#sql_3c6_0.MYI' (Errcode: 2) - What does it even mean?

It seems here is no tmp file or it can't; find it.

they wrote:
I meet this error too when I run a wordpress on my Fedora system.

I googled it, and find a way to fix this.

Maybe this will help you too.

  1. check mysql config : my.cnf
    cat /etc/my.cnf | grep tmpdir

    I can't see anything in my my.cnf
  2. add tmpdir=/tmp to my.cnf under [mysqld]
  3. restart web/app and mysql server
    /etc/init.d/mysqld restart

maybe this might help
 

Spirogg

Well-Known Member
Feb 21, 2018
700
161
43
chicago
cPanel Access Level
Root Administrator
some other users had issues because selinux was enabled


Its due to access control security policies specifically when SELinux is enabled it won't allow external executables to create temporary files in the system locations.

Disable SELinux by issuing below command:

Code:
echo 0 >/selinux/enforce


In case you wish to enable the SELinux security back change 0 to 1 in above command.
You can now start mysql it wont give any permission related errror while reading/writing to /tmp or system directories.

one of these might help you. hopefully :)
 
Last edited:

masterross

Well-Known Member
Apr 7, 2004
73
5
158
Thanx guys,

@Spirogg

You are right mate.
I transferred mysql conf through the tool and was set the tmp dir in the old server differently because I have big DBs and the default tmp is only 4GB.
I realized that last night but was too sleepy. Tonight will set the same dir and try again.

UPDATE:
After making the same tmp dir and setting the right permissions to it, the tool did its job well.
Problem SOLVED!

Thank you all!
 
Last edited:
  • Like
Reactions: cPRex and Spirogg