domingo, 8 de dezembro de 2013

Reset Password Magento via SQL



It seems like the password must be typed and not copy/paste at least on the install part. good to know ;o)
The default login is : admin The default password is : 123123
If you are having troubles and want to reset it to a different password, just run at your sql database:
  1. SELECT * FROM admin_user;
Then, find the username you want to modify in the listing provided - ‘admin’ in this example. Then, to update the password, type:
  1. UPDATE admin_user SET password=CONCAT(MD5('qXpassword')':qX') WHERE username='admin';
‘qX’ would be changed to whatever you want it to be and same goes for ‘password’
You can also do this in phpMyAdmin, find the admin_user field and choose MD5 when updating password.
If you want to add a new admin user, you must not only create a new entry in the table ‘admin_user’, but you also have to insert an entry in the table ‘admin_role’ which has to be associated with the user by the field ‘user_id’.

terça-feira, 3 de dezembro de 2013

Bakup Restore e Permissoes MYSQL/MAGENTO



Backup Magento 

Compactar pasta

sudo tar -xcvf use.tar.gz html/


Restore Banco Magento ssh

ps: retirar o backup pelo admin do magento

sudo mysqldump -h 127.0.0.1 -u root -p BANCO > nome.sql


Comando para criar usuario no banco de dados.

CREATE USER 'heder'@'%' IDENTIFIED BY 'senha';

Comando para Atribuir banco ao usuario especifico.

GRANT all ON DB_BANCO.* TO "heder" WITH GRANT OPTION;

Alterar Senha Usuario

SET PASSWORD FOR heder = PASSWORD('novasenha');

Alterar Senha ROOT MYSQL

UPDATE user SET password=password('0000000000') WHERE user='root';

Exibir usuarios e hosts mysql

select user,host from mysql.user;