我尝试更改通过EasyPHP DEVSERVER 16.1.1安装的MySQL的DataDir的默认路径,但是每次mysql启动时,它将datadir重置为默认值。

你能帮我吗?

最佳答案

在要使用的mysql文件夹(在eds-app-actions.php中)的eds-binaries/dbserver文件中更改以下行。

// Update datadir
//$replacement = '${1}' . str_replace('\\', '/', __DIR__) . '/data/$3'; // original
$replacement = '${1}' . 'your/new/path/$3';
// don't change the other lines

// Update innodb_data_home_dir
//$replacement = '${1}' . str_replace('\\', '/', __DIR__) . '/data/$3'; // original
$replacement = '${1}' . 'your/new/path/$3';
// don't change the other lines

// Update innodb_log_group_home_dir
//$replacement = '${1}' . str_replace('\\', '/', __DIR__) . '/data/$3'; // original
$replacement = '${1}' . 'your/new/path/$3';
// don't change the other lines

10-07 23:49