Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: Yarpi on December 31, 2023, 09:26:27 AM
-
Hello,
I was in a sleeping state some weeks ago and I was modifing my system to build a web server, I have made some modification and now they are persistent. How is it possible?
When I load mariadb-10.4.tcz it load the file in /usr/local/etc/init.d/ called mysql and in it there is written that the home directory for mysql data is /home/tc/mysql/data and this is the change that I've made while I was sleeping and if I change it (eg. /usr/local/mysql/data) when I reboot the computer it rool back to /home/tc/mysql/data. What have I changed?
P.S. I want to change it because the mariadb server doesn't start, if I launch it as root, it says that cannot start as root, if I start it with sudo -u tc ./mysqld it says permission denied on Bind on unix socket and it asks me if I have another mysqld server running on socket /var/run/mysql.sock Another error is Can't open and lock privilege tables.
Thank you in advance.
-
Hi Yarpi
/usr/local/ is not a persistent directory so /usr/local/etc/init.d/mysql
will be replaced with the extensions version when you reboot. If you
look in /usr/local/etc/init.d/mysql you'll find datadir is hardcoded
to /home/tc/mysql/data if you don't set it to something else.
I think you can override it like this:
echo -e "[mysqld]\ndatadir=/usr/local/mysql/data" > ~/.my.cnf
filetool.sh -b
As I said, /usr/local/ is not a persistent directory so /usr/local/mysql/data
will disappear when you reboot.
-
Hello,
thank you for your answer, if I have well understood, /home/tc/mysql/data is the default home directory for data in mariadb and I never changed it. Why it doesn't work?
-
Yes, it is correct, every mysql version is configured to ~/mysql/data so for this reason I had to change it to what I want each time.
Thank you.