Xamp 8.1.1 Access denied for user 'root'@'localhost

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Xamp 8.1.1 Access denied for user 'root'@'localhost

Postby Enigmisth » 05. January 2022 20:11

Good morning,

I just installed xamp 8.1.1 on a new pc just bought.

When I start wordpress

localhost / xxx / wp-admin

Any data I enter, the password is correct, gives me an error
"A critical error has occurred on your website"

Search in file

C: \ xampp \ apache \ logs \ error.log I find written

[Wed Jan 05 20: 10: 50.408402 2022] [php: error] [pid 26016: tid 1812] [client :: 1: 63412] PHP Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'root' @ 'localhost' ( using password: YES) in C: \\ xampp \\ htdocs \\ viv \\ wp-includes \\ wp-db.php: 1656 \ nStack trace: \ n # 0 C: \\ xampp \\ htdocs \\ viv \\ wp-includes \\ wp-db.php (1656): mysqli_real_connect (Object (mysqli), 'localhost', 'root', 'root', NULL, NULL, NULL, 0) \ n # 1 C: \ \ xampp \\ htdocs \\ viv \\ wp-admin \\ setup-config.php (310): wpdb-> db_connect () \ n # 2 {main} \ n thrown in C: \\ xampp \\ htdocs \ \ viv \\ wp-includes \\ wp-db.php on line 1656, referer: http: //localhost/viv/wp-admin/setup-config.php? step = 1 & language = it_IT

I can't find the cause of the problem. Do you have any ideas?
Enigmisth
 
Posts: 2
Joined: 05. January 2022 20:05
XAMPP version: 8.1.1
Operating System: Windows 10

Re: Xamp 8.1.1 Access denied for user 'root'@'localhost

Postby Altrea » 05. January 2022 21:43

Hi,

are you sure the password you told wordpress is correct?
By default user root does not have any password.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11934
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Xamp 8.1.1 Access denied for user 'root'@'localhost

Postby Enigmisth » 05. January 2022 22:00

Yes, 1000% safe

In the meantime that the post has been approved I tried to install version 7.4.27 and it works fine without problems.

So I'd say the problem is version 8
Enigmisth
 
Posts: 2
Joined: 05. January 2022 20:05
XAMPP version: 8.1.1
Operating System: Windows 10

Re: Xamp 8.1.1 Access denied for user 'root'@'localhost

Postby Altrea » 05. January 2022 22:06

Enigmisth wrote:So I'd say the problem is version 8

Very unlikely that there is a serious problem already in the mysqli connect functions of PHP 8.1.1.
Which Wordpress version did you use?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11934
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Xamp 8.1.1 Access denied for user 'root'@'localhost

Postby Altrea » 06. January 2022 00:34

I have tested it by myself now and was able to install Wordpress 5.9 RC1 on XAMPP 8.1.1-2.
Earlier versions like the Stable Wordpress 5.8.2 are not compatible with PHP 8.1

But this still does not explain your error message. Even with Wordpress 5.8.2 i could only get your error message if i used a wrong database user password.
The error trace with correct credentials you will get is this:
[05-Jan-2022 23:33:18 UTC] PHP Fatal error: Uncaught mysqli_sql_exception: Unknown column 'wp_' in 'field list' in C:\xampp\htdocs\wordpress\wp-includes\wp-db.php:2056
Stack trace:
#0 C:\xampp\htdocs\wordpress\wp-includes\wp-db.php(2056): mysqli_query(Object(mysqli), 'SELECT wp_')
#1 C:\xampp\htdocs\wordpress\wp-includes\wp-db.php(1945): wpdb->_do_query('SELECT wp_')
#2 C:\xampp\htdocs\wordpress\wp-admin\setup-config.php(317): wpdb->query('SELECT wp_')
#3 {main}
thrown in C:\xampp\htdocs\wordpress\wp-includes\wp-db.php on line 2056
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11934
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 175 guests