【问题标题】:Building MariaDB on s390在 s390 上构建 MariaDB
【发布时间】:2019-07-27 05:50:21
【问题描述】:

我正在尝试按照这些说明在 s390 (z/Linux) 上构建 mariaDB mariaDB Instructions。抱歉,我不是 DBA 或 SA。

但我卡在了“3.7 创建数据库并将测试数据填充到数据库”这一步中

sudo scripts/mysql_install_db --user=mysql

这是我得到的错误:

root@tdpvld01:/usr/local/mysql> sudo scripts/mysql_install_db --user=mysql
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
2019-03-05  9:17:57 6 [ERROR] Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 50552, now running 100312. Please use mysql_upgrade to fix this error
2019-03-05  9:17:57 6 [ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT'), found type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALU
ERROR: 1136  Column count doesn't match value count at row 1
2019-03-05  9:17:57 0 [ERROR] Aborting


Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:

    shell> scripts/mysql_install_db --defaults-file=~/.my.cnf

You can also try to start the mysqld daemon with:

    shell> ./bin/mysqld --skip-grant-tables --general-log &

and use the command line tool ./bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> ./bin/mysql -u root mysql
    mysql> show tables;

Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in /var/lib/mysql that may be helpful.

The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss

Please check all of the above before submitting a bug report
at http://mariadb.org/jira

按照一些论坛的建议,我尝试运行 mysql_upgrade。但是得到了这个错误:

root@tdpvld01:/usr/local/mysql/bin> ./mysql_upgrade
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
FATAL ERROR: Upgrade failed

任何建议将不胜感激。

【问题讨论】:

  • 你没有提到你在 Z 上运行的是哪个 Linux 发行版;但是您可能不需要编译任何东西吗? rpmfind.net/linux/rpm2html/search.php?query=mariadb
  • 抱歉,这是 Red Hat Enterprise Linux Server release 7.3 (Maipo) 我找到的 Red Hat 的最新 RPM 版本是 5.5
  • 也许你在调用mysql_upgrade时需要连接参数(user/pwd/port/...)?

标签: linux mariadb mariadb-connector-c


【解决方案1】:

解决方案相当简单。
该 s390 上有一个以前的 mysql/mariadb rpm 安装。我卸载了 mariadb RPM,但离开了 mysql。
似乎当我编译 mariadb 时,它覆盖了 mysql 安装并产生了该错误。
我卸载了所有东西,再次重新编译,现在它工作正常。

【讨论】:

    猜你喜欢
    • 2019-04-01
    • 2012-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-19
    • 2019-06-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多