PLEASE HELP OUT!!
I used this statement $ mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql on an existing server with Datadir inside another directory.
Now I can’t see my Database , I can’t log in again. I tried reversing it by specifying my path to my directory but I got an error like this
“installation of system table failed examine the log in ‘/log/mariadb/mariadb.log’ or /data2 for more information , the problem could be a conflicting information inside an external my.cnf files you can ignore it by doing: /bin/mysql_install_db —defaults=~/.my.cnf”.
I have all my databases in /data2 directory and my users but Mysqld is using /var/lib/mysql as directory like I said earlier. I have done all I can. Also I know for sure Mysqld is picking up another configuration file from another place. I don’t know. Because all my variables are different now
Okay my.cnf contains include *.cnf & !includedir
/etc/my.cnf.d… basically it’s Piped into my.cnf.d. For sure you know that , you are an expert .
So removing var/lib/mysql … I think I have done that.
Error logs says failed to open log( file /logs/ mariadb -bin.000337’ error 14 ) nothing major .
Can I move bar/lib/mysql to my datadir and give Mysql permission ?
After you started MariaDB, did you verify that nothing was create inside /var/lib/mysql? If stuff was created, then you’re still missing a config parameter somewhere that’s telling mariadb to keep using that directory. If nothing was created, and /var/lib/mysql is still empty, then you’re good. Just keep using /data2 as you are. You should also make sure that /logs/ exists and that this path for binary logs is also correct in your my.cnf
Thanks a lot Mathew I haven’t been able to come back all these while . Var/lib/mysql consists of just perfomace_schema, mysql, ibdata1 and yariyari…that’s all .still there is no config file elsewhere again. Even if I moved car/lib/mysql into my existing /data2. Problem still persists. In this situation what do you think
If you completely erased var/lib/mysql, then started mysql, and now there is data in that directory, then that means your config is still messed up somewhere.