I'm installing MySql 5.1 on Windows using Installer.
On the security options step, I didn't check Modify Security Settings and go next
And I got Access Denied message when want to log in as root
Access Denied for user root# localhost (using password:No)
What's wrong and why?
If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. But its not clear how you tried to login as root.
Anyway you can RESET the root password by following these steps.
Related
I have installed Xampp on windows 10 to create a simple app to understand how to use Laravel. I have the last version of Xampp. I configure PHP correctly (with path and so on), but I have a problem with MySQL.
I put the MySQL bin folder address in the user variables path (section in the system properties). In this way, my prompt command recognizes the mysql command. The problem arrives when I write this command: mysql -v. I tried a lot of things, but this Error remains:
ERROR 1045 (28000): Access denied for user 'personalUser'#'localhost' (using password: NO)
PS: personalUser is a generic name to indicate the name of my user.
I have tried to substitute the MariaDB with MySQL in the Xampp folder (I don't know why Xampp has the MariaDB version instead of MySQL). I redownload Xampp twice times. In the xampp folder, in the phpMyAdmin folder, in the file config.inc.php, I changed this command line:
$cfg['Servers'][$i]['password'] = ''; with $cfg['Servers'][$i]['password'] = 'NO';
I tried other things.
Based on the error message you are receiving, it seems that the issue is related to the authentication credentials for the MySQL server. The error message indicates that the user 'personalUser' is not allowed to access the MySQL server because they are not using a password.
To fix this issue, you can try the following steps:
Open the MySQL command-line client by running the mysql command in your terminal or command prompt.
When prompted for a password, enter the password for the user 'personalUser'.
If you do not know the password, you may need to reset it by following the steps in this MySQL documentation: https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
Once you have successfully authenticated with the MySQL server, you can use the GRANT command to grant the 'personalUser' user access to the database you want to use. For example, to grant access to the 'mydatabase' database, you can use the following command:
GRANT ALL PRIVILEGES ON mydatabase.* TO 'personalUser'#'localhost';
After granting the appropriate privileges to the user, you should be able to access the MySQL server and use it with Laravel.
If you continue to have issues, you may need to check the configuration of the MySQL server to make sure that it is set up to allow access from the user 'personalUser'. You can refer to the MySQL documentation for more information on how to configure user access: https://dev.mysql.com/doc/refman/8.0/en/adding-users.html
This may be a noob question.
But I have tried everything, purging and reinstalling trying to reconfigure and the works.
For some reason my root that was set without a password on localhost is denying me access
I have tried to reset the root password using the command line but to no avail.
Does anybody know how to get this error to be fixed?
ERROR 1045 (28000): Access denied for user 'devin'#'localhost' (using password: NO)
I am using linux and ubuntu
Even though you set your root user to login without a password, this does not mean that user devin has been configured to login without a password.
Edit your .my.cnf file:
vi ~/.my.cnf
In the file which you see, hard code the password for user devin, save the file, then exit.
[client]
user=devin
password=your_password_goes_here
Then restart MySQL and devin should be able to login without using a password.
The following command should work to connect you to a database called my_db:
mysql --user=devin my_db
I have installed MYSQL 5.6 stand-alone on a local windows server. Recently, I changed the local IP of my server and reconfigured it in my network, but now I am not able to access my databases. It is giving me this error:
1045 - Access denied for user 'user'#'localhost' (using Password: Yes)
The above error is coming while using localhost as the server name. Also, I am able to connect to localhost through root username, but it is not showing me the original DB's which I had before.
Also before the server IP change I was able to access the MySQL server through the old IP of the server. like host name: xx:xx:xx:xx , user: user, pass: pass .... But it is also giving me an error:
2003 - cannot connect to my sql server on 'xx:xx:xx:xx' (10038)
I have tried the solution define on following link and run following query:
https://dev.mysql.com/doc/mysql-windows-excerpt/5.6/en/resetting-permissions-windows.html
SET PASSWORD FOR 'root'#'%' = PASSWORD('test');
and this is starting giving error of access denied for the root username and password 'test'
Can any body help me to resolve this.
Connect to 127.0.0.1 as root.
Update IP address for mysql user row with old IP address.
use mysql;
update user set host='NEWIP' where host='OLDIP' and user='root';
flush privileges;
Try again to connect.
If you don't have root access, reset permissions and try again.
http://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html
This is a problem experienced by people who downloaded the recent version (i.e MySQL 5.7.10)
The problem is there is a temporary password for this version
after you typed in bin>mysql -u root -p ...
you have to type in the password which is different for every person who downloaded it. Go to your mysql directory in C (or wherever you extracted it to) , go to the file 'data'. There would be an ERR file with your computer's name on it.
Open that file using notepad
in the 6th line of commands, there would be a line as follows
[Note] A temporary password is generated for root#localhost: '(your password)'
copy that password and paste it in the command prompt ... From there on you can continue as shown in the video
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 using IIS with PHP, PHPMyAdmin and mysql. They were installed separately. When mysql was installed, I was given the option to and went ahead with setting a password. I can use phpmyadmin using the same password, but when I test my database connection I receive the error Access denied for user ''#'localhost' (using password: NO).
I've been all over forums and youtube looking for a possible solution but haven't been able to get anywhere. I have disabled my firewall and attempted to allow mysqld through it separately and still no results.
PHPMyAdmin resides in my wwwroot folder for IIS and mysql is in my C:/Progam Files folder. Is this the possible issue or is this set up okay?
Additionally, I've reviewed my config files and all have the same matching password. My user is root and all config files have that as well. PHPMyAdmin accepts that as the user.
What it seams to me is that your phpMyAdmin is not correctly configured. You lack username and password options thus you cannot connect. You should review: http://docs.phpmyadmin.net/en/latest/config.html#basic-settings and look for $cfg['Servers'][$i]['nopassword'] option. It should be disabled.
P.S.: Do you get username/password prompt from phpmyAdmin ?
It looks like you are giving user as username under config.inc.php without any password..
You can either provide the correct password for username user
or
You can provide the same username and password which lets you login to mysql from command prompt..