How to reload MySQL's my.cnf?

Server version: CentOS Linux release 7.4.1708 (Core)
MySQL version: 5.7.21
-Source Code installation

$ mysql
ERROR 2002 (HY000): Can"t connect to local MySQL server through socket "/u01/my3306/mysql.sock" (2)

this is an error I reported when I logged in to MySQL. Because when I was in cmake, I configured it like this

-DMYSQL_UNIX_ADDR=/u01/my3306/run/mysql.sock

and then on my.cnf, I wrote this again

socket=/u01/my3306/mysql.sock

I did it when I initialized mysql when I loaded the my.cnf file

mysqld --defauts-file=/u01/my3306/my.cnf --datadir=xxx --initialize-insecure --user=xxx --console

I can"t log in to MySQL right now. If I want to reload the my.cnf, I have to close the MySQL and delete the contents that initialize the MySQL before I can reload it? Is there another way to reload my.cnf?

Mar.04,2021

this problem can be solved by establishing a soft connection through ln-s, but it is not clear how to reload my.cnf


cannot reload my.cnf, unless you restart mysql,
only a limited number of variables can be connected to mysql and modified. Most of them cannot be modified after startup.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be9692-310f2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be9692-310f2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?