LinuxQuestions.org
Visit Jeremy's Blog.
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 10-10-2020, 07:47 AM   #1
adkPrasanna
LQ Newbie
 
Registered: Mar 2016
Posts: 29

Rep: Reputation: Disabled
mysql in slackware


what is the difference between running mysql using:
/etc/rc.d/rc.mysqld start and
./mysql.server start (of /usr/share/mysql)

first picks data directory /var/lib/mysql
second picks data directory using /etc/my.cnf
 
Old 10-10-2020, 10:40 AM   #2
karlmag
Member
 
Registered: Apr 2014
Distribution: Slackware
Posts: 127

Rep: Reputation: Disabled
Quote:
Originally Posted by adkPrasanna View Post
what is the difference between running mysql using:
/etc/rc.d/rc.mysqld start and
./mysql.server start (of /usr/share/mysql)

first picks data directory /var/lib/mysql
second picks data directory using /etc/my.cnf

If you look at those two scripts, you will see they are way different.
First one is written by PatV and explicitly sets
Code:
--datadir=/var/lib/mysql
in the mysqld_start() function.

The second one is written by someone else and thus presumably does things differently (as you state yourself).
Also it comes with the mariadb package.
Code:
grep "mysql\.server$" /var/lib/pkgtools/packages/*
/var/lib/pkgtools/packages/mariadb-10.5.5-x86_64-1:usr/share/mysql/mysql.server
(this on my primary -current box)


So not sure what to say besides; yes they are two different scripts which behaves differently, so your results will be different running one or the other.
I guess it means you should be mindful of which you want to run and/or rewrite one to match the other (with the implicated management overhead over time).


Thanks
--
KarlMag
 
Old 10-13-2020, 04:52 AM   #3
adkPrasanna
LQ Newbie
 
Registered: Mar 2016
Posts: 29

Original Poster
Rep: Reputation: Disabled
edited rc.mysqld

Thanks for your reply, I modified --datadir=/var/lib/mysql to --datadir=/home/my-path
Hope its good practice to edit rc.mysqld in this way
 
  


Reply



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
Can MySQL log on via SSH/bash? mysql:x:27:101:MySQL Server:/var/lib/mysql:/bin/bash Ujjain Linux - Newbie 2 04-24-2009 02:21 PM
yum install php-mysql fails with mysql 5.1 - "Error: mysql conflicts with MySQL" rebelde Linux - Software 2 03-13-2009 10:32 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM

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

All times are GMT -5. The time now is 08:27 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