0

I'm trying to back up a mediawiki database prior to moving the instance to a new server, but I'm getting stuck on mysqldump, which has never given me trouble like this before. I'm clearly doing something wrong but I can't for the life of me figure out what.

# mysqldump -u admin wikidb
--MariaDB dump 10.17  Distrib 10.4.13-0MariaDB, for Linux (x86_64)
--
-- Host: localhost   Database: wikidb
-- -------------------------------------------------------------------
-- Server version      5.1.73

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40101 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40101 SET TIME_ZONE='+00:00' */;
/*!40101 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO */;
/*!40101 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL+NOTES=0 */;
# mysqldump -u admin --databases wikidb
--MariaDB dump 10.17  Distrib 10.4.13-0MariaDB, for Linux (x86_64)
--
-- Host: localhost   Database: wikidb
-- -------------------------------------------------------------------
-- Server version      5.1.73

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40101 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40101 SET TIME_ZONE='+00:00' */;
/*!40101 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO */;
/*!40101 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL+NOTES=0 */;

--
-- Current Database: `wikidb`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `wikidb` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `wikidb`;
# mysqldump -u admin --databases wikidb --tables user
--MariaDB dump 10.17  Distrib 10.4.13-0MariaDB, for Linux (x86_64)
--
-- Host: localhost   Database: wikidb
-- -------------------------------------------------------------------
-- Server version      5.1.73

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40101 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40101 SET TIME_ZONE='+00:00' */;
/*!40101 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO */;
/*!40101 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL+NOTES=0 */;
# mysql -u admin wikidb
MySQL [wikidb]> select count(1) from user;
+----------+
| count(1) |
+----------+
|       86 |
+----------+
1 row in set (0.056 sec)

MySQL [wikidb]> show tables;
+--------------------+
| Tables_in_wikidb   |
+--------------------+
| archive            |
| category           |
:
| valid_tag          |
| watchlist          |
+--------------------+
54 rows in set (0.000 sec)

MySQL [wikidb]> show grants;
+----------------------------------------------------+
| Grants for admin@localhost                         |
+----------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' |
+----------------------------------------------------+
1 ROW IN SET (0.000 SEC)

MySQL [wikidb]>

I've tried this both as our "admin" account, root, and the "wikikuser" account and get the same thing each time. I've been completely unable to get the dump to include table structure or data. What am I missing?

----Edited to add results of mysqlcheck-----

[snip]
Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
all-databases                     FALSE
all-in-1                          FALSE
auto-repair                       FALSE
character-sets-dir                (No default value)
compress                          FALSE
databases                         FALSE
debug-check                       FALSE
debug-info                        FALSE
default-character-set             (No default value)
default-auth                      (No default value)
enable-cleartext-plugin           FALSE
fast                              FALSE
fix-db-names                      FALSE
fix-table-names                   FALSE
force                             FALSE
extended                          FALSE
flush                             FALSE
host                              (No default value)
write-binlog                      TRUE
persistent                        FALSE
plugin-dir                        (No default value)
port                              0
quick                             FALSE
silent                            FALSE
skip-database                     (No default value)
socket                            (No default value)
ssl                               FALSE
ssl-ca                            (No default value)
ssl-capath                        (No default value)
ssl-cert                          (No default value)
ssl-cipher                        (No default value)
ssl-key                           (No default value)
ssl-crl                           (No default value)
ssl-crlpath                       (No default value)
tls-version                       (No default value)
ssl-verify-server-cert            FALSE
use-frm                           FALSE
user                              (No default value)
process-views                     NO
process-tables                    TRUE
4
  • run a mysqlcheck and check the error logs. – nbk Dec 14 '20 at 12:18
  • Do you have [mysqldump] in the config file? If so, what is in it? – Rick James Dec 14 '20 at 17:43
  • [mysqldump] is an empty section in /etc/my.cnf.d/mysql-clients.cnf. – Bret Dec 15 '20 at 10:57
  • Results of mysqlcheck have been added above. It produced nothing in either /var/log/messages or /var/log/mysqld.log. – Bret Dec 15 '20 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.