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
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
I have added a user to a database through cPanel called "DB-USERNAME". My cPanel user is "USERNAME". When I am trying to connect to this server, I get a message saying:
Error: (conn=10219304, no: 1045, SQLState: 28000) Access denied for user 'USERNAME_DB-USERNAME'#'85-76-48-128-nat.******.fi' (using password: YES)
However, I can login with just the cPanel user just fine. If I try to make any changes, like create a new database or connect to one, I get:
Error: ER_DBACCESS_DENIED_ERROR: Access denied for user 'USERNAME'#'%' to database 'test'
What can I do? I have been stuck with this for a few days now. I can't resolve this with google.
Did you join your user name with database in Cpanel, if no then
Please follow below mentioned steps to add a MySQL user to a database:
Click MySQL Databases under Databases in cPanel.
2.Under Add User to Database, select the user that you want to add from the User drop-down menu.
3.In the Database drop-down menu, select the database.
4. Click Add.
5. Select the privileges you want to grant the user, or click ALL PRIVILEGES to grant the user all permissions to the database.
6. When ready, click Make Changes.
7. That’s it! You can now see the user assigned to the database in the Current Databases table.
Now check if your issue fixed, if still not fixed then Please check our db connection string.
I have wamp running locally on my computer and was working just fine. I have a web application based on PHP and MySQL. I am using a password for the connection.
Suddenly, I got the following error:
MySQL ERROR 1045 (28000): Access denied for user 'root'#'localhost'
(using password: YES)
I tried to follow the answers of this post on stack. But nothing worked.
Ounce I open the mysql cmd and write down the password, it will close immediately.
I even used MySQL workbench, and I was successful to enter but on a different user with password. But the user I am using where my databases resides, is not accessible anymore.
I have a db called ncd, where I can see it on the other user but as empty.
Could I restore the data from wampserver ?
You can check your db on /mysql/ folder and them store it. And move to another mysql with another account and restore your db with same folder as above me talk it.
I have to create a database in a Windows Server 2008 remote machine, which already had MySql Server 5.5 and MySql Workbench 5.2 installed. Since I wasn't granted the password to the root user, I tried to create a new user.
In MySql Workbench I tried to open the Manage Security option, to no avail, since it asked for the password.
In the command prompt I tried to run mysql but it returned the following error message.
ERROR 1045 (28000): Access denied for user 'ODBC'#'localhost' (using password: NO)
Is there any way to create a new user without having prior access to the root user?
More generally, is there any workaround to create and use a database without access to root?
You don't have to be the root user, but you must have rights to create a user. You can get those rights with the grant create user statement. Apparently, you don't have those privileges, so if you need them, you should ask your administrator.
So the answer is: There is no workaround. You don't have to be root, but you must have certain privileges.
In practice, if you need an extra user, the administrator is more likely to create one for you than to give you the rights to create them yourself. But that's something he and you need to figure out yourselves. :)
I get the error #1045 - Access denied for user 'root'#'localhost' (using password: NO)
after I accidentaly changed the password in phpmyadmin for root and 127.0.0.1 . the problem is i cannot change common.lib.php. I want to revert these changes in mysql somehow... Doe to the security of the server i cannot change much
I hope you can access the mysql server administration. As I know the root is the main user in MySQL it'll be a problem if you cannot access it. If you have a user with the same level, try to change the password there if possible.
Here's the step on how to reset the root password in MySQL
How to Reset the Root Password
I was also dependent in phpmyadmin before until I know sqlyog and MySQL Query Browser and WorkBench. Have a look on this as an alternative on phpmyadmin.
Download MySQL Workbench
SQLyog free download
It's been a while since I've used phpMyAdmin, but if I'm not mistaken, it stores it's passwords in the mysql database it self. So, if you are able to get access to the command-line of the server, you are able to change the password using simple SQL statements.
Go to /etc/phpmyadmin folder.
Open config-db.php
Here you will find your default username and password