MYSQL密码设置问题?神啊!救救我吧(大分享送)

funnu 2002-02-28 02:30:07
谁能告诉我怎样在MYSQL设置超级用户密码?在应用PHPADMIN中的身份认证如何设置,有相关的资料联结给我把,本人一定送分。
...全文
148 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
RobinCat 2002-03-02
  • 打赏
  • 举报
回复
建立一个超级用户.下面是需要输入的代码。
mysql>GRANT ALL PRIVILEGES ON *.* TO RobinCat@localhost IDENTIFIED BY '1234' WITH GRANT OPTION;
// RobinCat是用户名
// 1234是密码~

phpmyadmin只须修改config.php3.ini如下:
$cfgServers[1]['host'] = '数据库服务器IP';
$cfgServers[1]['port'] = '';
$cfgServers[1]['adv_auth'] = false;
$cfgServers[1]['stduser'] = 'root';
$cfgServers[1]['stdpass'] = '';
$cfgServers[1]['user'] = '数据库用户名';
$cfgServers[1]['password'] = '密码';
$cfgServers[1]['only_db'] = '数据库名称';
$cfgServers[1]['verbose'] = '';

——明了吧??嘿嘿~
anybody1 2002-03-01
  • 打赏
  • 举报
回复
一种是:[root@MyHost mysql]#.bin/mysqladmin -u root -password[newpassword]
另一种是:
mysql>SET PASSOWRD FOR root=PASSWORD('newpassword');

newpassword是指新的root的用户密码

php myadmin同上
lvxing 2002-02-28
  • 打赏
  • 举报
回复
mysql root 密碼的設置方法

shell> mysql -u root mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');

If you know what you are doing, you can also directly manipulate the privilege tables:

shell> mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('new_password')
-> WHERE user='root';
mysql> FLUSH PRIVILEGES;

Another way to set the password is by using the mysqladmin command:

shell> mysqladmin -u root password new_password

註明: windows 用戶第一次運行 winmyadmin 會要求輸入並設置 root password


PHP Myadmin 請修改

config.inc.php

默認是 user = root; pwd =空
簡單方式修改
$cfgServers[1]['auth_type'] = 'config';
變成
$cfgServers[1]['auth_type'] = 'http';
這樣在運行 myadmin 時會要求你輸入 user/pwd 登入

如果想自動進入
$cfgServers[1]['user'] = 'root';
$cfgServers[1]['password'] = '';

改這裡的用戶和密碼

21,891

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧