Hi all and please help
I have been running XAMPP and PHPMyAdmin for a number of years on my PC. Both have served me well.
This morning I got an warning message basically saying give root a password because it was not secure. I did (or thought I had), but as a result Now all I can view is a database called information_schema.
I initially panicked, but then found that all my other test sites are working ok and I can still access them via their own username and password.
Therefore my question is: Please could anyone tell me how I can grant Global Privileges back on root#localhost? I have tried a number of things all morning but I get greeted either with a Syntax problem or a 1045 error message, saying Access Denied.
I welcome any help or advice. On the bright side, I have a password for root now!
When you change the password on the root userid from within phpMyAdmin, you then have to put that password into the phpMyAdmin config.
So edit \xampp\phpmyadmin\config.inc.php
Find this line
$cfg['Servers'][$i]['password'] = '';
and add the password to it
$cfg['Servers'][$i]['password'] = 'NEW_PASSWORD';
Ok. Sorted. In my case, I discovered that I had another global login and from the User list, I was able to grant global privileges for the root login once again
Related
I am trying to connect to a localhost instance of MariaDb on port 3306.
I'm well aware that root cannot use localhost because of MariaDb specifications so I created
another user from the command line with password 'root' and all privileges granted to my 'test' database:
CREATE USER 'myuser' IDENTIFIED BY 'root';
GRANT USAGE ON *.* TO 'myuser'#localhost IDENTIFIED BY 'root';
GRANT ALL privileges ON `test`.* TO 'myuser'#localhost;
FLUSH PRIVILEGES;
When I try to open a connection from DBeaver with the correct password and username, an error appears:
Access denied for user 'myuser'#'localhost' (using password: YES)
Current charset is windows-1251. If password has been set using other
charset, consider using option 'passwordCharacterEncoding'
Why does it happen? Is it because of some password hashing algorithms mismatch between DBeaver and MariaDB's instance? How do I fix this and connect successfuly?
You have to to go to DriverProperties and enter the encoding you have used to encode password(UTF-8). This is very common when you use docker image to run maria db on your local Refer the below image.
If you wanna fix this warning to all connections (not just single one) you need to configure driver's general properties.
In dbeaver go to Database -> Driver Manager
Edit MariaDB/MySQL driver
Tab Driver properties, Add new User property
passwordCharacterEncoding : UTF-8
Voila, it works for all connections use edited driver
Source: mariaDB driver's parameters
I had the same issue these days and didn’t find an answer online. I know it’s late, but for anyone who’s still suffering from this same problem, it’s seem to be a bug with Dbeaver or could be one...
Everytime I copy and paste the database and the username I get this exactly error! When I type it directly in the field I can connect successfully.
I would try this before getting mad
I think it's an encoding issue.
Before you create a new connection you should check the preferences here: encoding preferences
It worked for me as I changed it to UTF-8.
I installed wamp 2.1 on windows 7. However when i open phpMyAdmin, I get the error, Mysql 'No Provileges'. I uninstalled wamp and reinstalled it a few times, but it doesn't help. Does anyone know how to solve this issue?
Also, when i tried creating a database from mysql console, i am getting the following error:
ERROR 1044 <42000>: Access denied for user ''#'localhost' to database 'a_db_name'
Thank God and to all helped.
Its simple.
Must! click logout icon in phpadmin page
In login page, type:
username:root password: (blank)
surprise. now you can happily create your database.
Are you logging into MySQL as root? You have to explicitly grant privileges to your "regular" MySQL user account while logged in as MySQL root.
First set up a root account for your MySQL database.
In the terminal type:
mysqladmin -u root password 'password'
To log into MySQL, use this:
mysql -u root -p
Edit:
To set the privileges manually start the server with the skip-grant-tables option, open mysql client and manually update the mysql.user table and/or the mysql.db tables. This can be a tedious task though so if what you need is an account with all privs I would do the following.
Start the server with the skip-grant-tables option
Start mysql client (without a username/password)
Issue the command
flush privileges;
which forces the grant tables to be loaded.
Create a new account with the GRANT command something like this (but replacing username and password with whatever you want to use.
GRANT ALL on *.* to 'username'#'localhost' identified by 'password';
Restart the server in normal mode (without skip-grant-tables) and log in with your newly created account.
Refer this MySQL docs.
Take a look at my topic regarding this issue, which takes some of the above.
MAMP mysql broken root user
You need to shutdown your mysql install and restart it from the command line properly like is indicated above. In my topic I have full clear instructions on how to do so. My instructions are for MAMP but you should be able to adapt it for your install.
Simple solution. Just find the icon right to "home" in PhpMyAdmin and click to logout. Then login using username "root" and password ""(blank). This will work accordingly.
username ought to be root and keep the password null(keep the password field blank)
right click on the wamp icon and goto mysql console.
Login with password if you have set any.By default the password is blank and username is 'root'
Once you are in mysql prompt execute
FLUSH PRIVILEGES;
now quit the command prompt and you are good to go.
in step 1 .inter your databasevery important.
in step 2 .select your database via all tables .
in step 3. backup type=replace & export.
in step 4 import database in my sql.
attention please:in import your database...
all table must view & selected in step 4.
hey guys i have installed wamp server with mysql and i have one user root without password. but now i want create one another user with password. when i was create user with password and check his connection with mysql_connect() its give me error like this
Access denied for user 'Dest'#'localhost' (using password: YES)
But password is realy correct. what can i do? i was delete this user and create other user but i have the same problem. if anyone knows that problem please help me
Hey Guys Problem Has Been Solved. Problem was that when i was create user i was choose % this local and global hosts but for wamp global accses for sql base is disabled with defoult and i think poblem is that. when i create user with Localhost its worked fine. thanks all for help :)
If you try to connect as root and get the above error, it means that you do not have a row in the user table with a User column value of 'root' and that mysqld cannot resolve the host name for your client:
from the mysql prompt execute this command to be able to change any password
FLUSH PRIVILEGES;
for more information
https://help.ubuntu.com/community/MysqlPasswordReset
I have just added a new database and imported alot of backed up data to it because of a malfunction in the previous database.
I use php and have my own Ubuntu server.
I use phpmyadmin, and have set all privileges to the user.
I am positive the password, username and host are correct.
But I still get this "Access denied for user 'user'#'localhost' to database 'skuffen2'"
What should I do?
Do I need to set permissions somehow on the server?
Please guide me I am in deep need of help right now...
Thanks
login to mysql using root user, use mysql; select * from db where user where user_name=xxx; and check other table as well, most of the privileges settings are there, or just simply flush privileges;
I have my config.inc.php file, and have set my host name to localhost. Unfortunately, I have no idea what my username/password should be. Is that something I need to configure on the MySql side? I tried creating an arbitrary username/password (admin/password), but when I try to log into phpMyAdmin with those credentials, I get an error: (#1045 - Access denied for user 'admin'#'localhost' (using password: YES))
Can anyone point me in the right direction? (Sorry for the dumb question; I just haven't had to install mysql before. I've always had a host name / username / password given to me.)
Thanks!
root with no password.
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
here you have the default privileges in mysql, and how to change them.
http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html
What installation of mysql are you using? Without knowing that its very hard to know. I would recommend getting the wamp installation and remembering that the usual "normal" installation uses user name: root and no password
I had this problem before, you need to go and look up the password in the config files yourself, since phpMyAdmin's interface will hide the password from you. It's a pain... unfortunately I'm too lazy to install it myself and find exactly where it is for you.