I have taken the the following steps to transfer my sql database but yet I receive an error on the importing of the database onto the new server. It does not seem to recognize my username or password.
I think the problem is being caused by phpMyAdmin privilege settings. I am transferring my sql file from a server that runs phpMyAdmin (hostgator) to an unmanaged web server.
Here are the steps I took
mysqldump -u root_wrdp1 -p --opt root_wrdp1 > root_wrdp1.sql
Enter password:
I then scp'd the sql file to my new web server (that does not run phpMyAdmin).
scp rbl91_wrdp1.sql root#ip.of.the.server:~/
Then I did the updating of the database on the web server without phpmyadmin...
root#www:~# mysql -u root_wrdp1 -p root_wrdp1 < ~/root_wrdp1.sql
Enter password:
ERROR 1045 (28000): Access denied for user 'root_wprd1'#'localhost' (using password: YES)
The support by the site offered this advice but I have no idea how to implement the steps.
It's possible you have to review the authorization locations, such as the source location (IP) of the remote side.
Using phpMyAdmin i believe the page is Priviliages , and you will also
need to flush them after changing.
Thanks Support
It's a simple authentication problem. Most likely the "root_wrp1" account or password are set up incorrectly on the destination machine. You can check it just by trying to log in without importing the dump file:
$ mysql -u root_wrdp1 -p root_wrdp1
The account and password need to be set up and have adequate permissions to the database before you can restore the dump file.
Related
Hi I'm trying to get a mariadb/freeradius/daloradius server up but i keep getting this log from systemctl -xe on my mariadb/mysql service, i came across that after figuring it was the sql connection that was problematic, freeradius shows me the same :
I'm getting frustrated, i ran across almost every config file, all should be in order but no this keeps happening, the radius server is trying to connect to my root sql user when i pointed to him in his config file that he should use the one i created especially for him and i can't manage to understand why, do mariadb needs the root credentials before even allowing it to connect to it ? I'm clueless please help.
This message tell you. that either the credentials in your config is not ok or that root user is not authorized to login.
Best practice is to take your mysql config and try to connect with the mysql command:
mysql -h yourconfigurationhost -u yourconfiguration user -p yourconfiguration password yourconfigurationdatabase
Be shure doing this with your application user.
I am running the command line as an administrator and trying to perform a MySQLdump to grab a backup of a table on a remote server. I would just go to the server and grab a back up there but I have over 100 different servers to grab a backup from. Here is what I have:
C:\Program Files (x86)\MySQL\MySQL Workbench CE 5.2.47>mysqldump -P3306 -h172.30.0.40 -u root -p apha polldistribution >test.sql
Enter password: **********
mysqldump: Got error: 1045: Access denied for user 'root'#'10.213.213.11' (using password: YES) when trying to connect
I have tried to grant all on my local machine as well as the remote machine. I have also logged into the remote database using the exact same password, and it can access fine it just wont work when performing a dump. And I tried to migrate through MySQL workbench but I get the same error message when prompted for a password.
Once I am able to get through one server I can make a program to loop through them all. Its just a problem connecting. Hopefully someone has some insight on this. All I really need is to be able to get my backup. Any help at all is appreciated.
I'm trying to connect to a mariadb server remotelly using terminal, but I get a little issue about that.
Preconditions
I have connection to my remote server, and I can enter inside maria db using the next command
mysql -u root -p**** and I enter without problems.
Also I have commented this line of my.conf from the #bind-address = 127.0.0.1.
When I'm trying to do this from my computer mysql -u root -h mariadb.testing.des -p**** I get the following error in console
ERROR 1045 (28000): Access denied for user 'root'#'mariadb.testing.des' (using password: YES)
Why am I getting two different results using the same user? What am I doing wrong?
Thanks for the help,
Jaster.
It's not enough to ensure your server is reachable from remote. You also have to create a user which has privileges for the remote access to your desired schema. I strongly recommend not to create a remote root user with access to all. Best practice is to create a remote user for every single scheme.
In example:
CREATE USER 'jeffrey'#'my.remote.host' IDENTIFIED BY 'mypass';
GRANT ALL ON jeffreys_db.* TO 'jeffrey'#'my.remote.host';
See also:
https://dev.mysql.com/doc/refman/5.7/en/create-user.html
https://dev.mysql.com/doc/refman/5.7/en/grant.html
I have an issue with accessing MySQL using root and password.
I am trying to connect the Server using PuTTY SSH using
> mysql u root -p
For an unknown reason I can NOT access the Database and I am getting rejected with the following ERROR:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
The weird thing is that I am using the same password with PhpMyAdmin using Web and I can access everything. I need to run a script that will allow the SQL server
root#localhost user
run the query over the LAN and not the web.
Therefore I need the user to connect using command line SSH or something like that.
How can I fix that issue? the user rott and password WORKS just fine through PhpMyAdmin and not through SSH PuTTY, Why?
Is there something I need to do in order to fix this? I have been working with the Database for 2 years now using the web interface. Now I need to have it working using SSH (22).
Please assist.
thanks in advance.
Arye
It sounds like you need to update the your password for root on MySQL.
Check here: MySQL - ERROR 1045 - Access denied
Thank you all for your help. I have managed to overcome the issue: (see below)
That was FIXED Only when I changed from old password to new. in my.cnf file I have removed the flag for old_password=1 and Restart the service of MySQL.
Then I have created a NEW password (using the old one I had) and it was created with 41 (NEW) Hash length and not 16 (OLD)..
Then I did flush privileges as you recommended - and IT WORKS.
Thank You!
> mysql -h your_host_name -P your_port_number -u your_user_name -p
try with hostname option it should work!
Ubuntu 18.04 running MySQL 5.7.28 creates a file /etc/mysql/debian.cnf. It contains some credentials and other settings. So, this debian-sys-maint user is by default a root equivalent. It is used by certain maintenance scripts on Debian systems, and as a side-effect, allows users with root access on the box to view the plaintext password in /etc/mysql/debian.cnf. If your SSH using a client fails after a fresh install through root try using the credentials set in this file.
I'm trying to push my database to a remote mysql database hosted on ClearDB.
I'm using the command
mysql -u username#us-cdbr-east-*** -pmypwd dbname < mydb.sql
I'm getting the error
Access denied for user 'bbea98e4ba67c1#us-cdbr-east-**#localhost (using password YES)
Am i using the correct syntax ? I tried importing the same sql file to a local database and it happened smoothly.
DO i need to GRANT some proviledges to this remote database on heroku ? If yes then how should i do it ?
you should have privileges set on the database to be accessed from the remote host where you are trying to read in the dump. When creating access for a username you always specify a corresponding host. This could be % for any host... In that case you don't have to do anything. Sometimes it is set to a specific host, in which case you need to add a privilege for the same username but with a different host being the remote host.
Also you need the correct syntax would be:
mysql -u username -h us-cdbr-east-*** -pmypwd dbname < mydb.sql
notice the -h switch