wamp服务器mysql用户名和密码
我安装了wamp,我想知道如何在mysql中创建用户名和密码。
I have wamp installed , I want to know how to create username and password in mysql.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我安装了wamp,我想知道如何在mysql中创建用户名和密码。
I have wamp installed , I want to know how to create username and password in mysql.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(14)
默认情况下,您可以使用用户名:root 和空白密码在 http:// localhost/phpmyadmin 访问数据库。
登录 PHPmyAdmin 后,单击“权限”选项卡。以及位于用户概览表下的添加新用户链接
By default, you can access your databases at http:// localhost/phpmyadmin using user: root and a blank password.
Once logged in PHPmyAdmin, click on the Privileges tab. and on the Add a new user link located under the User Overview table
转到 http://localhost/phpmyadmin 并单击“权限”选项卡。有一个“添加新用户”链接。
Go to http://localhost/phpmyadmin and click on the Privileges tab. There is a "Add a new user" link.
由于没有密码,请按 Enter 键。输入以下命令:
就是这样,为了简单起见,我保留相同的密码。如果您想检查用户的表以查看信息是否已更新,只需输入如下所示的附加命令。这是一个很好的选择,可以检查您是否确实为所有主机输入了相同的密码。
Hit enter as there is no password. Enter the following commands:
That’s it, I keep the passwords the same to keep things simple. If you want to check the user’s table to see that the info has been updated just enter the additional commands as shown below. This is a good option to check that you have indeed entered the same password for all hosts.
只需转到 MySql 控制台即可。
如果使用 Wamp:
就是这样。
这会将您的 root 密码设置为机密
为了将用户权限设置为默认权限:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');
效果就像一个魅力!
Simply goto MySql Console.
If using Wamp:
That's it.
This set your root password to secret
In order to set user privilege to default one:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');
Works like a charm!
以前的答案可能不适用于更高版本的 mysql。如果以前的答案对您不起作用,请尝试以下步骤:
单击 wamp 图标 &rarr:mysql → mysql 控制台
编写以下内容命令,一一
Previous answers might not work for later mysql versions. Try these steps if previous answers did not work for you:
Click on the wamp icon &rarr: mysql → mysql console
write following commands, one by one
您可以使用
MySQL
创建一个用户,如下所示:如果您想针对特定数据库执行此操作,只需在
MySQL
中写入:注意,这都是一句话,还请注意您需要更改:
You can create a user using
MySQL
like this:and if you want to do that for a specific database, simply you can write in the
MySQL
:Note that it's all one sentence, also note that you need to change:
登录 http://localhost/phpmyadmin/ 即可
只需使用用户名:root
密码:
空白密码 。
然后选择用户帐户。然后选择添加用户帐户。
Just login into http://localhost/phpmyadmin/
with username:root
password:
with blank password.
And then choose users account.And then choose add user account.
WAMP 服务器 – MySQL – 重置 Root 密码 (Windows)
以管理员身份登录到您的系统。
点击Wamp服务器图标> MySQL > MySQL 控制台
输入密码:LEAVE BLANK AND HIT ENTER
mysql> UPDATE mysql.user SET 密码=PASSWORD('MyNewPass') WHERE User='root';进入
查询OK
mysql>FLUSH PRIVILEGES;进入
mysql>退出 ENTER
mysql>再见
编辑名为“config.inc.php”的 phpmyadmin 文件,输入 'MyNewPass' ($cfg['Servers'][$i]['password'] = 'MyNewPass';)
重新启动所有服务
WAMP Server – MySQL – Resetting the Root Password (Windows)
Log on to your system as Administrator.
Click on the Wamp server icon > MySQL > MySQL Console
Enter password: LEAVE BLANK AND HIT ENTER
mysql> UPDATE mysql.user SET Password=PASSWORD(‘MyNewPass’) WHERE User=’root’; ENTER
Query OK
mysql>FLUSH PRIVILEGES; ENTER
mysql>quit ENTER
mysql>bye
Edit phpmyadmin file called “config.inc.php” enter ‘MyNewPass’ ($cfg['Servers'][$i]['password'] = ‘MyNewPass‘;)
Restart all services
Clear all cookies – I got the No password error and it was because of the cookies. (ERROR 1045: Access denied for user: ‘root@localhost’ (Using password: NO))
更改或添加 Wamp 服务器的用户名和密码
如果您看不到该选项卡,请转到 phpmyadmin 的主页,而不选择任何数据库。
Changing or Adding UserName and Password for Wamp server
If you cannot see the tab,then go to Home page of phpmyadmin without selecting any DB.
这里是有关创建新用户帐户的 MySQL 文档。
简而言之,您可以通过运行
CREATE USER 来创建用户
语句:创建用户后,您可以使用
GRANT
语句。Here is the MySQL documentation on creating new user accounts.
In short, you create a user by running a
CREATE USER
statement:Once the user is created, you give him access to do things by using the
GRANT
statement.使用http://localhost/sqlbuddy -->用户界面。
您可以在本地主机主页的
您的别名
部分找到它。Use
http://localhost/sqlbuddy --> users
interface.You can find it at the localhost main page at
Your Aliases
section.转到 phpmyadmin 并单击左侧栏中您已经创建的数据库。然后您可以在顶部看到一个权限选项。您可以在其中添加一个新用户。
如果您还没有任何数据库,请转到 phpmyadmin 并选择数据库,然后只需在字段中提供数据库名称并按“开始”即可创建数据库。
Go to phpmyadmin and click on the database you have already created form the left side bar. Then you can see a privilege option at the top.. There you can add a new user..
If you are not having any database yet go to phpmyadmin and select databases and create a database by simply giving database name in the filed and press go.
Darkcoder 的解决方案是唯一适合我的解决方案。 (WAMP 服务器 2.5,其中包括 mysql 5.6.17。+ 客户端是 Workbench 6.3)
为了让任何其他用户(默认 root 除外)能够看到 Workbench 中的架构,我必须为每个附加用户创建 3 次。
另外,我注意到,为了使授予的权限真正起作用(全局权限和每个数据库权限),我必须确保所有 3 个不同的用户+主机组合的所有权限完全相同。
Darkcoder's solution is the only one that made it work for me. (WAMP server 2.5, which includes mysql 5.6.17. + client is Workbench 6.3)
In order for any additional user (other than the default root) to be able to see the schemas in Workbench, I had to create 3 times each additional user.
Also, I noticed that in order for the granted privileges to really work (global and per database ones), I had to make sure all privileges were exactly the same for all the 3 different user+host combinations.
我尝试使用用户名“admin”登录,它让我进入,但没有任何权限,我不知道这一点。然后我尝试使用用户名“root”,然后我拥有了权限,因此我将权限更改为其他用户。这两个用户名都不使用密码,因此我将其留空。
I was trying to log in with the username "admin" and it let me got in, but without any privileges and I did not know that. Then I tried with the username "root", and then I had privileges so I changed the privileges to the other users. Both usernames do not use passwords, so I leave them blank.