在s390上构建MariaDB

时间:2019-03-05 17:18:45

标签: linux mariadb mariadb-connector-c

我正在按照以下说明在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

任何建议将不胜感激。

1 个答案:

答案 0 :(得分:0)

解决方案非常简单。
在该s390上先前安装了mysql / mariadb rpm。我卸载了mariadb RPM,但是离开了mysql。
看来当我编译mariadb时,它覆盖了mysql的安装并生成了错误。
我卸载了所有内容,再次重新编译,现在可以正常工作了。