Der*_*rek 13 mysql ruby-on-rails phpmyadmin mysql-error-1045
想要开始使用Ruby on Rails,所以我安装了即时轨道并设置了一个mysql密码.问题是现在我无法访问phpmyadmin.
从rails控制面板,当我去配置>>数据库(通过PhpMyadmin)时,它会打开phpmyadmin并显示消息
Run Code Online (Sandbox Code Playgroud)Error MySQL said: Documentation #1045 - Access denied for user 'root'@'localhost' (using password:没有)
当我在设置密码后使用XAMPP而不是直接在phpmyadmin中使用XAMPP时(因为它没有密码)它转而使用了登录屏幕.使用即时导轨并非如此.当他们第一次设置mysql密码并使用即时rails包时,有人遇到过这个问题吗?
Vik*_* Ck 20
编辑你的phpmyadmin config.inc.php文件:
Config Page的路径是wamp\apps\phpmyadmin3.4.5\config.inc.php
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = '**your-root-username**';
$cfg['Servers'][$i]['password'] = '**root-password**';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
Run Code Online (Sandbox Code Playgroud)
检查 phpmyadmin 目录中 config.inc.php 中的以下几行
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'yourpassword';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Run Code Online (Sandbox Code Playgroud)
如果您的 root 帐户不使用任何密码,请将“AllowNoPassword”设置为“TRUE”
转到此目录“ xampp/phpmyadmin ”并打开config.inc.php文件。在 Mac 上,转到/Applications/XAMPP/xamppfiles/phpmyadmin。然后根据您的要求更改和配置以下代码。它和我一起工作。我安装了 MySQL 和 XAMPP 并成功运行。
$cfg['Servers'][$i]['controluser'] = 'Your Username';
$cfg['Servers'][$i]['controlpass'] = 'Your passwaord';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'Your Username';
$cfg['Servers'][$i]['password'] = 'Your password';
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
80997 次 |
| 最近记录: |