Discover Centmin Mod today
Register Now

MariaDB Bash Errors Related to Mysql

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by skringjer, Apr 17, 2021.

Tags:
  1. skringjer

    skringjer Premium Member Premium Member

    166
    19
    18
    Apr 21, 2019
    Ratings:
    +34
    Local Time:
    1:25 AM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit ?
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.19.1
    • PHP Version Installed: 7.4
    • MariaDB MySQL Version Installed: 10.3.28
    • When was last time updated Centmin Mod code base ? : iAuto cron updates
    • Persistent Config:
      Code (Text):
      LETSENCRYPT_DETECT='y'
      

    Whenever i login to SSh i have all these weird outputs is this normal?

    Code:
    -bash: [client]: command not found
    -bash: default-character-set=utf8: command not found
    -bash: [mysql]: command not found
    -bash: max_allowed_packet: command not found
    -bash: [mysqld]: command not found
    -bash: local-infile=0: command not found
    -bash: character-set-server=utf8: command not found
    -bash: back_log: command not found
    -bash: max_connections: command not found
    -bash: key_buffer_size: command not found
    -bash: myisam_sort_buffer_size: command not found
    -bash: myisam_max_sort_file_size: command not found
    -bash: join_buffer_size: command not found
    -bash: read_buffer_size: command not found
    -bash: sort_buffer_size: command not found
    -bash: table_definition_cache: command not found
    -bash: table_open_cache: command not found
    -bash: thread_cache_size: command not found
    -bash: wait_timeout: command not found
    -bash: connect_timeout: command not found
    -bash: tmp_table_size: command not found
    -bash: max_heap_table_size: command not found
    -bash: max_allowed_packet: command not found
    -bash: max_length_for_sort_data: command not found
    -bash: net_buffer_length: command not found
    -bash: max_connect_errors: command not found
    -bash: concurrent_insert: command not found
    -bash: read_rnd_buffer_size: command not found
    -bash: bulk_insert_buffer_size: command not found
    -bash: query_cache_limit: command not found
    -bash: query_cache_size: command not found
    -bash: query_cache_type: command not found
    -bash: query_cache_min_res_unit: command not found
    -bash: query_prealloc_size: command not found
    -bash: query_alloc_block_size: command not found
    -bash: transaction_alloc_block_size: command not found
    -bash: transaction_prealloc_size: command not found
    -bash: default-storage-engine: command not found
    -bash: log-error=/var/log/mysqld.log: No such file or directory
    -bash: innodb_purge_threads: command not found
    -bash: innodb_file_per_table: command not found
    -bash: innodb_open_files: command not found
    -bash: ibdata1:10M:autoextend: command not found
    -bash: innodb_buffer_pool_size: command not found
    -bash: innodb_log_files_in_group: command not found
    -bash: innodb_log_file_size: command not found
    -bash: innodb_log_buffer_size: command not found
    -bash: innodb_flush_log_at_trx_commit: command not found
    -bash: innodb_thread_concurrency: command not found
    -bash: innodb_flush_method: command not found
    -bash: innodb_io_capacity: command not found
    -bash: innodb_io_capacity_max: command not found
    -bash: innodb_read_io_threads: command not found
    -bash: innodb_write_io_threads: command not found
    -bash: innodb_flush_neighbors: command not found
    -bash: [mariadb]: command not found
    -bash: thread-handling: command not found
    -bash: thread-pool-size=: command not found
    -bash: thread_pool_oversubscribe: command not found
    -bash: extra-port=3307: command not found
    -bash: extra-max-connections=1: command not found
    -bash: userstat: command not found
    -bash: key_cache_segments: command not found
    -bash: aria_group_commit: command not found
    -bash: aria_group_commit_interval: command not found
    -bash: aria_log_file_size: command not found
    -bash: aria_log_purge_type: command not found
    -bash: aria_pagecache_buffer_size: command not found
    -bash: aria_sort_buffer_size: command not found
    -bash: [mariadb-5.5]: command not found
    -bash: innodb_file_per_table: command not found
    -bash: innodb_read_ahead: command not found
    -bash: innodb_adaptive_flushing_method: command not found
    -bash: innodb_flush_neighbor_pages: command not found
    -bash: innodb_stats_update_need_lock: command not found
    -bash: innodb_log_block_size: command not found
    -bash: log_slow_filter: command not found
    -bash: [mysqld_safe]: command not found
    -bash: open-files-limit: command not found
    -bash: [mysqldump]: command not found
    -bash: quick: command not found
    -bash: max_allowed_packet: command not found
    -bash: [myisamchk]: command not found
    -bash: key_buffer: command not found
    -bash: sort_buffer: command not found
    -bash: read_buffer: command not found
    -bash: write_buffer: command not found
    -bash: [mysqlhotcopy]: command not found
    -bash: interactive-timeout: command not found
    -bash: [mariadb-10.0]: command not found
    -bash: innodb_file_per_table: command not found
    -bash: log_slow_filter: command not found
    -bash: [mariadb-10.3]: command not found
    -bash: innodb_default_row_format: command not found
    -bash: innodb_file_per_table: command not found
    -bash: log_slow_filter: command not found


     
  2. eva2000

    eva2000 Administrator Staff Member

    46,862
    10,629
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,498
    Local Time:
    6:25 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    the variables are mysql variables from /etc/my.cnf - no idea why it would be trying to run them as a command

    are you logging in as root user or a sudo user ?

    try logging in as root user and do a centminmod 123.09beta01 update via command = cmupdate and then run centmin.sh menu once and exit to sync all updates.
     
  3. skringjer

    skringjer Premium Member Premium Member

    166
    19
    18
    Apr 21, 2019
    Ratings:
    +34
    Local Time:
    1:25 AM
    I was logging in as a root user, i have performed cmupdate and then run centmin.sh but again the same issue each time i open the ssh client window it outputs these variables. even rebooted the server

    Here is the content of my.cnf

    Code:
    [client]
    default-character-set=utf8
    socket=/var/lib/mysql/mysql.sock
    
    [mysql]
    max_allowed_packet = 1024M
    
    [mysqld]
    ignore_db_dirs=cmsetiofiotest
    local-infile=0
    ignore_db_dirs=lost+found
    character-set-server=utf8
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    
    #bind-address=127.0.0.1
    # optimized my.cnf for MariaDB 5.5.x
    # by eva2000
    # centminmod.com
    
    tmpdir=/home/mysqltmp
    
    innodb=ON
    #skip-federated
    ##skip-pbxt
    ##skip-pbxt_statistics
    #skip-archive
    #skip-name-resolve
    #old_passwords
    back_log = 2500
    max_connections = 2500
    key_buffer_size = 768M
    myisam_sort_buffer_size = 768M
    myisam_max_sort_file_size = 8192M
    join_buffer_size = 2M
    read_buffer_size = 2M
    sort_buffer_size = 2M
    table_definition_cache = 20240
    table_open_cache = 20240
    thread_cache_size = 768
    wait_timeout = 14400
    connect_timeout = 10
    tmp_table_size = 2048M
    max_heap_table_size = 2048M
    max_allowed_packet = 1024M
    #max_seeks_for_key = 4294967295
    #group_concat_max_len = 1024
    max_length_for_sort_data = 1024
    net_buffer_length = 16384
    max_connect_errors = 100000
    concurrent_insert = 2
    read_rnd_buffer_size = 512K
    bulk_insert_buffer_size = 16M
    # query_cache boost for MariaDB >10.1.2+
    # https://community.centminmod.com/posts/30811/
    query_cache_limit = 0
    query_cache_size = 0
    query_cache_type = 0
    query_cache_min_res_unit = 2K
    query_prealloc_size = 262144
    query_alloc_block_size = 65536
    transaction_alloc_block_size = 8192
    transaction_prealloc_size = 4096
    default-storage-engine = InnoDB
    
    log_warnings=1
    slow_query_log=0
    long_query_time=1
    slow_query_log_file=/var/lib/mysql/slowq.log
    #log-error=/var/log/mysqld.log
    
    # innodb settings
    innodb_purge_threads = 4
    innodb_file_per_table = 1
    innodb_open_files = 20000
    innodb_data_file_path= ibdata1:10M:autoextend
    innodb_buffer_pool_size = 12G
    
    ## https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-system-variables/#innodb_buffer_pool_instances
    innodb_buffer_pool_instances=8
    
    innodb_log_files_in_group = 2
    innodb_log_file_size = 768M
    innodb_log_buffer_size = 64M
    innodb_flush_log_at_trx_commit = 2
    innodb_thread_concurrency = 20
    innodb_lock_wait_timeout=50
    innodb_flush_method = O_DIRECT
    
    # 200 * # DISKS
    innodb_io_capacity = 1100
    innodb_io_capacity_max = 1833
    innodb_read_io_threads = 4
    innodb_write_io_threads = 4
    innodb_flush_neighbors = 0
    
    # mariadb settings
    [mariadb]
    thread-handling = pool-of-threads
    thread-pool-size= 8
    thread_pool_oversubscribe = 3
    #mysql --port=3307 --protocol=tcp
    extra-port=3307
    extra-max-connections=1
    
    userstat = 0
    key_cache_segments = 1
    aria_group_commit = none
    aria_group_commit_interval = 0
    aria_log_file_size = 1024M
    aria_log_purge_type = immediate
    aria_pagecache_buffer_size = 1024M
    aria_sort_buffer_size = 256M
    
    [mariadb-5.5]
    innodb_file_per_table = 1
    
    #ignore_db_dirs=
    query_cache_strip_comments=0
    
    innodb_read_ahead = linear
    innodb_adaptive_flushing_method = estimate
    innodb_flush_neighbor_pages = 1
    innodb_stats_update_need_lock = 0
    innodb_log_block_size = 512
    
    log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
    
    [mysqld_safe]
    socket=/var/lib/mysql/mysql.sock
    #log-error=/var/log/mysqld.log
    #nice = -5
    open-files-limit = 8192
    
    [mysqldump]
    quick
    max_allowed_packet = 1024M
    
    [myisamchk]
    tmpdir=/home/mysqltmp
    key_buffer = 1024M
    sort_buffer = 256M
    read_buffer = 256M
    write_buffer = 256M
    
    [mysqlhotcopy]
    interactive-timeout
    
    [mariadb-10.0]
    innodb_file_per_table = 1
    
    # 2 variables needed to switch from XtraDB to InnoDB plugins
    #plugin-load=ha_innodb
    #ignore_builtin_innodb
    
    ## MariaDB 10 only save and restore buffer pool pages
    ## warm up InnoDB buffer pool on server restarts
    #innodb_buffer_pool_dump_at_shutdown=1
    #innodb_buffer_pool_load_at_startup=1
    innodb_buffer_pool_populate=0
    ## Disabled settings
    performance_schema=OFF
    innodb_stats_on_metadata=OFF
    innodb_sort_buffer_size=2M
    innodb_online_alter_log_max_size=128M
    query_cache_strip_comments=0
    log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
    
    [mariadb-10.3]
    #innodb_file_format = Barracuda
    innodb_default_row_format = dynamic
    innodb_file_per_table = 1
    
    ## wsrep specific
    # wsrep_on=OFF
    # wsrep_provider
    # wsrep_cluster_address
    # binlog_format=ROW
    # default_storage_engine=InnoDB
    # innodb_autoinc_lock_mode=2
    # innodb_doublewrite=1
    # query_cache_size=0
    
    # 2 variables needed to switch from XtraDB to InnoDB plugins
    #plugin-load=ha_innodb
    #ignore_builtin_innodb
    
    ## MariaDB 10 only save and restore buffer pool pages
    ## warm up InnoDB buffer pool on server restarts
    innodb_buffer_pool_dump_at_shutdown=1
    innodb_buffer_pool_load_at_startup=1
    ## Disabled settings
    performance_schema=OFF
    innodb_stats_on_metadata=OFF
    innodb_sort_buffer_size=2M
    innodb_online_alter_log_max_size=128M
    query_cache_strip_comments=0
    log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
    
    # Defragmenting unused space on InnoDB tablespace
    innodb_defragment=1
    innodb_defragment_n_pages=7
    innodb_defragment_stats_accuracy=0
    innodb_defragment_fill_factor_n_recs=20
    innodb_defragment_fill_factor=0.9
    innodb_defragment_frequency=40
    
    # page compression
    # 10.1+ https://mariadb.com/kb/en/mariadb/compression/
    #innodb_compression_algorithm=zlib
    #innodb_use_fallocate=0
    #innodb_use_mtflush=0
    #innodb_mtflush_threads=4
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    46,862
    10,629
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,498
    Local Time:
    6:25 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Yeah strange there is nothing in Centmin Mod that would make an ssh login parse and read the /etc/my.cnf and execute each option in that file like a command AFAIK.

    what's contents of your /root/.bashrc file you can use cat to output that contents and copy and paste and wrap in CODE or CODEB tags so see what is being executed if anything at ssh login time
    Code (Text):
    cat /root/.bashrc
     
  5. skringjer

    skringjer Premium Member Premium Member

    166
    19
    18
    Apr 21, 2019
    Ratings:
    +34
    Local Time:
    1:25 AM
    Here is the output

    Code:
    # .bashrc
    
    # User specific aliases and functions
    
    alias rm='rm -i'
    alias cp='cp -i'
    alias mv='mv -i'
    
    # Source global definitions
    if [ -f /etc/bashrc ]; then
            . /etc/bashrc
    fi
    alias wget='/usr/local/bin/wget'
    crontab () { [[ $@ =~ -[iel]*r ]] && echo r not allowed || command crontab "$@" ;}
    alias pwdh='echo -n "$HOSTNAME"; echo " $PWD"'
    alias qrencode='qrencode -t ansiutf8'
    alias top2="glances"
    HISTTIMEFORMAT="[%d.%m.%y] %T   "
    export HISTSIZE=10000
    export HISTTIMEFORMAT
    export PS1="[\A][\u@\H \W]\\$ "
    export PATH="$PATH:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"
    alias postfixlog='pflogsumm -d today --verbose_msg_detail /var/log/maillog'
    . "/root/.acme.sh/acme.sh.env"
    export CCACHE_DIR="/home/.ccache"
    export CC="ccache gcc"
    export CXX="ccache g++"
    export CCACHE_CPP2=yes
    alias fpm-errlog='tail -10 /var/log/php-fpm/www-error.log'
    alias fpm-phperrlog='tail -10 /var/log/php-fpm/www-php.error.log'
    alias fpm-slowlog='tail -10 /var/log/php-fpm/www-slow.log'
    alias cmdir='pushd /usr/local/src/centminmod'
     
  6. eva2000

    eva2000 Administrator Staff Member

    46,862
    10,629
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,498
    Local Time:
    6:25 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    looks normal in .bashrc too

    what SSH client/software are you using to login via ? tried a different SSH client? maybe you added additional commands to run on SSH login via SSH client ? I know my SecureCRT SSH client can do that, I can add commands to automatically run on initial SSH login
     
  7. skringjer

    skringjer Premium Member Premium Member

    166
    19
    18
    Apr 21, 2019
    Ratings:
    +34
    Local Time:
    1:25 AM
    Checked with SecureCRT same thing lol, but its okay i guess its not doing something bad so i will leave it.