Trying to us SSH to upload a 120MB sql database to a new sql database, problem with SSH access

Hi guys!

I tried uploading my database with the following commands:

Command for connecting:
-> ssh

mysql -h [hostname] -u [uname] -p[pass] [db_to_restore] < [backupfile.sql]

mysql -h localhost -u UsernameFromUserAccess -p DatabaseFromDatabase < DatabasOldName.sql

mysql -h -u FromManageUsersSSHEnabled -p DatabaseFromDatabase < DatabasOldName.sql 

**I also tried running the following command from PHPMyAdmin, but I get the same error:**
GRANT ALL PRIVILEGES ON *.* TO $ 'UsernameFromUserAcess'@''

ERROR 1045 (28000): Access denied for user 'UsernameFromUserAcess'@'' (using password: YES)

**Steps until now:**
2. The connection is giving me my real IP address, not my local IP address.
Last login: Mon Apr 13 14:43:43 2020 from RealIPAddress
3. I can not grang priviliges, I tried all possible passwods.
4. SSH is granted from the UserManagement, not SFTP.
5. I tried google, but it does not help me.

You can view which users have access to that specific database at:

Panel > MySQL Databases

You can add your preferred user to the database there. Clicking an existing user name will load a form where you can grant/revoke privileges and check the user password, etc.

Thanks for the respons.

When I try to add the user it gives me:
Hey, USER already has access to this database!

To test if a connection is at all possible, use the password in shell so you can see that there are no typos:

$ mysql -h <DBhostname> -u <DBuser> -p<DBuserPass> <DBname>

Note that there is no space between the -p and the password.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.