When I try to check the mysql version using terminal I get the following error.
KillBill:~ KillBill$ mysql -v
ERROR 1045 (28000): Access denied for user 'KillBill'#'localhost' (using password: NO)
but when I do the following and add the password it works and logs me into MYSQL prompt.
KillBill:~ KillBill$ mysql -u root -p
Why am I getting the following error on mysql -v prompt only. What do I do to fix it? Everything else is working fine, I can connect to mysql db in the apps I am developing no problem whatsoever.
Any help will be highly appreciated. Thank you!
If you start the mysql client without givinng the -u option, it assumes you want to login with the current username, in your case KillBill. If this user isn't a mysql user or is a mysql user, but has to specify a password to login, the user will be refused a connection.
Login as "root", create a mysql user names "KillBill" and assign a password. Have look here for the syntax of that. Then assign appropriate rights using the GRANT statement.
Related
I have successfully installed postgresql and added path to my environment variable in windows 10. But the problem is when i try to run psql postgresql in command prompt it gives error saying
C:\Users\adity>psql postgres
Password for user adity:
psql: error: could not connect to server: FATAL: password authentication failed for user "adity"
I am 100% sure my password is correct I have tried reinstalling and uninstalling many time in case i missed password but every time it gives me same error. Although when i try to run from GUI it starts running. This is frustrating and I am not sure what the problem is.
The database superuser that was created during database cluster creation is very likely called postgres.
So rather than using the default, which is to use the database user whose name is the same as your current operating system user, explicitly specify the database user postgres:
psql -U postgres
Installed XPEnology operating system, and using package manager installed MariaDB and phpMyAdmin.
Tired to login to phpMyAdmin http://WEB/phpMyAdmin and receiving a 'Cannot connect to local server' error message.
In the control panel enable SSH.
Login to SSH using Putty (http://www.putty.org), using the username and password you originally set up the XPEnology with.
Issue this command, changing the *** to your password
mysqladmin -u root password *******
You should now be able to login to phpMyAdmin on Synology. Username should be 'root'
i installed Mysql on Windows 7, i used mysql with mysql command line client & i also use Mysqldump in windows cmd, it was working without any problem.
But today, i tried to export database using mysqldump with this command in cmd
mysqldump –u root -p mypassword db_name > f:\mydb.sql
i tried many other commands and i always see error
Access Denied for User 'ODBC'#'localhost' (using password: yes) when trying to connect
as you can see, in mysqldump command i am using root as user then why i get user ODBC error ? one more thing, using mysql command line client i am still using mysql normally without any problem using root as user. Thanks
I'm trying to set up postgresql to run locally on my windows machine. I've downloaded psql from postgresql.org and installed it. However, whenever I try to run the psql command from the command line it prompts me for a password that I never gave it for a user it seems to have automatically generated based on the user name of my computer.
In Powershell:
PS C:\Users\Theophilus> psql
Password:
psql: FATAL: password authentication failed for user "Theophilus"
Nothing I would use as a password works in this case. I've uninstalled and reinstalled postgres from my windows machine to see if maybe there was somewhere to input a password but I found nothing.
Additionally, running psql with the default username of 'postgres' results in the same problem.
PS C:\Users\Theophilus> psql -U postgres
Password for user postgres:
psql: FATAL: password authentication failed for user "postgres"
Hopefully someone can help me.
That's because you're not providing a username in the command so it's using your current username that you're logged in as which doesn't have permission. You should use the postgres account.
c:\path\to\psql.exe -U postgres
So in your case
PS C:\Users\Theophilus> psql -U postgres
https://wiki.postgresql.org/wiki/First_steps
I used blog entry by Robby on Rails site:
http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition
Got to the end, but when I tried accessing the pg database I was denied.
I've tried to change pg_hba.config file to trust so that I can gain access anyway (without a password), but proved fruitless.
Please help. Thanks in advance.
Restart postgresql after you alter the pg_hba.config file to make sure your changes are read. Next, type
psql -U myUser template1
in a terminal, where myUseris the name of the user running the postgres proces. That should make you log in as administrator. Next, in the psql session, write
ALTER USER realUser PASSWORD 'myNewPassword';
in order to reset the password. Here realUseris the user of the database you are trying to connect to.