SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello folks,
sometimes i forget the fun of reading all the insults, attacks, critics, comments mocking, etc... of users on other users
Anyway, I am banging my head on a wall here, because for the last 2days i have been trying to setup maria/mysql DB on a netbook after i upgraded to slackware current.
I read this post which, i am not sure has the same issue but, no solution is given.
The peculiarity is that I did manage to setup mariaDb on my laptop and desktop in the past few months (although, i remember it was a painstaking job) but nothing seems to work for this netbook.
So, what i have done:
1) of course, follow the tutorials on slackware docs;
- outcome:
Code:
bash-5.1# mysql_install_db
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
2021-04-09 15:04:26 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
2021-04-09 15:04:26 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2021-04-09 15:04:26 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-04-09 15:04:26 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-04-09 15:04:26 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-04-09 15:04:26 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> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
You can also try to start the mysqld daemon with:
shell> /usr/libexec/mysqld --skip-grant-tables --general-log &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/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 https://mariadb.org/jira
bash-5.1#
a- yes, i did try the suggestions on that msg with no avail
b- i tried to check the log in /var/lib/mysql and there is no actual txt format log; 4 files all appear in database encrypted form i.e. aria_log.000001, aria_log_control, ib_logfiles101 and ibdata1
c- it was exactly the same error msg executing mysql_install_db --user=mysql
At this point i knew that it was pointless to try further but i did it anyway
2) /etc/rc.d/rc.mysqld start
Code:
bash-5.1# /etc/rc.d/rc.mysqld start
bash-5.1# 210409 15:35:25 mysqld_safe Logging to '/var/lib/mysql/localhost.home.err'.
210409 15:35:26 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql
/usr/bin/mysqld_safe_helper: Can't create/write to file '/var/lib/mysql/localhost.home.err' (Errcode: 13 "Permission denied")
(not sure what "Permission Denied" meant; I was superuser and it did create 4 log files so, I dont understand how it was 'denied' to create another)
3) then tried to run mysql_secure_installation anyway
Code:
bash-5.1# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
Enter current password for root (enter for none):
(no matter whether I left it blank or inputted 'mambo-jumbo')
4) i thought, ok let's give it what it wants, a password
Code:
bash-5.1# mysqladmin -u root password '*********'
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysql/mysql.sock' exists!
bash-5.1#
And then i remembered that I had the same issue with the missing (damn) mysql.sock file that wouldn't create on the desktop and laptop too.
I remember that i tried several tutorials before finding the one that worked 2mnths ago but can't remember how or where i did it and i can't find it again.
when you have created the initial databases you haven't actually followed the tutorial you linked: those instructions say to create it with this command
Code:
mysql_install_db --user=mysql
while you just used
Code:
mysql_install_db
and that's the reason why you later have
Code:
/usr/bin/mysqld_safe_helper: Can't create/write to file '/var/lib/mysql/localhost.home.err' (Errcode: 13 "Permission denied")
because the directory and the files are owned by root and not the mysql user.
this is explicited in the tutorial you linked
Quote:
Create the needed database(s) and set their permissions properly
As root, run:
Code:
root@darkstar# mysql_install_db --user=mysql
The user specified by –user will own the database files, so it's important to set the right user here, otherwise MySQL won't be able to write to your databases. By default MySQL in Slackware runs as user “mysql”, so that is the safe choice.
just delete the directory and relaunch the correct command
when you have created the initial databases you haven't actually followed the tutorial you linked: those instructions say to create it with this command
Code:
mysql_install_db --user=mysql
while you just used
Code:
mysql_install_db
and that's the reason why you later have
Code:
/usr/bin/mysqld_safe_helper: Can't create/write to file '/var/lib/mysql/localhost.home.err' (Errcode: 13 "Permission denied")
because the directory and the files are owned by root and not the mysql user.
this is explicited in the tutorial you linked
just delete the directory and relaunch the correct command
hi Ponce,
thank you for your quick reply.
In point 'c' of the opening thread, i did specify this:
Quote:
c- it was exactly the same error msg executing mysql_install_db --user=mysql
Perhaps, what i forgot to mention is that YES i repeated the process several times, every time deleting the /var/lib/mysql and /var/run/mysql directories.
And below is the error msg for the 9th or 10th attempt:
Code:
bash-5.1# updatedb
bash-5.1# ls /var/lib/mysql
ls: cannot access '/var/lib/mysql': No such file or directory
bash-5.1# mysql_install_db --user=mysql
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
210409 17:46:38 [ERROR] mysqld got signal 4 ;
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.5.9-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 466474 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0
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 = 0x0 thread_stack 0x49000
??:0(my_print_stacktrace)[0x125c6ae]
??:0(handle_fatal_signal)[0xbbf822]
addr2line: 'linux-gate.so.1': No such file
linux-gate.so.1(__kernel_sigreturn+0x0)[0xb7efb554]
??:0(my_dlerror)[0x1276f30]
??:0(wsrep_notify_status(wsrep::server_state::state, wsrep::view const*))[0xfcc21a]
??:0(Wsrep_server_service::log_dummy_write_set(wsrep::client_state&, wsrep::ws_meta const&))[0x7de1bf]
??:0(Wsrep_server_service::log_dummy_write_set(wsrep::client_state&, wsrep::ws_meta const&))[0x7df151]
??:0(wsrep_notify_status(wsrep::server_state::state, wsrep::view const*))[0xf7158c]
??:0(ha_initialize_handlerton(st_plugin_int*))[0xbc29bd]
??:0(sys_var_pluginvar::sys_var_pluginvar(sys_var_chain*, char const*, st_plugin_int*, st_mysql_sys_var*))[0x96446c]
??:0(plugin_init(int*, char**, int))[0x965b8a]
??:0(unireg_abort)[0x86101c]
??:0(mysqld_main(int, char**))[0x867665]
??:0(main)[0x8241e7]
??:0(__libc_start_main)[0xb757b889]
??:0(_start)[0x85a651]
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /var/lib/mysql
Resource Limits:
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 7803 7803 processes
Max open files 32186 32186 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 7803 7803 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Core pattern: core
/usr/bin/mysql_install_db: line 524: 14387 Illegal instruction "$mysqld_bootstrap" $defaults $defaults_group_suffix "$mysqld_opt" --bootstrap $silent_startup "--basedir=$basedir" "--datadir=$ldata" --log-warnings=0 --enforce-storage-engine="" "--plugin-dir=${plugindir}" $args --max_allowed_packet=8M --net_buffer_length=16K
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> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
You can also try to start the mysqld daemon with:
shell> /usr/libexec/mysqld --skip-grant-tables --general-log &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/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 https://mariadb.org/jira
bash-5.1#
after this, a /var/lib/mysql directory was created again (with the same 4 log files as listed above) but, NO /var/run/mysql directory.
I am doing this still as root
p.s.: i just read this
Quote:
210409 17:46:38 [ERROR] mysqld got signal 4 ;
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.
any chances that upgrading from slackware 14.2 (where everything was working well) to current my hardware packed up?
or is it more likely that the package is corrupted?
that's as far as my tech logic queries goes so, any further tips will be appreciated.
Did you check the ownership, permission, and the content of /var/lib/mysql before running mysql_install_db?
/var/lib/mysql should be empty before running mysql_install_db and it should be owned by user mysql. Mine is like this:
Code:
$ ls -ld /var/lib/mysql
drwxr-x--- 8 mysql mysql 4096 Apr 9 13:09 /var/lib/mysql
That's why the command is 'mysql_install_db --user=mysql'. It will create all mysql/mariadb database files and owned by mysql user.
I did not check i had a /var/lib/mysql directory before running mysql_isnatll_db. I have always done it this way and never checked that prior to installing the server.
However, after the 'mysql_install_db --user=mysql' attempt, i checked and
c- it was exactly the same error msg executing mysql_install_db --user=mysql
if you re-read what you posted above it seems to me that you have two completely different errors when you don't specify as an argument of mysql_install_db "--user=mysql" and when you do (in posts #1 and #4, respectively).
in case you want to be sure that you haven't done a full upgrade and that is crippling your system you can try (substitute "slackware64" with just "slackware" if you are using slackware-current 32bit)
note that the last command will propose you to remove packages that were part of slackware 14.2 and that should be removed whe switching to current but it will propose also to remove every third-party package you have installed, so be sure to deselect the third-party stuff (just that, not any 14.2 packages) that you are interested in keeping.
also, before launching the above command, be sure to not having blacklisted anything as it will most probably interfere with the upgrade.
a possibility could be that you haven't done a full upgrade: to verify you have done a full upgrade you can do (substitute "slackware64" with just "slackware if you are using slackware-current 32bit)
note that the last command will propose you to remove packages that were part of slackware 14.2 and that should be removed whe switching to current but it will propose also to remove every third-party package you have installed, so be sure to deselect the third-party stuff (just that, not any 14.2 packages) that you are interested in keeping.
also, before launching the above command, be sure to not having blacklisted anything as it will most probably interfere with the upgrade.
thanks again! it gets interesting now because i believe that my little netbook has 32bit hardware; I know that 64bit software won't work on it (already tried, by mistake, to install apache openoffice package from my desktop, to only realize after 6hrs that i was trying to install the 64bit; everything was fine when i downloaded the 32bit version.ignore this blubbering.
However, in the last 48hrs I have run 'slackpkg update && install-new && upgrade-all' twice and it has completed flawlessly.
I have found this bug report which seems to be identical to my problem and although the developers couldnt fix it, there were suggested two possible issues:
1) reinstall mysql/mariaDB as the pre-built package was defective (it seemed to have fixed the issue for at least the user who reported the bug)
2) InnoDB issues
Now, i have no idea how to fix or even discuss InnoDB code and errors but I could try to download a new MariaDB package and reinstall it
No dice.
Reinstalled mariaDB and a package 'sc...something' tried again running mysql_install_db --user=mysql and had the same long error msg.
In defense of my 1st post ('mysql_install_db', which was outlined as incorrect and, 'mysql_install_db --user=mysql' being the correct 1st step to install mysql server with no actual mysql package installed), would it not make this tutorial erroneous and misleading?
On the other hand, this tutorial suggests at the beginning to install mysql package.
Before I go ahead and try this other option (installing mysql on a 32bit netbook), could i make things worse?
ok, i am starting to doubt the full system upgrade. Although, It is frustrating because 'slackpkg update && slackpkg install slackware && slackware upgrade-all' won't outline any errors and/or packages missing
Another anomaly just presented: sbopkg won't sync and won't populate the queueus directory.
I am looking for a 32bit slackware.iso download (15 or current). But i can only find the 64bit.
I am wandering, could it be that this little 7yrs old netbook is not capable of "keeping up" with the resource-heavy KDE demand?
You're not the first to discover that running the latest MariaDb on the latest 32bit Slackware is causing issues.
MongoDB stopped supporting 32bit OS a while ago and I guess it's that time for MariaDB too. Developers are just no longer testing their code on 32bit architectures and as a consequence, incompatibilies are inevitable.
You are experiencing other issues however that are not related to MariaDB or a 32bit OS. So perhaps there's a fix still. I wonder (not 'wander') whether you have noticed the *.new files that get installed by the package? The old mysql and older mariadb configuration files may not be fully compatible with the latest version you've installed. Check what differences you need to copy over.
You're not the first to discover that running the latest MariaDb on the latest 32bit Slackware is causing issues.
MongoDB stopped supporting 32bit OS a while ago and I guess it's that time for MariaDB too. Developers are just no longer testing their code on 32bit architectures and as a consequence, incompatibilies are inevitable.
You are experiencing other issues however that are not related to MariaDB or a 32bit OS. So perhaps there's a fix still. I wonder (not 'wander') whether you have noticed the *.new files that get installed by the package? The old mysql and older mariadb configuration files may not be fully compatible with the latest version you've installed. Check what differences you need to copy over.
thanks Alien Bob,
for the reply and spelling correction )
Would you mind explaining what the sentence in bold exactly means?
I have not installed any newer/older mysql (none at all, actually) and/or MariaDB. I only deleted the current MariaDB and 'slackpkg install slackware' picked it up and reinstalled.
If the current MariaDB doesnt support 32bit hardware anymore, would an older MariaDB fix the issue? and/or, would it be better to remove the MariaDB package and install mysql?
I was able to replicate this on an samsung nc10 atom netbook I found laying around: I have rebuilt a debug version of mariadb that, probably just for being a debug/unstripped version, doesn't seem to crash here.
if you want to try it updating your installed version, it's here: it's bigger, a bit slower but it should work also for you.
I was able to replicate this on an samsung nc10 atom netbook I found laying around: I have rebuilt a debug version of mariadb that, probably just for being a debug/unstripped version, doesn't seem to crash here.
if you want to try it updating your installed version, it's here: it's bigger, a bit slower but it should work also for you.
A huge super thank you Ponce. Your tweak worked perfectly. (it's a shame that Maria DB doesnt support 32bit architecture anymore).
And thanks to the slackware developers for making slack greater every day
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.