Linux Modify the AMH system panel default MySQL database storage path method

Source: Internet
Author: User
Tags vps


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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.