Recommend this page to a friend! |
PHP Multi MySQLDump | > | All threads | > | Errors and empty backup files | > | (Un) Subscribe thread alerts |
|
Thomas Pohl - 2017-02-23 01:19:45
Package installed - check
dbConnSettings.php edit - check (their is still this 3306 <-> 3307 problem) Test and yes! - shows my tables and "Dump successfully accomplished!!!" but if i try to download zip or tgz -> downloaddumb.php needs Class.LogDeltaTime.php OK - download - install - add my time zone (PHP7) again Test and yes! - shows my tables and "Dump successfully accomplished!!!" But all backup files are empty 0byte... no error message... whats my mistake? need your help
Alessandro Quintiliani - 2017-02-23 08:41:55 - In reply to message 1 from Thomas Pohl
Good morning Thomas
which server are you dumping the tables from? Do you have permission to execute the mysqldump command? Try to open a prompt MsDOS on Windows, or a terminal on Linux and write one of the two the following commands # the following command refers to a table having InnoDB as type engine mysqldump -h hostnameOrIPaddressOfDBServer --single-transaction [-P portNumberIfDifferentFrom3306] -u loginToDB -pPasswordToDB dbname tableName > pathToSqlFile # the following command refers to a table having MyISAM as type engine mysqldump -h hostnameOrIPaddressOfDBServer --lock-tables=TRUE [-P portNumberIfDifferentFrom3306] -u loginToDB -pPasswordToDB dbname tableName > pathToSqlFile then press ENTER and post me the output message, if any. Regards Alessandro Quintiliani
Thomas Pohl - 2017-02-23 10:53:14 - In reply to message 2 from Alessandro Quintiliani
Alessandro, thanks for your help!
It is a shared hosting server - i do not have a console fur this sql server. Tables are mixed MyIsam/InnoDB. version 5.5.54-0+deb7u2-log version_comment (Debian) version_compile_machine x86_64 version_compile_os debian-linux-gnu Tools like "Adminer" are working normally. MultiMySQLDump - reads all tables, create logs and creates empty files for each database table. (means are able to read db and write to file) PHP Version 7.0.15 System Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux Build Date Jan 25 2017 08:23:43 Configure Command './configure' '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--disable-dependency-tracking' '--program-suffix=7.0' '--libdir=/usr/lib/php7.0' '--with-config-file-path=/usr/lib/php7.0' '--with-pear=/usr/lib/php7.0' '--bindir=/usr/bin' '--includedir=/usr/include' '--with-zlib' '--enable-debug=no' '--enable-safe-mode=no' '--enable-discard-path=no' '--with-gd' '--with-png-dir' '--enable-track-vars' '--with-db' '--with-gdbm' '--enable-force-cgi-redirect' '--with-ttf' '--enable-ftp' '--with-mcrypt' '--enable-memory-limit' '--enable-calendar' '--enable-wddx' '--enable-bcmath' '--enable-gd-imgstrttf' '--enable-shmop' '--with-openssl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--with-imap' '--with-curl' '--with-iconv' '--with-freetype-dir' '--with-bz2' '--with-gettext' '--enable-exif' '--enable-mbstring=all' '--with-kerberos' '--with-sqlite' '--with-imap-ssl' '--with-libxml-dir' '--with-xsl' '--with-xslt-sablot' '--with-jpeg-dir' '--with-tidy' '--enable-soap' '--enable-xslt' '--enable-sqlite-utf8' '--enable-zip' '--enable-intl' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-mysql=mysqlnd' 'build_alias=x86_64-linux-gnu' mysqli MysqlI Support enabled Client API library version mysqlnd 5.0.12-dev mysqlnd enabled Version mysqlnd 5.0.12-dev Compression supported core SSL supported extended SSL supported Command buffer size 4096 Read buffer size 32768 Read timeout 31536000 Collecting statistics Yes Collecting memory statistics No Tracing n/a Loaded plugins mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_sha256_password API Extensions pdo_mysql,mysqli PDO support enabled PDO drivers sqlite, mysql PDO Driver for MySQL enabled Client API version mysqlnd 5.0.12-dev pdo_mysql.default_socket /tmp/mysql.sock
Alessandro Quintiliani - 2017-02-23 13:23:31 - In reply to message 3 from Thomas Pohl
Hello Thomas
to help you on how exactly the mysql dump error arises from, you should do the following steps: 1) create a php file named i.e. test.php and place inside the web directory where you put the package Multi MySQLDump 2) copy the following php instructions inside test.php @unlink("errormysqldump.txt"); unset($output); $output = array(); # uncomment the following exec if the table has a InnoDB type engine # exec("mysqldump --single-transaction -h hostnameOrIPaddressOfDBServer [-P portNumberIfDifferentFrom3306] --log-error=errormysqldump.txt -u loginToDB -pPasswordToDB dbname tableName > pathToSqlFile", $output); # uncomment the following exec if the table has a MyISAM type engine # exec("mysqldump --lock-tables=TRUE -h hostnameOrIPaddressOfDBServer [-P portNumberIfDifferentFrom3306] --log-error=errormysqldump.txt -u loginToDB -pPasswordToDB dbname tableName > pathToSqlFile", $output); echo file_get_contents("errormysqldump.txt"); unlink("errormysqldump.txt"); 3) uncomment only one exec function in the code, according to the type engine of the table you chose to dump as a test 4) replace all the parameters of the uncommented exec with your data (except errormysqldump.txt), then save test.php The above code writes the output generated from the mysqldump command to a file named errormysqldump.txt and its content is displayed on the web. Launch test.php and see what is displayed on the browser. Regards Alessandro Quintiliani
Thomas Pohl - 2017-02-23 14:43:22 - In reply to message 4 from Alessandro Quintiliani
Alessandro,
this test script works perfect and without any error. Thomas
Alessandro Quintiliani - 2017-02-23 15:38:50 - In reply to message 5 from Thomas Pohl
Hello Thomas
Can you retry prependind at mysqldump command of the uncommented exec function inside test.php the absolute path to the directory containing the mysqldump executable file and run test.php again? If you get a full sql file, this means that the path to mysql home directory is not properly configured in the mysql environment variable. If you still get empty sql file, it is probably due to a server inhibition on some commands as to be unsafe. If your shared host is managed by some network vendor (i.e. Aruba) they have access policies set to inhibit any dumping command. Let me know, thanks. Regards Alessandro Quintiliani
Thomas Pohl - 2017-02-23 18:03:14 - In reply to message 6 from Alessandro Quintiliani
like this one?
......XX chat > dumpsql/chat.sql", $output); this works and generate valid sql shared host is from 1and1 - but "adminer" can dump and test.php can dump - i do not think that 1and1 blocked sql-dump
Alessandro Quintiliani - 2017-02-23 18:33:08 - In reply to message 7 from Thomas Pohl
Hello Thomas
I'm sorry, but 1and1, as well as many other web hosting services, do not allow export of database by command line due to security policies; they only allow you to deal with your database using their own web interfaces. Maybe you can contact them and ask if they could allow you to use the command mysqldump under some specific restriction, but I'm quite skeptical about a positive response. Anyway, I'm at your disposal for any problem concerning my packages. Regards Alessandro Quintiliani |
info at phpclasses dot org
.