Phpmyadmin - Mysql no privileges

2019-02-21 00:23发布

问题:

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'

回答1:

Thank God and to all helped.

Its simple.

  1. Must! click logout icon in phpadmin page

  2. In login page, type:

username:root password: (blank)

surprise. now you can happily create your database.



回答2:

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.



回答3:

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.



回答4:

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.



回答5:

username ought to be root and keep the password null(keep the password field blank)



回答6:

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.



回答7:

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.