MySQLのバックアップメモ
phpMyAdminからバックアップをおこなおうかと思ったけど非常にめんどくさいので普通にサーバ側からバックアップをとることに
バックアップ
mysqldump -u ユーザー名 -pパスワード データベース名 > バックアップファイル名
リストア
mysql -u ユーザー名 -pパスワード名 データベース名 < バックアップファイル名
phpMyAdminからバックアップをおこなおうかと思ったけど非常にめんどくさいので普通にサーバ側からバックアップをとることに
バックアップ
mysqldump -u ユーザー名 -pパスワード データベース名 > バックアップファイル名
リストア
mysql -u ユーザー名 -pパスワード名 データベース名 < バックアップファイル名
Photo: Jaz. Mine / Unsplash LicensePhoto: Se. Tsuchiya / Unsplash LicensePhoto: Sergio / Unsplash LicensePhoto: Robert Bant / Unsplash LicensePhoto: Zhi Xuan Hew / Unsplash License