SSH import sql database with host syntax (if not localhost)

How to import a .sql.gz file when the host is not localhost? Use this syntax:

$ mysql -h db365838511.db.1and1.com -u dbun1234 -p db365838511 < 1and1help.com-Joomla-Apr.05.2010.sql

Explanation:

  • mysql: This is the MySQL command to access your databases
  • -h db365838511.db.1and1.com: This is the Host Name where your database is located (available from the 1&1 Control Panel).
  • -u dbun1234: This is the User Name for your database (available from the 1&1 Control Panel).
  • -p: This is to prompt for a password. Do not type the password now. You will be asked for the password after you hit ENTER.
  • db111111111: This is the database name.
  • < : This is to specify a database file should be imported to the database.
  • 1and1help.com-Joomla-Apr.05.2010.sql: This is the filename you will enter to specify which of the files you wish to import.

Source: 1and1



Magento 1.8 add to url via url query

Would like to add a product via an url like (as described in this Mage article):

<?
echo "
<form action='/checkout/cart/add/product/" . $id . "/form_key/'>
<input type='submit' value='In Cart' />
</form>";
?>

This doesn’t work in Magento 1.8 unfortunately, because of the new form_key system. You can provide an hidden form_key field. Unfortunately this didn’t work in my case. Best way is to omit the form_key security for add to cart querystrings. This can be solved with this rewrite plugin:

https://github.com/deivisonarthur/Inovarti_FixAddToCartMage18/

Good luck!