AIX Open Source

 View Only
  • 1.  Mariadb is now available on AIX Toolbox

    Posted Wed November 06, 2019 06:49 AM

    Originally posted by: sangameshm


    Mariadb is now available on AIX Toolbox.

     

    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.1/mariadb/

    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.2/mariadb/

     

    You can also use YUM to install this package from AIX Toolbox repository.

     

    Thanks,

    Sangamesh



  • 2.  RE: Mariadb is now available on AIX Toolbox

    Posted Thu June 10, 2021 08:20 PM
    Newbie mariadb question: How exactly does one get started using MariaDB on AIX after installing?

    My assumption is that the database daemon needs to be started so that a database can then be created/used.
    So, after installing the mariadb packages, I did the following:

    # ls /opt/freeware/bin/my*
    -rwxr-xr-x 1 root system 4056502 Apr 20 02:15 /opt/freeware/bin/my_print_defaults
    -rwxr-xr-x 1 root system 4594545 Apr 20 02:14 /opt/freeware/bin/myisam_ftdump
    -rwxr-xr-x 1 root system 4772137 Apr 20 02:14 /opt/freeware/bin/myisamchk
    -rwxr-xr-x 1 root system 4560855 Apr 20 02:14 /opt/freeware/bin/myisamlog
    -rwxr-xr-x 1 root system 4629835 Apr 20 02:14 /opt/freeware/bin/myisampack
    -rwxr-xr-x 1 root system 5609946 Apr 20 02:15 /opt/freeware/bin/mysql
    -rwxr-xr-x 1 root system 3294 Apr 20 02:17 /opt/freeware/bin/mysql_find_rows
    -rwxr-xr-x 1 root system 21609 Apr 19 23:49 /opt/freeware/bin/mysql_install_db
    -rwxr-xr-x 1 root system 4075794 Apr 20 02:15 /opt/freeware/bin/mysql_plugin
    -rwxr-xr-x 1 root system 13707 Apr 19 23:49 /opt/freeware/bin/mysql_secure_installation
    -rwxr-xr-x 1 root system 4069970 Apr 20 02:15 /opt/freeware/bin/mysql_tzinfo_to_sql
    -rwxr-xr-x 1 root system 4052972 Apr 20 02:15 /opt/freeware/bin/mysql_waitpid
    -rwxr-xr-x 1 root system 112108 Apr 20 02:17 /opt/freeware/bin/mysqlaccess
    -rwxr-xr-x 1 root system 5152604 Apr 20 02:15 /opt/freeware/bin/mysqladmin
    -rwxr-xr-x 1 root system 5338938 Apr 20 02:15 /opt/freeware/bin/mysqlbinlog
    -rwxr-xr-x 1 root system 4815538 Apr 20 02:14 /opt/freeware/bin/mysqlcheck
    -rwxr-xr-x 1 root system 30730 Apr 19 23:49 /opt/freeware/bin/mysqld_safe
    -rwxr-xr-x 1 root system 4960508 Apr 20 02:14 /opt/freeware/bin/mysqldump
    -rwxr-xr-x 1 root system 4807288 Apr 20 02:15 /opt/freeware/bin/mysqlimport
    -rwxr-xr-x 1 root system 4796928 Apr 20 02:15 /opt/freeware/bin/mysqlshow
    -rwxr-xr-x 1 root system 4842101 Apr 20 02:15 /opt/freeware/bin/mysqlslap

    The only one of these commands that looks like it's intended to start mysql is mysqld_safe:

    # /opt/freeware/bin/mysqld_safe
    210610 18:30:57 mysqld_safe Logging to '/opt/freeware/var/log/mysql/mysqld.log'.
    210610 18:30:57 mysqld_safe Starting mysqld daemon with databases from /opt/freeware/var/lib/mysql/data

    But there was no daemon running. Checking the log:

    # cat /opt/freeware/var/log/mysql/mysqld.log
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 128663552 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 96485376 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 72351744 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 54263808 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 40697856 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 30523392 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 22880256 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 1998848 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 1499136 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 1105920 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 811008 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Out of memory (Needed 524280 bytes)
    2021-06-10 18:30:57 0 [ERROR] mysqld: Aria engine: log initialization failed
    2021-06-10 18:30:57 0 [ERROR] Plugin 'Aria' init function returned error.
    2021-06-10 18:30:57 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
    2021-06-10 18:30:57 0 [Note] InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created!
    2021-06-10 18:30:57 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-06-10 18:30:57 0 [Note] InnoDB: Uses event mutexes
    2021-06-10 18:30:57 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-06-10 18:30:57 0 [Note] InnoDB: Number of pools: 1
    2021-06-10 18:30:57 0 [Note] InnoDB: Using generic crc32 instructions
    2021-06-10 18:30:57 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
    2021-06-10 18:30:57 0 [Note] InnoDB: Completed initialization of buffer pool
    2021-06-10 18:30:57 0 [Note] InnoDB: Setting file './ibdata1' size to 12 MB. Physically writing the file full; Please wait ...
    2021-06-10 18:30:57 0 [Note] InnoDB: File './ibdata1' size is now 12 MB.
    2021-06-10 18:30:57 0 [Note] InnoDB: Setting log file ./ib_logfile101 size to 50331648 bytes
    2021-06-10 18:30:57 0 [Note] InnoDB: Setting log file ./ib_logfile1 size to 50331648 bytes
    2021-06-10 18:30:57 0 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
    2021-06-10 18:30:57 0 [Note] InnoDB: New log files created, LSN=11451
    2021-06-10 18:30:57 0 [Note] InnoDB: Doublewrite buffer not found: creating new
    2021-06-10 18:30:57 0 [Note] InnoDB: Doublewrite buffer created
    2021-06-10 18:30:57 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
    2021-06-10 18:30:57 0 [Note] InnoDB: Creating foreign key constraint system tables.
    2021-06-10 18:30:57 0 [Note] InnoDB: Creating tablespace and datafile system tables.
    2021-06-10 18:30:57 0 [Note] InnoDB: Creating sys_virtual system tables.
    2021-06-10 18:30:57 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    2021-06-10 18:30:57 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    2021-06-10 18:30:57 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
    2021-06-10 18:30:58 0x1 InnoDB: Assertion failure in file /home/buildusr/rpmbuild/BUILD/mariadb-10.4.18/storage/innobase/os/os0thread.cc line 140
    InnoDB: Failing assertion: ret == 0
    InnoDB: We intentionally generate a memory trap.
    InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
    InnoDB: If you get repeated assertion failures or crashes, even
    InnoDB: immediately after the mysqld startup, there may be
    InnoDB: corruption in the InnoDB tablespace. Please refer to
    InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
    InnoDB: about forcing recovery.

    Based on what I found at https://jira.mariadb.org/browse/MDEV-583 (namely, "Removing /var/lib/mysql/aria* allowed MariaDB to start again"),
    I removed /opt/freeware/var/lib/mysql/aria* and tried again. This time, the mysqld.log shows:

    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 128663552 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 96485376 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 72351744 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 54263808 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 40697856 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 30523392 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 22880256 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 1998848 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 1499136 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 1105920 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 811008 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Out of memory (Needed 524280 bytes)
    2021-06-10 19:03:04 0 [ERROR] mysqld: Aria engine: log initialization failed
    2021-06-10 19:03:04 0 [ERROR] Plugin 'Aria' init function returned error.
    2021-06-10 19:03:04 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
    2021-06-10 19:03:04 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-06-10 19:03:04 0 [Note] InnoDB: Uses event mutexes
    2021-06-10 19:03:04 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-06-10 19:03:04 0 [Note] InnoDB: Number of pools: 1
    2021-06-10 19:03:04 0 [Note] InnoDB: Using generic crc32 instructions
    2021-06-10 19:03:04 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
    2021-06-10 19:03:04 0 [Note] InnoDB: Completed initialization of buffer pool
    2021-06-10 19:03:04 0 [Warning] InnoDB: Retry attempts for reading partial data failed.
    2021-06-10 19:03:04 0 [ERROR] InnoDB: Tried to read 1048576 bytes at offset 1048576, but was only able to read 0
    2021-06-10 19:03:04 0 [ERROR] InnoDB: Operating system error number 14 in a file operation.
    2021-06-10 19:03:04 0 [ERROR] InnoDB: Error number 14 means 'Bad address'
    2021-06-10 19:03:04 0 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
    2021-06-10 19:03:04 0 [ERROR] InnoDB: File (unknown): 'read' returned OS error 214. Cannot continue operation

    Clearly I'm missing something, though I'm not sure what (for example, I suspect I need some updates to /etc/security/limits for the mysql user to
    eliminate the "out of memory" errors, but I didn't see anything documenting what those limits should be).

    Any ideas?

    ------------------------------
    Erich Wolz
    ------------------------------



  • 3.  RE: Mariadb is now available on AIX Toolbox

    Posted Mon June 14, 2021 03:30 AM
    Please set 'ulimit -d unlimited' and try.

    ------------------------------
    RESHMA KUMAR
    ------------------------------



  • 4.  RE: Mariadb is now available on AIX Toolbox

    Posted Mon June 14, 2021 07:24 PM
    Edited by Erich Wolz Mon June 14, 2021 07:26 PM

    Setting ulimit -d unlimited appears to have gotten rid of the out-of-memory messages:

    2021-06-14 18:10:16 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-06-14 18:10:16 0 [Note] InnoDB: Uses event mutexes
    2021-06-14 18:10:16 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-06-14 18:10:16 0 [Note] InnoDB: Number of pools: 1
    2021-06-14 18:10:16 0 [Note] InnoDB: Using generic crc32 instructions
    2021-06-14 18:10:16 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
    2021-06-14 18:10:16 0 [Note] InnoDB: Completed initialization of buffer pool
    2021-06-14 18:10:16 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=14601
    2021-06-14 18:10:16 0 [Note] InnoDB: Starting final batch to recover 13 pages from redo log.
    2021-06-14 18:10:17 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
    2021-06-14 18:10:17 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
    2021-06-14 18:10:17 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    2021-06-14 18:10:17 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    2021-06-14 18:10:17 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
    2021-06-14 18:10:17 0 [Note] InnoDB: Waiting for purge to start
    2021-06-14 18:10:17 0 [Note] InnoDB: 10.4.18 started; log sequence number 46271; transaction id 8
    2021-06-14 18:10:17 0 [Note] InnoDB: Loading buffer pool(s) from /opt/freeware/var/lib/mysql/data/ib_buffer_pool
    2021-06-14 18:10:17 0 [Note] InnoDB: Cannot open '/opt/freeware/var/lib/mysql/data/ib_buffer_pool' for reading: No such file or directory
    2021-06-14 18:10:17 0 [Note] Plugin 'FEEDBACK' is disabled.
    2021-06-14 18:10:17 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
    2021-06-14 18:10:17 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
    2021-06-14 18:10:17 0 [Note] Server socket created on IP: '::'.
    2021-06-14 18:10:17 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
    2021-06-14 18:10:17 0 [ERROR] Aborting

    As I have not yet done anything to define any databases or plugins (which I probably can't do until the database manager is up and running anyway), it doesn't surprise me that there are as yet no plugin tables or privilege tables.  Not sure why that would cause an abort however :-(

    Also, curious about the "file not found" message, as the file does exist:

    # ls -al /opt/freeware/var/lib/mysql/data/ib_buffer_pool
    -rw-r----- 1 mysql mysql 864 Jun 14 18:10 /opt/freeware/var/lib/mysql/data/ib_buffer_pool



  • 5.  RE: Mariadb is now available on AIX Toolbox
    Best Answer

    Posted Fri June 18, 2021 07:19 PM

    Looks like I get to answer my own question.  I found (and followed the steps at) https://powerwire.eu/hello-maria, after which I was able to run mysqld_safe:

    2021-06-18 16:33:19 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2021-06-18 16:33:19 0 [Note] InnoDB: Uses event mutexes
    2021-06-18 16:33:19 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2021-06-18 16:33:19 0 [Note] InnoDB: Number of pools: 1
    2021-06-18 16:33:19 0 [Note] InnoDB: Using generic crc32 instructions
    2021-06-18 16:33:19 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
    2021-06-18 16:33:19 0 [Note] InnoDB: Completed initialization of buffer pool
    2021-06-18 16:33:20 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
    2021-06-18 16:33:20 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    2021-06-18 16:33:20 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    2021-06-18 16:33:20 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
    2021-06-18 16:33:20 0 [Note] InnoDB: Waiting for purge to start
    2021-06-18 16:33:20 0 [Note] InnoDB: Waiting for purge to start
    2021-06-18 16:33:20 0 [Note] InnoDB: Waiting for purge to start
    2021-06-18 16:33:20 0 [Note] InnoDB: 10.4.18 started; log sequence number 60976; transaction id 20
    2021-06-18 16:33:20 0 [Note] InnoDB: Loading buffer pool(s) from /opt/freeware/var/lib/mysql/data/ib_buffer_pool
    2021-06-18 16:33:20 0 [Note] Plugin 'FEEDBACK' is disabled.
    2021-06-18 16:33:20 0 [Note] InnoDB: Buffer pool(s) load completed at 210618 16:33:20
    2021-06-18 16:33:20 0 [Note] Server socket created on IP: '::'.
    2021-06-18 16:33:21 0 [Note] Reading of all Master_info entries succeeded
    2021-06-18 16:33:21 0 [Note] Added new Master_info '' to hash table
    2021-06-18 16:33:21 0 [Note] /opt/freeware/libexec/mysqld: ready for connections.
    Version: '10.4.18-MariaDB' socket: '/opt/freeware/var/lib/mysql/mysql.sock' port: 3306 Source distribution



    ------------------------------
    Erich Wolz
    ------------------------------