phpmyadmin - Mysql 没有权限
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11755214/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Phpmyadmin - Mysql no privileges
提问by Amrita
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?
我在 Windows 7 上安装了 wamp 2.1。但是,当我打开 phpMyAdmin 时,出现错误,Mysql 'No Provileges'。我卸载了 wamp 并重新安装了几次,但没有帮助。有谁知道如何解决这个问题?
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'
此外,当我尝试从 mysql 控制台创建数据库时,出现以下错误:错误 1044 <42000>:用户 ''@'localhost' 对数据库 'a_db_name' 的访问被拒绝
回答by Adzin
Thank God and to all helped.
感谢上帝,感谢所有帮助过的人。
Its simple.
这很简单。
Must! click logout icon in phpadmin page
In login page, type:
必须!单击 phpadmin 页面中的注销图标
在登录页面,输入:
username:root password: (blank)
用户名:root 密码:(空白)
surprise. now you can happily create your database.
惊喜。现在您可以愉快地创建您的数据库了。
回答by Jacob
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.
您是否以 root 身份登录 MySQL?在以 MySQL 根用户身份登录时,您必须明确授予“常规”MySQL 用户帐户的权限。
First set up a root account for your MySQL database.
首先为您的 MySQL 数据库设置一个 root 帐户。
In the terminal type:
在终端类型中:
mysqladmin -u root password 'password'
To log into MySQL, use this:
要登录 MySQL,请使用以下命令:
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.
要设置权限,使用 skip-grant-tables 选项手动启动服务器,请打开 mysql 客户端并手动更新 mysql.user 表和/或 mysql.db 表。不过,这可能是一项乏味的任务,因此如果您需要的是一个具有所有权限的帐户,我将执行以下操作。
Start the server with the skip-grant-tables
option
使用skip-grant-tables
选项启动服务器
Start mysql client (without a username/password)
启动 mysql 客户端(没有用户名/密码)
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 命令创建一个新帐户(但用您想要使用的任何内容替换用户名和密码。
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 thisMySQL docs.
请参阅此MySQL 文档。
回答by bikedorkseattle
Take a look at my topic regarding this issue, which takes some of the above.
看看我关于这个问题的主题,它需要上面的一些内容。
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.
您需要关闭您的 mysql 安装并正确地从命令行重新启动它,如上所示。在我的主题中,我对如何执行此操作有完整明确的说明。我的说明适用于 MAMP,但您应该能够针对您的安装进行调整。
回答by Chiragit007
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.
简单的解决方案。只需在 PhpMyAdmin 中找到“主页”右侧的图标,然后单击即可注销。然后使用用户名“root”和密码“”(空白)登录。这将相应地起作用。
回答by Soumee
username ought to be root and keep the password null(keep the password field blank)
用户名应该是 root 并保持密码为空(保持密码字段为空)
回答by user3107673
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.
右键单击 wamp 图标并转到 mysql 控制台。如果您设置了密码,请使用密码登录。默认情况下,密码为空,用户名是“root”一旦您在 mysql 提示符下执行 FLUSH PRIVILEGES; 现在退出命令提示符,你就可以开始了。
回答by mahdi shamsi
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.
在步骤 1 中。您的数据库非常重要。在第 2 步中,通过所有表选择您的数据库。在第 3 步中。备份类型=替换和导出。在第 4 步中,在我的 sql 中导入数据库。请注意:在导入您的数据库...所有表必须在步骤 4 中查看和选择。