Tiny Core Base > Raspberry Pi
Mariadb
Rich:
Hi MrToga
--- Quote from: MrToga on June 08, 2022, 06:03:31 AM --- ... I also modified the my.cnf file in /usr/local/etc/mysql/my.cnf ...
--- End quote ---
According to the plugincheck.txt file you attached:
--- Quote ---Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
--- End quote ---
MrToga:
Hi Rich,
After copying my.cnf file in /etc/ (I don't the other directory)
I still get the same error on mysqld
tacpilot:
Sounds like you need to initialize a DB.
and make sure your permissions are set correctly for the mysql user.
You may need adjust user and paths for your system setup and needs.
This should be the general idea.
--- Code: ---sudo mysql_install_db --user=mysql --basedir=/usr/local/mysql --ldata=/home/tc/mysql/data
sudo chown -R mysql:mysql /home/tc/mysql/data
--- End code ---
--- Quote ---After a fresh install of mysql (or after you delete /var/lib/mysql), you need to manually create the system tables via mysql_install_db. The mysql daemon will not do it for you on startup
--- End quote ---
--- Quote ---Give mysql ownership and group priveleges with:
chown -R mysql /var/lib/mysql
chgrp -R mysql /var/lib/mysql
--- End quote ---
quotes referrence:
https://stackoverflow.com/questions/9083408/fatal-error-cant-open-and-lock-privilege-tables-table-mysql-host-doesnt-ex
some additional reading
https://forums.mysql.com/read.php?11,51024,91019
Hope this helps :)
Rich:
Hi MrToga
I have a similar answer.
Run these 2 commands. Adjust basedir and datadir as needed:
--- Code: ---sudo rm -R /var/lib/mysql/*
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
--- End code ---
Adapted from instructions found here:
https://imrecsige.dev/snippets/fix-mariadb-missing-tables-on-manjaro-arch-linux/
Same install_db command was suggested here:
https://stackoverflow.com/questions/69935085/mysql-mariadb-cant-open-and-lock-privilege-tables-table-mysql-servers-doesn
MrToga:
Update :
After I've tried the two solution you gave me I got some problem.
With tacpilot's solution I got an error from auth_pam_ tool that it didn't exist so I tried to install the extension linux-pam without any success and I also found some topic (https://www.linuxquestions.org/questions/slackware-14/mysql_install_db-mariadb-10-4-6-on-slackware64-current-is-not-working-4175656852/) to just delete a line in the script but it didn't work either.
And with Rich's solution I don't have /var/lib/mysql/ directory at all so in the end it's still the same as the first solution.
I attached the script (I deleted the part that was in the link above) and the error hope you can find something.
(I also created mysql user using adduser I don't know if I can create a DB user like that maybe it's part of the problem I don't know)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version