连接到phpmyadmin

连接到phpmyadmin,php,sql,phpmyadmin,Php,Sql,Phpmyadmin,警告:mysql_connect[function.mysql connect]:拒绝使用密码对用户“root”@“localhost”进行访问:否 嘿,伙计们。当我尝试连接到phpmyadmin上的数据库时,我收到一个错误。我不知道为什么它拒绝访问。有人知道为什么会发生这种情况吗?转到phpMyAdmin 类型 第4页选项卡顶部是用户。单击它,您将看到一个简单的表,其中包含db server上所有用户的名称和权限,这似乎是一个很好的自我解释。你检查过根用户是否存在,但没有密码吗?@scrowl

警告:mysql_connect[function.mysql connect]:拒绝使用密码对用户“root”@“localhost”进行访问:否

嘿,伙计们。当我尝试连接到phpmyadmin上的数据库时,我收到一个错误。我不知道为什么它拒绝访问。有人知道为什么会发生这种情况吗?

转到phpMyAdmin

类型


第4页选项卡顶部是用户。单击它,您将看到一个简单的表,其中包含db server上所有用户的名称和权限

,这似乎是一个很好的自我解释。你检查过根用户是否存在,但没有密码吗?@scrowler我怎么做?我是新来的
$dbh = mysql_connect('localhost', 'root','');

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = TRUE; 
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

/*
http://localhost/phpmyadmin