开发者

How do I run PHP in a local browser using Ubuntu

开发者 https://www.devze.com 2023-01-19 03:43 出处:网络
I\'m getting this error when I attempt to run phpMyAdmin from XAMPP. There was an existing mysql installation on this machine previous to my installation and running of XAMPP. When I start XAMPP both

I'm getting this error when I attempt to run phpMyAdmin from XAMPP. There was an existing mysql installation on this machine previous to my installation and running of XAMPP. When I start XAMPP both mysql and apache2 start up successfully. I can access the mysql database with a PHP script but not throu开发者_如何学Gogh phpmyadmin.

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.


If you want to access mysql as root without a password, in your /xampp/phpMyAdmin/config.inc.php file ensure the following variables are being set:

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;


Do you have a password set for the root user? You shouldn't connect via root but check that. I also recall having issue with one of the version of phpmyadmin where I wasn't allowed to log in with the root user.

0

精彩评论

暂无评论...
验证码 换一张
取 消