1. Log mysql server
mysql -uroot -p
2, query mysql server installation location
# Sql any one of the following two query SELECT @@ the basedir AS from the basePath Dual; Show Variables like 'the basedir%%';
Reference: https: //www.cnblogs.com/phpper/p/10773004.html