Under normal circumstances, our VPS host environment if according to similar AMH panel, if there is a data disk when the site project will be independent of the data disk storage, and the system and the Panel environment database storage in the system disk, because it will not occupy too large hard disk space. In the morning, a friend needs the old left to help resolve the AMH panel database is also placed on the data disk, fearing which day system data or cache caused the system disk to fill up the problem.
Modify the AMH system panel default MySQL database storage path method
Resolve Modify AMH system panel default MySQL database storage path method
First, copy the AMH panel database to the Mount directory folder
Here old left to see the mounted data disk is the home directory (Mount AMH reference Tencent Cloud Server Mount data disk and install the AMH Management panel process), is generally the case, we can copy/usr/local/mysql/data to/home/mysql folder.
Cp-r/usr/local/mysql/data//home/mysql/
Execute SSH command one-step.
Second, create soft link New database directory
In the/usr/local/mysql/directory to execute the ln-s/home/mysql/data command to create soft links, and the original old data database folder to delete or change the name, or change the name first.
Third, set the new MySQL directory folder permissions
Chown-r Mysql:mysql mysql/
Finally, reboot the VPS to solve the problem
In view of security considerations, we still have to test and then go to the formal machine to play in order to avoid errors.