mysqldump -S /opt/lampp/var/mysql/mysql.sock -u root -h localhost -p gihan mistoria wp_posts | gzip -9 >/opt/lampp/htdocs/mistoria/wp-content/backups/backup_table.sql.gz
这是我的命令,一旦插入此命令,它将返回以下错误,请帮助我。
mysqldump: Got error: 1049: Unknown database 'gihan' when selecting the database
答案 0 :(得分:0)
删除“-p”和密码之间的空格。
mysqldump -S /opt/lampp/var/mysql/mysql.sock -u root -h localhost -pgihan mistoria wp_posts | gzip -9 >/opt/lampp/htdocs/mistoria/wp-content/backups/backup_table.sql.gz