LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-02-2024, 05:29 PM   #1
rocknrobin
Member
 
Registered: Apr 2020
Location: Texas
Distribution: 14.2
Posts: 50

Rep: Reputation: Disabled
Slackware 15.0+ roll to new rc.mysqld from Feb 18 2024 cannot connect to database


Hell-o. I was updating some new files from slackpkg updates and one of the new ones I rolled to was /etc/rc.d/rc.mysqld.new.

Code:
root@robrutrm:/etc/rc.d# ls -l | grep rc.mysqld
-rwxr-xr-x 1 root root  2683 Jul 15  2023 rc.mysqld*
-rwxr-xr-x 1 root root  2517 Feb 18 17:20 rc.mysqld.new*
-rwxr-xr-x 1 root root  2766 Mar 27  2019 rc.mysqld.old*
-rwxr-xr-x 1 root root  2764 Mar 27  2019 rc.mysqld_bak*
When I did this I could no longer connect either to the main database or the mythtv database.

Code:
root@robrutrm:/var/log# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local server through socket '/var/run/mysql/mysql.sock' (2)

root@robrutrm:/var/log# mysql -u root -h 10.160.134.69 -p
Enter password:
ERROR 2002 (HY000): Can't connect to server on '10.160.134.69' (115)

root@robrutrm:/etc/rc.d# mysql -u mythtv -h 10.160.134.69 -p mythconverg
Enter password:
ERROR 2002 (HY000): Can't connect to server on '10.160.134.69' (115)
Of course this doesn't allow the mythtv backend to start since it cannot connect to the mythtv database.

I rolled back to the original rc.mysqld and now I can connect to the database again.

Code:
root@robrutrm:/etc/rc.d# mysql -u root  -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.11.7-MariaDB Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

root@robrutrm:/etc/rc.d# mysql -u mythtv -h 10.160.134.69 -p mythconverg
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 10.11.7-MariaDB Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mythconverg]>
And now mythtv works again.

Anybody have any ideas how the new rc.mysqld broke mariadb?
 
Old 05-02-2024, 06:05 PM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,531

Rep: Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511
There is no new rc.mysqld. It hasn't changed since 2021, before the release of Slackware 15.0. But thanks for making me realize that rc.mysqld.new's timestamp was getting set to the current time of package installation, because I'd like to avoid that.

The file with size 2517 is the correct version since 3 years ago. I'd have to see a diff -u against the other file to have any more ideas about this.
 
Old 05-02-2024, 06:38 PM   #3
rocknrobin
Member
 
Registered: Apr 2020
Location: Texas
Distribution: 14.2
Posts: 50

Original Poster
Rep: Reputation: Disabled
Thanks volkerdi for the quick response. Here is the diff -u

Code:
root@robrutrm:/etc/rc.d# diff -u rc.mysqld rc.mysqld.new
--- rc.mysqld   2023-07-15 17:29:11.379812492 -0500
+++ rc.mysqld.new       2024-02-18 17:20:51.687222690 -0600
@@ -29,10 +29,7 @@
 # To allow outside connections to the database comment out the next line.
 # If you don't need incoming network connections, then leave the line
 # uncommented to improve system security.
-# SKIP="--skip-networking"
-
-# Uncomment the next line to use Oracle's InnoDB plugin instead of the included XtraDB
-#INNODB="--ignore-builtin-innodb --plugin-load=innodb=ha_innodb.so"
+SKIP="--skip-networking"

 # Start mysqld:
 mysqld_start() {
@@ -44,7 +41,8 @@
         rm -f /var/run/mysql/mysql.pid
       fi
     fi
-    /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP $INNODB &
+
+    /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP &
   fi
 }

@@ -68,7 +66,6 @@
   fi
 }

-
 # Restart mysqld:
 mysqld_restart() {
   mysqld_stop
The file with size 2517 is the one that does not work. I am definitely not a developer but I see the skip-networking is enabled on the .new and the start script is somewhat different, but not much else.
 
Old 05-02-2024, 07:05 PM   #4
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,531

Rep: Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511Reputation: 8511
There's really not been significant change to that file since Slackware 13.37 or earlier.

That said, I think you need to comment out the SKIP= line in the new file, and then it should work.
 
Old 05-02-2024, 10:06 PM   #5
rocknrobin
Member
 
Registered: Apr 2020
Location: Texas
Distribution: 14.2
Posts: 50

Original Poster
Rep: Reputation: Disabled
Okay, I rolled the rc.mysqld.new file to rc.mysqld, the 2517 size file, commented out the SKIP= line, and that did the trick. Once mysqld was stopped and restarted I was able to connect to the database and mythtv launched okay. Thanks for the assistance.
 
Old 05-04-2024, 04:21 PM   #6
rocknrobin
Member
 
Registered: Apr 2020
Location: Texas
Distribution: 14.2
Posts: 50

Original Poster
Rep: Reputation: Disabled
Just an FYI...after slackware updates this weekend a new /etc/rc.d/rc.mysqld.new file was added and it still has the SKIP= uncommented which as seen before causes issues with connected to the MariaDB. Should that be changed or something re-configured with the --skip-networking algorithm.
 
Old 05-05-2024, 05:10 AM   #7
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,843

Rep: Reputation: 1507Reputation: 1507Reputation: 1507Reputation: 1507Reputation: 1507Reputation: 1507Reputation: 1507Reputation: 1507Reputation: 1507Reputation: 1507Reputation: 1507
Quote:
Originally Posted by rocknrobin View Post
Just an FYI...after slackware updates this weekend a new /etc/rc.d/rc.mysqld.new file was added and it still has the SKIP= uncommented which as seen before causes issues with connected to the MariaDB.
That's how it works. In case of many config files, your changes are protected this way. If you make a change to the file, the next mariadb upgrade does not write the default file over your version but adds the .new file for you to consider.
Code:
# To allow outside connections to the database comment out the next line.
# If you don't need incoming network connections, then leave the line
# uncommented to improve system security.
SKIP="--skip-networking"
 
Old 05-05-2024, 06:16 PM   #8
rocknrobin
Member
 
Registered: Apr 2020
Location: Texas
Distribution: 14.2
Posts: 50

Original Poster
Rep: Reputation: Disabled
Ok. Thanks.
 
  


Reply

Tags
mysqld



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot run MySQL - no subdirectory .../mysqld - no mysqld.sock qajaq Linux - Software 11 08-28-2019 12:27 PM
sudo cp -rp ./mysqld ./mysqld.bak cp: cannot stat './mysqld': No such file or directory 5huvoo Linux - Server 5 03-06-2018 02:10 PM
mysqld from pid file /var/run/mysqld/mysqld.pid ended gabsik Linux - Server 3 12-11-2016 10:15 AM
[SOLVED] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' Burningmace Linux - Server 5 09-06-2012 01:29 AM
Can't connect to local MySql server through socket '/var/run/mysqld/mysqld.sock' (2) thoufiq Linux - Server 4 04-19-2011 04:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration