Error: Cannot connect to Magento 1 Database

I am currently trying to Migrate datafrom our Magento 1 site to the Magento 2 site but every time I try to set up the “Databases” tab I get the following error:
“Couldn’t connect to Magento 1 database: Connection refused”
Both the original website and the new Magento 2 database have the same host (localhost:3306) and as far as I can tell I am using the right credentials
Would some one be able to advise please?

23 answers

Profile photo of Mall Staff 105260.00 $tone January 8, 2019
Public

Hi there,

“Couldn’t connect to Magento 1 database: Connection refused”
Both the original website and the new Magento 2 database have the same host (localhost:3306) and as far as I can tell I am using the right credentials

 
Does your M1 database has same MySQL server with M2 database? If not, you must enable remote connection from M2 server to MySQL in M1’s server.
Regards,
Mall.

#1
Profile photo of powermyself 270.00 $tone January 8, 2019
Public

I thought that they were on the same server, I’ll check with our hosting provider.
If it turns out that they are not. How would I enable a remote connection from the M1 server?

#2
Profile photo of ubdev Staff 34600.00 $tone January 9, 2019
Public

Hi there,
You might need further help from your hosting provider to enable a remote connection from your M1 server. 
Meanwhile, you can check out Magento guide here to learn more on enabling remote connection to your M1 server. 
Hope that helps. 
Regards,
Ubertheme team

#3
Profile photo of powermyself 270.00 $tone January 10, 2019
Public

Hi Guys
We’ve spoken to our hosting provider and he has suggested to change some settings in both the “Source” and “Target” database setting.
We have changed the source details with no problem and the error has changed so this is not a problem but the “Target” details seem to be added automatically.
 
Is there a way to change these so that we can try the new details that our hosting provider has suggested?

#4
Profile photo of Mall Staff 105260.00 $tone January 10, 2019
Public

Hi there,

Is there a way to change these so that we can try the new details that our hosting provider has suggested?

You could  manual check in the databases configuration file of our migration tool at path:
pub/ub-tool/protected/config/db.php
Regards,
Mall.

#5
Profile photo of Mall Staff 105260.00 $tone January 11, 2019
Public

Hi there,

Couldn’t connected to Magento 2 database: Connection refused

Can you suggest how I might resolve this?

I need a closer look to detect the root issue you mentioned. Let’s provide me information about your instance:
+ Admin credentials and URL to back-end
+ SSH credentials and path to M2 folder
I will help to check further and get back you then.
Regards,
Mall.

#7
Profile photo of powermyself 270.00 $tone January 11, 2019
Public

I’m not comfortable providing access to our system over a public forum.
Is there somewhere private I can send temporary login details for the site and SSH. 

#8
Profile photo of ubdev Staff 34600.00 $tone January 11, 2019
Public

Hi there,
Actually, once you mark your reply ‘private’, then it’s safe to share your site info here, only and our technical team can access.
Anyway, you can send your site credentials to our info (at) ubertheme.com if you choose to. 
Regards,
Ubertheme team

#9
Profile photo of powermyself 270.00 $tone January 14, 2019
Public

I’ve spoken to our hosting provider and it seems like this is a security issue. More than likely the firewall on the port is blocking access.
If you can give me the IP address you are connecting from I’ll get this white-listed for you and you should be able to connect. 
Thanks 

#16
Profile photo of Mall Staff 105260.00 $tone January 14, 2019
Public

Hi there,
Please do whitelist for our office IPs below:
113.190.252.133
118.70.176.221
113.190.254.239
I will help to check further when I back to my office in tomorrow. 
Regards,
Mall.
 
 

#17
Profile photo of powermyself 270.00 $tone January 14, 2019
Public

Hi. No problem.
I have spoken to our hosting provider and they have white-listed these I.P’s so you should be able to connect as long as you are using one of these three.
Regards

#18
Profile photo of Mall Staff 105260.00 $tone January 15, 2019
Public

Hi there,
I’ve checked your instance and saw your M2 instance has a special setting in the MySQL host configuration in the config file at: app/etc/env.php
I helped to change the configuration as per this screenshot: http://i.prntscr.com/RAykNzZERbSzcpvsoDd3bA.png
And now you could continue with the database settings in Step #1 of our migration tool: https://prnt.sc/m7aai8
If you have any further question, feel free to get back to me here.
Regards,
Mall.

#19
Profile photo of powermyself 270.00 $tone January 15, 2019
Public

 Hi. Thank you, this seems to be working now. 
I do have one further question if you wouldn’t mind. We’re planning to keep our Magento 1 site running until we’re ready to switch over to the Magento 2 site but we would like to migrate all the customer data over to test the site prior to switching.
Is it possible to run the migration extension more than once just to update the database with new records once they are in rather than overwriting them completely import the database all over again?

#20
Profile photo of Mall Staff 105260.00 $tone January 15, 2019
Public

Hi there,

Is it possible to run the migration extension more than once just to update the database with new records once they are in rather than overwriting them completely import the database all over again?

Yes. After the first migration is completed, you can do delta migrate to update changes. Please learn more about the delta migration option in the Readme.html included in your downloaded package. 

Regards,
Mall.

#21
Profile photo of ubdev Staff 34600.00 $tone January 15, 2019
Public

Hi there, 
We close this ticket for now. In case you have any additional question, please submit a new ticket or get back to us here.
Regards,
Ubertheme team

#23

Please login or Register to Submit Answer

Written By

Comments