Database connection error

Lukasz

Verified User
Joined
Apr 6, 2020
Messages
11
Hi I have a problem with my server.


It seems that there is no place on the server (due to the backups?)

I have few WP installations running on this server - they all show the message about Database connection error?

How should I proceed to not to loose the data?

I initially didn't have the access to the DirectAdmin Panel. It was showing the message saying that my credentials were wrong.
I can login after erasing the ibdata1 file form mysql folder.
Panel works but the data in mysql is somehow wrong as the Wordpress sites dosn't work.

I got the following error:

2020-06-24 17:19:20 139731058038528 [Warning] Aborted connection 275401 to db: 'da_roundcube' user: 'da_roundcube' host: 'localhost' (Got an error reading communication packets)
2020-06-24 19:12:22 139730732472064 [ERROR] mysqld: Disk full (/tmp/#sql_41f7_0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
200624 19:12:22 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.2.6-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=62
max_threads=153
thread_count=8
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467201 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f15880008f8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f1598ac4ec0 thread_stack 0x49000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x2b)[0x555a0436104b]
/usr/local/mysql/bin/mysqld(handle_fatal_signal+0x4d5)[0x555a03df7085]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7f15df05a0c0]
/usr/local/mysql/bin/mysqld(_ZN7handler16ha_write_tmp_rowEPh+0x26)[0x555a03ccf076]
/usr/local/mysql/bin/mysqld(+0x54bb95)[0x555a03cb9b95]
/usr/local/mysql/bin/mysqld(+0x538931)[0x555a03ca6931]
/usr/local/mysql/bin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x17e)[0x555a03caeb0e]
/usr/local/mysql/bin/mysqld(+0x538931)[0x555a03ca6931]
/usr/local/mysql/bin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x17e)[0x555a03caeb0e]
/usr/local/mysql/bin/mysqld(_ZN4JOIN10exec_innerEv+0x993)[0x555a03ccca03]
/usr/local/mysql/bin/mysqld(_ZN4JOIN4execEv+0x3c)[0x555a03cccc2c]
/usr/local/mysql/bin/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x12a)[0x555a03ccbbaa]
/usr/local/mysql/bin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x1d4)[0x555a03ccce44]
/usr/local/mysql/bin/mysqld(+0x506486)[0x555a03c74486]
mysys/stacktrace.c:268(my_print_stacktrace)[0x555a03c7ea83]
/usr/local/mysql/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x29a)[0x555a03c8196a]
/usr/local/mysql/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1c1d)[0x555a03c83bed]
/usr/local/mysql/bin/mysqld(_Z10do_commandP3THD+0x161)[0x555a03c841b1]
/usr/local/mysql/bin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x16f)[0x555a03d3fbbf]
sql/sql_class.h:5610(handler::increment_statistics(unsigned long system_status_var::*) const)[0x555a03d3fce4]
sql/sql_parse.cc:6432(:373)[0x7f15df050494]
sql/sql_connect.cc:1354(do_handle_one_connection(CONNECT*))[0x7f15de70caff]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f1589b5dcf0): SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('category') ORDER BY t.name ASC
Connection ID (thread ID): 275734
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=o2020-06-24 19:12:23 140253427725760 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-06-24 19:12:23 140253427725760 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-06-24 19:12:23 140253427725760 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-06-24 19:12:23 140253427725760 [Warning] InnoDB: 1048576 bytes should have been written. Only 1028096 bytes written. Retrying for the remaining bytes.
2020-06-24 19:12:23 140253427725760 [Warning] InnoDB: Retry attempts for writing partial data failed.
2020-06-24 19:12:23 140253427725760 [ERROR] InnoDB: Write to file ./ibtmp1failed at offset 11534336, 1048576 bytes should have been written, only 1028096 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
2020-06-24 19:12:23 140253427725760 [ERROR] InnoDB: Error number 28 means 'No space left on device'
2020-06-24 19:12:23 140253427725760 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
2020-06-24 19:12:23 140253427725760 [ERROR] InnoDB: Could not set the file size of './ibtmp1'. Probably out of disk space
2020-06-24 19:12:23 140253427725760 [ERROR] InnoDB: Unable to create the shared innodb_temporary
2020-06-24 19:12:23 140253427725760 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-06-24 19:12:29 140253427725760 [Note] InnoDB: Starting shutdown...
2020-06-24 19:12:29 140253427725760 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-06-24 19:12:29 140253427725760 [ERROR] Plugin 'InnoDB' init function returned error.
2020-06-24 19:12:29 140253427725760 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-06-24 19:12:29 140253427725760 [Note] Plugin 'FEEDBACK' is disabled.
2020-06-24 19:12:29 140253427725760 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-06-24 19:12:29 140253427725760 [ERROR] Aborting

200624 19:12:29 mysqld_safe mysqld from pid file /usr/local/mysql/data/mysqld.pid ended
200624 19:13:01 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
2020-06-24 19:13:01 139928879539648 [Note] /usr/local/mysql/bin/mysqld (mysqld 10.2.6-MariaDB) starting as process 21344 ...
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Uses event mutexes
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Compressed tables use zlib 1.2.3
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Using Linux native AIO
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Number of pools: 1
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Using generic crc32 instructions
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Completed initialization of buffer pool
2020-06-24 19:13:01 139928166627072 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Highest supported file format is Barracuda.
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Starting crash recovery from checkpoint LSN=5870664235
2020-06-24 19:13:01 139928879539648 [Note] InnoDB: Starting final batch to recover 4 pages from redo log.
2020-06-24 19:13:02 139928879539648 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-06-24 19:13:02 139928879539648 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-06-24 19:13:02 139928879539648 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-06-24 19:13:02 139928879539648 [Warning] InnoDB: 1048576 bytes should have been written. Only 995328 bytes written. Retrying for the remaining bytes.
2020-06-24 19:2020-06-24 19:13:07 139928879539648 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-06-24 19:13:07 139928879539648 [ERROR] Plugin 'InnoDB' init function returned error.
2020-06-24 19:13:07 139928879539648 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-06-24 19:13:07 139928879539648 [Note] Plugin 'FEEDBACK' is disabled.
2020-06-24 19:13:07 139928879539648 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-06-24 19:13:07 139928879539648 [ERROR] Aborting


my setup:

Debian9

root@server922456:/usr/local/directadmin/custombuild# cat options.conf




#PHP Settings
php1_release=7.3
php1_mode=php-fpm
php2_release=no
php2_mode=php-fpm
php_ini=no
php_timezone=Europe/Warsaw
php_ini_type=production
x_mail_header=yes

#MySQL Settings
mysql=5.6
mariadb=10.0
mysql_inst=mysql
mysql_backup=yes
mysql_backup_gzip=no
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no

#WEB Server Settings
webserver=apache
http_methods=GET:HEAD:POST
litespeed_serialno=trial
modsecurity=no
modsecurity_ruleset=comodo
apache_ver=2.4
apache_mpm=auto
mod_ruid2=no
userdir_access=yes
harden_symlinks_patch=yes
use_hostname_for_alias=no
redirect_host=server922456
redirect_host_https=no

#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_ver=4
squirrelmail=no
roundcube=yes
webapps_inbox_prefix=no

#ClamAV-related Settings
clamav=no
clamav_exim=yes
modsecurity_uploadscan=no
proftpd_uploadscan=no
pureftpd_uploadscan=no
suhosin_php_uploadscan=no

#Mail Settings
exim=yes
eximconf=yes
eximconf_release=4.5
blockcracking=no
easy_spam_fighter=no
spamd=no
sa_update=daily
dovecot=yes
dovecot_conf=yes
pigeonhole=no

#FTP Settings
ftpd=pureftpd

#Statistics Settings
awstats=no
webalizer=yes

#CustomBuild Settings
custombuild=2.0
autover=no
bold=yes
clean=yes
cleanapache=yes
clean_old_tarballs=yes
clean_old_webapps=yes
downloadserver=files24.directadmin.com

#Cronjob Settings
cron=no
cron_frequency=weekly
email=[email protected]
notifications=yes
da_autoupdate=no
updates=no
webapps_updates=yes

#CloudLinux Settings
cloudlinux=no
cloudlinux_beta=no
cagefs=no

#Advanced Settings
autoconf=yes
automake=yes
libtool=yes
curl=yes
new_pcre=no

unit=no
php3_release=no
php4_release=no
php3_mode=php-fpm
php4_mode=php-fpm
secure_php=yes
mail_compress=no
phpmyadmin_public=yes
ssl_configuration=intermediate
custombuild_plugin=yes
root@server922456:/usr/local/directadmin/custombuild#
 
Could you share how? Because if I read this line:
[ERROR] mysqld: Disk full (/tmp/#sql_41f7_0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
it would suggest the error was caused because of lack of diskspace, not a permission issue.

So I'm curious to this fix.
 
Thank you for your answers.

Indeed, it was caused by the lack of disk space. The backups took up too much of it.
The last three backups were not saved at all.


I backed up the mysql folder and did some tests:
After freeing up some space (by deleting the backups) mysql still didn't work. It started working normally again after changing the permissions of the ibdata1 file.

What exactly is ibdata1 ?
 
Thank you for your answers.

Indeed, it was caused by the lack of disk space. The backups took up too much of it.
The last three backups were not saved at all.


I backed up the mysql folder and did some tests:
After freeing up some space (by deleting the backups) mysql still didn't work. It started working normally again after changing the permissions of the ibdata1 file.

What exactly is ibdata1 ?
Thats the tablespace for your innodb databases. (Data and indexes for your innodb tables.). It's kinda stupid to delete that if you don't know what it is...
 
Thank you for the asnwer.

It would be totally stupid to delete it without backup :D

Thats the tablespace for your innodb databases. (Data and indexes for your innodb tables.). It's kinda stupid to delete that if you don't know what it is...
 
Back
Top