資料庫硬碟爆了 vmware 擴增空間
資料庫爆了所以要擴增
有兩種方法
1. lvm(成功)
https://bencane.com/2011/12/19/creating-a-new-filesystem-with-fdisk-lvm-and-mkfs/
https://ithelp.ithome.com.tw/articles/10081243
2. 掛載到新硬碟 (沒成功)
https://tw.saowen.com/a/d516cead9e4123aa5800f28f2d0d65710fa645fc6a5037209536ed935cb28e4f
https://www.digitalocean.com/community/tutorials/how-to-change-a-mysql-data-directory-to-a-new-location-using-a-symlink
輔助:
1. 確認佔空間的檔案
https://www.8090st.com/linux-disk-mysql-service.html
> 在資料夾下指令,可以得到該資料夾下各檔案/資料夾各佔多少空間
#du –h –max-depth=1
2. 若一直遇到ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused")
,先看一下error log。
解決方法:修改權限為可以讀寫
#chown -R mysql:mysql *
有兩種方法
1. lvm(成功)
https://bencane.com/2011/12/19/creating-a-new-filesystem-with-fdisk-lvm-and-mkfs/
https://ithelp.ithome.com.tw/articles/10081243
2. 掛載到新硬碟 (沒成功)
https://tw.saowen.com/a/d516cead9e4123aa5800f28f2d0d65710fa645fc6a5037209536ed935cb28e4f
https://www.digitalocean.com/community/tutorials/how-to-change-a-mysql-data-directory-to-a-new-location-using-a-symlink
輔助:
1. 確認佔空間的檔案
https://www.8090st.com/linux-disk-mysql-service.html
> 在資料夾下指令,可以得到該資料夾下各檔案/資料夾各佔多少空間
#du –h –max-depth=1
2. 若一直遇到ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused")
,先看一下error log。
解決方法:修改權限為可以讀寫
#chown -R mysql:mysql *
留言