Most Recent
Read More
January 24, 2016

Setup New User from MySQL Command Line

This will help you create a new user from the command line and give them access to all databases within the MySQL Instance.

1. Login to MySQL using the current root name and password:     mysql -u root -p    You will then be prompted for the current root password. 2. Next create the new user and give them a password. In this case we’ll create a demo username and password but for actual setups use a secure username and password which is unique to the company. In our example ‘magentobase’ is the username and ‘MagentoBase01’ is the password.     CREATE USER ‘magentobase’@’localhost’ IDENTIFIED BY [...]
Read More
January 24, 2016

How To Change The Domain For Magento In MySQL From The Command Line

We deploy Magento sites all around the place and often we did not setup the hosting environment, are limited to what we can do on the hosting environment or just plain forgot to change the domain name locally in the database before we backed up the database to deploy.

As you all know, or have stumbled across this post because you’re having an issue, Magento sets the domain name in the database for the base_url and the secure_base_url. If these are set to something different than the domain you are deploying the site to, it will redirect off to that domain. Simple.

So we are assuming you have restored a Magento database to a server and just need to change the base [...]

Read More
January 24, 2016

Restore a MySQL Database From the Command Line

A lot of developers who are new, or have been mainly doing specialised development (eg just front end or backend) have not had to restore databases before. Or if they have they are able to use MySQL Workbench which helps significantly with database administration.

The problem comes when you’re using a remote server which only has SSH access or the backup of the database is too big to open in MySQL Workbench to execute and restore the content.

So what do you do? Basically the same process of creating a database in MySQL Wordkbench or phpMyAdmin can be replicated from the command line easier than you think.

We assume you have MySQL installed and know the root [...]