Access denied while using XAMPP on OS X Mavericks - mysql

Does anyone know why I would be getting an Access Denied error using XAMPP on OS X?
When I go to localhost/phpmyadmin I get the message #1045 - Access denied for user 'root'#'localhost' (using password: YES)
and when I go to just localhost I get
Access forbidden!
You don't have permission to access the requested directory. There is
either no index document or the directory is read-protected.
Is this a permissions issue? I added the password root to the username root in the phpmyadmin config file, but that didn't work and it wouldn't explain why I am getting the error on localhost as well. What IS working is the virtual host I created called my.server, but other than that, I seem to be locked out for some reason.

This error:
#1045 - Access denied for user 'root'#'localhost' (using password: YES)
Is a MySQL error. That's saying that there was an attempt to connect to the MySQL server, and either the specified user account doesn't exist, or the passwords don't match. From another client that can connect, verify the user account exists
SELECT u.user, u.host, u.password
FROM mysql.user
WHERE u.user = 'root'
AND u.host = 'localhost'
If the password column is empty, then there's no password on that account. If there's a '*688D...' value in there, you can compare the value of the hash of the password you're supplying...
SELECT PASSWORD('mysecretpassword')
Also, I'd recommend you create a DIFFERENT database user account (other than 'root'#'localhost', for use by your PHP scripts. (As one advantage, this will allow you to apply the security principle of "least privilege", granting only the privileges required.
The other error is saying that the webserver isn't configured to allow access to the URI you've specified, in the case of "http://localhost/", the webserver isn't configured to allow access to the ROOT of the webserver directory. (This is usually a really a good thing, in terms of security, not exposing the contents of this directory.)

Related

Can't connect to MySQL using user with password

I am setting up my local development environment using XAMPP for writing websites using Laravel.
The issue im facing is that I cannot connect to the MySQL database with any new user I create. I give one user limited privileges for only one database and cannot connect using the correct password.
I tried making an admin user with full privileges on all databases and tables, and still cannot connect with the correct password.
The returned error is always the same -
SQLSTATE[HY000] [1045] Access denied for user 'laravel'#'localhost' (using password: YES)
and
ERROR 1045 (28000): Access denied for user 'admin'#'localhost' (using password: YES)
where laravel is the username, admin is the other one etc.
This is not related to Laravel as I keep getting this error even when I try to connect from the command line (as shown in error code number 2).
The 'anonymous' user has been removed to make sure MySQL doesn't match it by mistake, I have flushed privileges and restarted services countless times.
The default root user without password can connect, but no new users that I create with passwords can.
Solved the problem by re-installing XAMPP, nothing else.

Error 1044 access denied for user ''#'localhost' to database

I just installed Wampserver and I'm trying to create a new database but once I type a name for it and click create, I get this error "#1044 - access denied for user ''#'localhost' to database".
I would appreciate any help.
When you login to MySQL, phpMyAdmin you have to use a real account.
WampServer sets the root account up without a password, so
Use Username = root
And leave Password = [blank]
Also WAMPServer installs both MySQL and mariaDB. Both are actually activated by default, so either disable the one you dont want to use (and switch the other to use port 3306) Or make sure you select the correct DBMS in the dropdown on the phpMyAdmin login page

Mysql - 1045 - Access denied for user 'user'#'localhost' (using Password: Yes)

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

When uncheck Modify Security Settings in MySQL Installtaion, Access Denied root#localhost

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.

PHPMyAdmin working but can't receiving "Access denied for user ''#'localhost' (using password: NO)" error

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..