IUT informatique : script Shell pour injecter la base de données WordPress

Dumper la base de données

mysqldump -u root -pmysql wordpresslocal > 2013.12.19.wordpresslocal.sql

Réinjecter la base de données

mysql -u root -pmysql -e "DROP DATABASE IF EXISTS wordpresslocal;"
mysql -u root -pmysql -e "CREATE DATABASE wordpresslocal DEFAULT CHARACTER SET utf8;"
mysql -u root -pmysql -e "USE wordpresslocal ; GRANT ALL PRIVILEGES ON wordpresslocal   TO 'v69a6YK614454xA'@'localhost' IDENTIFIED BY 'nQ1e7NfDRXG2q6H';"
mysql -u root -pmysql -e "USE wordpresslocal ; GRANT ALL PRIVILEGES ON wordpresslocal.* TO 'v69a6YK614454xA'@'localhost' IDENTIFIED BY 'nQ1e7NfDRXG2q6H';"
mysql -u root -pmysql wordpresslocal < 2013.12.19.wordpresslocal.sql

Poster un commentaire

Vous devriez utiliser le HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>