0

I changed the base url and now i can't get into the admin page. what i've seen on this forum is to change the value in the database but i can't connect to my database with mysql workbench

so if someone could help me with the command line for terminal

mysql> describe core_config_data
    -> ;
+-----------+------------------+------+-----+---------+----------------+
| Field     | Type             | Null | Key | Default | Extra          |
+-----------+------------------+------+-----+---------+----------------+
| config_id | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| scope     | varchar(8)       | NO   | MUL | default |                |
| scope_id  | int(11)          | NO   |     | 0       |                |
| path      | varchar(255)     | NO   |     | general |                |
| value     | text             | YES  |     | NULL    |                |
+-----------+------------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)


mysql> select * from core_config_data where path like '%base_url%';
+-----------+---------+----------+-----------------------+-------------------------+
| config_id | scope   | scope_id | path                  | value                   |
+-----------+---------+----------+-----------------------+-------------------------+
|         9 | default |        0 | web/unsecure/base_url | this is what i need to change! |
|        10 | default |        0 | web/secure/base_url   | i deleted my ipadres     |
+-----------+---------+----------+-----------------------+-------------------------+
2 rows in set (0.00 sec)
0

To update the values via the terminal you should just have to run:

UPDATE core_config_data SET value = 'your url' WHERE path = 'web/unsecure/base_url';
UPDATE core_config_data SET value = 'your secure url' WHERE path = 'web/secure/base_url';

Remember to make sure you include the trailing slash on the domain.

  • I reinstalled magento, but thanks anyway – Ivan Djakie Mar 22 '15 at 15:05
  • When you make changes to the core_config_data table, you must always clear the Magento cache so config data gets re-read out of the table. Also, on moving to a new server, make sure proper file/directory permissions and ownership are set so Magento can read/write its cache from var/cache or it will install the cache elsewhere and refuse to allow the new values written to core_config_data to be read. – Fiasco Labs Mar 22 '15 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.