[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mariadb does not run



Il 02/05/22 17:43, Larry Martell ha scritto:
mysqld_safe is a shell script - you could try running it with sh -x to
see what it's doing and/or how it fails.

Here's to you:


# bash -x mysqld_safe
+ KILL_MYSQLD=1
+ MYSQLD=
+ niceness=0
+ nowatch=0
+ mysqld_ld_preload=
+ mysqld_ld_library_path=
+ flush_caches=0
+ numa_interleave=0
+ wsrep_on=0
+ dry_run=0
+ defaults_group_suffix=
+ logging=init
+ want_syslog=0
+ syslog_tag=
+ user=mysql
+ group=mysql
+ pid_file=
+ err_log=
+ err_log_base=
+ skip_err_log=0
+ syslog_tag_mysqld=mysqld
+ syslog_tag_mysqld_safe=mysqld_safe
+ trap '' 1 2 3 15
+ umask 007
+ UMASK=0640
++ echo 0640
++ sed -e 's/[^0246]//g'
+ fmode=0640
++ echo 0640
++ cut -c1
+ octalp=0
++ echo 0640
++ wc -c
++ sed -e 's/ //g'
+ fmlen=5
+ '[' x0 '!=' x0 -o x0640 '!=' x0640 -o x5 '!=' x5 ']'
++ cut -c3-4
++ echo 0640
+ fmode=40
+ fmode=640
+ '[' x0640 '!=' x0640 ']'
+ defaults=
+ case "$1" in
+ wsrep_start_position_opt=
++ dirname mysqld_safe
+ MY_PWD=.
++ cd ./..
++ pwd
+ MY_PWD=/
+ test -n '' -a -d ''
+ test -x //bin/mariadbd
+ test -x //libexec/mariadbd
+ test -x //sbin/mariadbd
+ MY_BASEDIR_VERSION=/
+ ledir=//sbin
++ find_in_bin mariadbd-safe-helper
++ test -x //bin/mariadbd-safe-helper
++ echo //bin/mariadbd-safe-helper
+ helper=//bin/mariadbd-safe-helper
++ find_in_bin my_print_defaults
++ test -x //bin/my_print_defaults
++ echo //bin/my_print_defaults
+ print_defaults=//bin/my_print_defaults
+ command -v //bin/mariadbd-safe-helper --help
+ helper_exist=0
+ test -d //data/mysql
+ test -d //var/mysql
+ DATADIR=/var/lib/mysql
+ test -z ''
+ test -r /var/lib/mysql/my.cnf
+ MYSQL_HOME=/
+ export MYSQL_HOME
+ args=
+ SET_USER=2
++ //bin/my_print_defaults --loose-verbose --mysqld
+ parse_arguments
+ test 2 -eq 2
+ SET_USER=0
+ unrecognized_handling=complain
++ //bin/my_print_defaults --loose-verbose mysqld_safe safe_mysqld mariadb_safe mariadbd-safe
+ parse_arguments
+ unrecognized_handling=collect
+ parse_arguments
+ '[' -n '' ']'
+ for dir in lib64/mysql/plugin lib64/plugin lib/mysql/plugin lib/plugin
+ '[' -d //lib64/mysql/plugin ']'
+ for dir in lib64/mysql/plugin lib64/plugin lib/mysql/plugin lib/plugin
+ '[' -d //lib64/plugin ']'
+ for dir in lib64/mysql/plugin lib64/plugin lib/mysql/plugin lib/plugin
+ '[' -d //lib/mysql/plugin ']'
+ plugin_dir=//lib/mysql/plugin
+ break
+ '[' -z //lib/mysql/plugin ']'
+ plugin_dir=//lib/mysql/plugin
+ '[' 0 -eq 1 ']'
+ '[' 0 -eq 1 ']'
+ '[' -n '' -o 0 -eq 0 ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
++ uname -n
+ err_log=/var/lib/mysql/t470.err
+ append_arg_to_args --log-error=/var/lib/mysql/t470.err
++ shell_quote_string --log-error=/var/lib/mysql/t470.err
++ echo --log-error=/var/lib/mysql/t470.err
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+ args=' --log-error=/var/lib/mysql/t470.err'
+ '[' 0 -eq 1 ']'
+ log_notice 'Logging to '\''/var/lib/mysql/t470.err'\''.'
+ log_generic daemon.notice 'Logging to '\''/var/lib/mysql/t470.err'\''.'
+ '[' 0 -eq 1 ']'
+ priority=daemon.notice
+ shift
++ date '+%y%m%d %H:%M:%S'
+ msg='220502 22:36:41 mysqld_safe Logging to '\''/var/lib/mysql/t470.err'\''.' + echo '220502 22:36:41 mysqld_safe Logging to '\''/var/lib/mysql/t470.err'\''.'
220502 22:36:41 mysqld_safe Logging to '/var/lib/mysql/t470.err'.
+ case $logging in
+ logging=file
+ USER_OPTION=
+ test -w / -o root = root
+ test mysql '!=' root -o 0 = 1
+ USER_OPTION=--user=mysql
+ GROUP_OPTION=--group=mysql
+ test -n ''
+ test -n ''
+ safe_mysql_unix_port=/run/mysqld/mysqld.sock
++ dirname /run/mysqld/mysqld.sock
+ mysql_unix_port_dir=/run/mysqld
+ '[' '!' -d /run/mysqld -a 0 -eq 0 ']'
+ test -z ''
+ MYSQLD=mariadbd
+ test '!' -x //sbin/mariadbd
+ test -z ''
++ uname -n
+ pid_file=t470.pid
+ append_arg_to_args --pid-file=t470.pid
++ shell_quote_string --pid-file=t470.pid
++ echo --pid-file=t470.pid
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+ args=' --log-error=/var/lib/mysql/t470.err --pid-file=t470.pid'
+ case "$pid_file" in
+ pid_file=/var/lib/mysql/t470.pid
+ test -n ''
+ test -n ''
+ test 0 -eq 0
+ NOHUP_NICENESS=nohup
+ nohup nice
++ nice
+ normal_niceness=0
++ nohup nice
+ nohup_niceness=0
+ numeric_nice_values=1
+ for val in $normal_niceness $nohup_niceness
+ case "$val" in
+ for val in $normal_niceness $nohup_niceness
+ case "$val" in
+ test 1 -eq 1
++ expr 0 - 0
+ nice_value_diff=0
+ test 1 -eq 0
+ test -n ''
+ test -f /var/lib/mysql/t470.pid
+ true
+ test 0 -eq 1
+ test 0 -eq 1
++ mysqld_ld_preload_text
++ text=
++ '[' -n '' ']'
++ '[' -n '' ']'
++ echo ''
+ cmd=nohup
+ '[' 0 -eq 1 ']'
+ true
+ test 0 -eq 1
+ test 0 -eq 1
+ for i in "$ledir/$MYSQLD" "$defaults_group_suffix" "$defaults" "--basedir=$MY_BASEDIR_VERSION" "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
++ shell_quote_string //sbin/mariadbd
++ echo //sbin/mariadbd
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+ cmd='nohup //sbin/mariadbd'
+ for i in "$ledir/$MYSQLD" "$defaults_group_suffix" "$defaults" "--basedir=$MY_BASEDIR_VERSION" "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
++ shell_quote_string ''
++ echo ''
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+ cmd='nohup //sbin/mariadbd '
+ for i in "$ledir/$MYSQLD" "$defaults_group_suffix" "$defaults" "--basedir=$MY_BASEDIR_VERSION" "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
++ shell_quote_string ''
++ echo ''
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+ cmd='nohup //sbin/mariadbd  '
+ for i in "$ledir/$MYSQLD" "$defaults_group_suffix" "$defaults" "--basedir=$MY_BASEDIR_VERSION" "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
++ shell_quote_string --basedir=/
++ echo --basedir=/
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+ cmd='nohup //sbin/mariadbd   --basedir=/'
+ for i in "$ledir/$MYSQLD" "$defaults_group_suffix" "$defaults" "--basedir=$MY_BASEDIR_VERSION" "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
++ shell_quote_string --datadir=/var/lib/mysql
++ echo --datadir=/var/lib/mysql
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+ cmd='nohup //sbin/mariadbd   --basedir=/ --datadir=/var/lib/mysql'
+ for i in "$ledir/$MYSQLD" "$defaults_group_suffix" "$defaults" "--basedir=$MY_BASEDIR_VERSION" "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
++ shell_quote_string --plugin-dir=//lib/mysql/plugin
++ echo --plugin-dir=//lib/mysql/plugin
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+ cmd='nohup //sbin/mariadbd --basedir=/ --datadir=/var/lib/mysql --plugin-dir=//lib/mysql/plugin' + for i in "$ledir/$MYSQLD" "$defaults_group_suffix" "$defaults" "--basedir=$MY_BASEDIR_VERSION" "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
++ shell_quote_string --user=mysql
++ echo --user=mysql
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+ cmd='nohup //sbin/mariadbd --basedir=/ --datadir=/var/lib/mysql --plugin-dir=//lib/mysql/plugin --user=mysql' + cmd='nohup //sbin/mariadbd --basedir=/ --datadir=/var/lib/mysql --plugin-dir=//lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/t470.err --pid-file=t470.pid'
+ '[' 0 -eq 1 ']'
+ test -n nohup
+ cmd='nohup //sbin/mariadbd --basedir=/ --datadir=/var/lib/mysql --plugin-dir=//lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/t470.err --pid-file=t470.pid < /dev/null'
+ log_notice 'Starting mariadbd daemon with databases from /var/lib/mysql'
+ log_generic daemon.notice 'Starting mariadbd daemon with databases from /var/lib/mysql'
+ '[' 0 -eq 1 ']'
+ priority=daemon.notice
+ shift
++ date '+%y%m%d %H:%M:%S'
+ msg='220502 22:36:41 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql' + echo '220502 22:36:41 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql' 220502 22:36:41 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql
+ case $logging in
+ '[' 0 -eq 0 ']'
+ echo '220502 22:36:41 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql'
+ //bin/mariadbd-safe-helper mysql log /var/lib/mysql/t470.err
+ fast_restart=0
+ max_fast_restarts=5
+ have_sleep=1
+ expr hxB : '.*x'
+ :
+ max_wsrep_restarts=0
+ true
+ rm -f /var/lib/mysql/t470.pid
++ date +%M%S
+ start_time=3641
+ test 0 -eq 1
+ eval_log_error 'nohup //sbin/mariadbd --basedir=/ --datadir=/var/lib/mysql --plugin-dir=//lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/t470.err --pid-file=t470.pid < /dev/null' + local 'cmd=nohup //sbin/mariadbd --basedir=/ --datadir=/var/lib/mysql --plugin-dir=//lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/t470.err --pid-file=t470.pid < /dev/null'
+ case $logging in
+ '[' 0 -eq 0 ']'
++ shell_quote_string //bin/mariadbd-safe-helper
++ echo //bin/mariadbd-safe-helper
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
++ shell_quote_string /var/lib/mysql/t470.err
++ echo /var/lib/mysql/t470.err
++ sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+ cmd='nohup //sbin/mariadbd --basedir=/ --datadir=/var/lib/mysql --plugin-dir=//lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/t470.err --pid-file=t470.pid < /dev/null 2>&1 | //bin/mariadbd-safe-helper mysql log /var/lib/mysql/t470.err'
+ test 0 -eq 1
+ eval 'nohup //sbin/mariadbd --basedir=/ --datadir=/var/lib/mysql --plugin-dir=//lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/t470.err --pid-file=t470.pid < /dev/null 2>&1 | //bin/mariadbd-safe-helper mysql log /var/lib/mysql/t470.err' ++ nohup //sbin/mariadbd --basedir=/ --datadir=/var/lib/mysql --plugin-dir=//lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/t470.err --pid-file=t470.pid
++ //bin/mariadbd-safe-helper mysql log /var/lib/mysql/t470.err
++ date +%M%S
+ end_time=3641
+ test '!' -f /var/lib/mysql/t470.pid
+ break
+ log_notice 'mysqld from pid file /var/lib/mysql/t470.pid ended'
+ log_generic daemon.notice 'mysqld from pid file /var/lib/mysql/t470.pid ended'
+ '[' 0 -eq 1 ']'
+ priority=daemon.notice
+ shift
++ date '+%y%m%d %H:%M:%S'
+ msg='220502 22:36:41 mysqld_safe mysqld from pid file /var/lib/mysql/t470.pid ended' + echo '220502 22:36:41 mysqld_safe mysqld from pid file /var/lib/mysql/t470.pid ended' 220502 22:36:41 mysqld_safe mysqld from pid file /var/lib/mysql/t470.pid ended
+ case $logging in
+ '[' 0 -eq 0 ']'
+ echo '220502 22:36:41 mysqld_safe mysqld from pid file /var/lib/mysql/t470.pid ended'
+ //bin/mariadbd-safe-helper mysql log /var/lib/mysql/t470.err


Seems to me the script is doing what it is supposed to do, but mariadb exits immediately.


Reply to: