1

我正在运行 WAMP 最新版本

一切都很好......

我打开了 phpMyAdmin 并为用户添加了用户和密码

现在我无法进入 phpMyAdmin,除非我将身份验证类型设置为 cookie

然后我可以用我的用户名登录,没有密码……但是我有密码……

MySQL 控制台现在也可以在没有密码的情况下登录......

我到底做了什么?

PHPconfig.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 中删除两个用户

然后

添加具有完全权限和密码的用户,并使其与 phpMyAdmin config.ini 文件中的内容相匹配

我应该能够从 mysql 命令控制台完成所有这些操作,但我需要一些命令帮助。

如果我可以添加一个用户并将该信息放入 phpMyAdmin config.ini 文件中,我只需要进入它,我就可以修改我需要的内容。


我今天将 SQL 恢复到中午,这解决了我的问题,但是我遇到这个问题的原因是因为我试图将访问应用程序数据库加载到 sql 中,它一直告诉我我没有访问权限。但是,当我使用相同的凭据登录 phpMyAdmin 时,一切都很好。

4

0 回答 0