我正在运行WAMP最新版本
一切都很好.......
我打开phpMyAdmin并为用户添加了用户和密码
现在我无法进入phpMyAdmin,除非我将身份验证类型设置为cookie
然后我可以用我的用户名登录,没有密码.....但我有密码....
此外,MySQL控制台现在也会在没有密码的情况下登录....
我做了什么?
PHP config.ini
如下所示:
<?php
/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$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'] = 'USERNAME';
$cfg['Servers'][$i]['password'] = 'PASSWORD';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* End of servers configuration */
$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
?>
下一个MySQL ini文件如下所示:
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:\mysql\data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = MYPASSWORD
port = 3306
socket = /tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[wampmysqld]
port = 3306
socket = /tmp/mysql.sock
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
basedir=c:/wamp/bin/mysql/mysql5.5.24
log-error=c:/wamp/logs/mysql.log
datadir=c:/wamp/bin/mysql/mysql5.5.24/data
我所做的一切都是打开phpMyAdmin并添加了一个新用户
我需要做的是从phpMyAdmin
中删除这两个用户THEN
添加具有完全权限和密码的用户,并使其匹配 phpMyAdmin config.ini文件
我应该可以从mysql命令控制台执行所有这些操作,但我需要一些命令帮助。
如果我可以添加一个用户并将该信息放入phpMyAdmin config.ini文件中,我只需要进入它并且我可以修改我需要的内容。
我今天将SQL恢复到中午,这解决了我的问题,但我之所以遇到这个问题的原因是因为我试图将访问应用程序数据库加载到sql中并且它一直告诉我我没有访问权限。但是当我使用相同的凭据登录phpMyAdmin时,一切都很顺利。