Generally, we will give a system disk when purchasing VPS, which is generally between 10 GB and 40 GB. When there is a large amount of data on your website, we will consider purchasing a data disk, then place the website data and MySQL database storage directory on the mounted data disk, so that the system disk will not be fully occupied. Of course, another benefit is that no matter what problems occur to your system disk, it does not affect your database and website data.
Once your system disk is full, database startup will fail.
The Xen architecture host and Tencent Cloud host will appear. According to some friends, Tencent Cloud is allocated 8 GB.
How to modify the MySQL data storage directory in CentOS in linux
1. The environment of the blogger is the one-click LNMP package of June, and MariaDB is used for the database. The storage directory seems to be different from that of MySQL, but the operation principle is the same.
2. The database installation directory is "/usr/local/mariadb", and the data storage directory is in "/usr/local/mariadb/var.
3. go to the "/usr/local/mariadb" directory and move the "var" directory to the data disk. The data disk of the blogger is mounted on "/data". The operation command is:
Mv/usr/local/mariadb/var/data
4. Run the "/data/var" soft link. The command is as follows:
Ln-s/data/var/usr/local/mariadb/
5. Restart the database. The command is as follows:
Mysql restart
Then you can check whether it is normal.