0

I'm trying to install magento 2.1 on the server and in the second step it presents this error: enter image description here

The data I am putting in is correct, but from this error. When I go through the command line, give me this information: enter image description here

How do I resolve this issue?

2 Answers 2

0

The user "root" doesn't have permission to access your database from that IP. I recommend creating a user specifically for Magento.

Login to your mysql account or ask Linode support to reset your mysql root password to something you can access.

$ mysql -u root -h 139.162.240.116 -p

Enter the password for your root user provided by Linode. Once logged in you'll see the mysql> prompt.

mysql> create database magento;

mysql> create user magento;

Based on your screen cap, I'd set your magento user up this way:

mysql> grant all on magento.* to 'magento'@'li1525-116.members.linode.com' identified by 'YOUR_PASSWORD_HERE';

(replace YOUR_PASSWORD_HERE with a more complex password.)

mysql> flush privileges;

mysql> quit

You should now be able to use the following credentials when setting up Magento:

Database Server Host: 139.162.240.116
Database Server Username: magento
Database Server Password: YOUR_PASSWORD_HERE (whatever you set this to)
Database Name: magento
0

I was using xampp in windows and tried installing magento 2.4 and faced the same error.

I noticed that the mysql is running in a different port (3307).

So in the magento install command I gave

--db-host=”localhost:3307”

Then it started working !

Hope this helps someone facing the same issue !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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