原创 更改mysql的數據目錄

1、安裝mysql:sudo apt-get install mysql-server-5.52、更改mysql的數據目錄:修改/etc/mysql/my.cnf: 將datadir=/var/lib/mysql修改爲 datadir=