Connect to MySQL using Windows Authentication

Is it possible to have WordpressPHP connect to my MySQL database using Windows Authentication on IIS? I can connect jus

Is it possible to have Wordpress/PHP connect to my MySQL database using Windows Authentication on IIS? I can connect just fine using the normal MySQL command line utilities. I get the following error instead:

Warning: mysqli_real_connect(): The server requested authentication method unknown to the client [authentication_windows_client] in c:\wordpress\wp-includes\wp-db.php on line 1386

Warning: mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client in c:\wordpress\wp-includes\wp-db.php on line 1386

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in c:\wordpress\wp-includes\wp-db.php on line 1416

Warning: mysql_connect(): The server requested authentication method unknown to the client [authentication_windows_client] in c:\wordpress\wp-includes\wp-db.php on line 1416

Warning: mysql_connect(): The server requested authentication method unknown to the client in c:\wordpress\wp-includes\wp-db.php on line 1416

Is it possible to have Wordpress/PHP connect to my MySQL database using Windows Authentication on IIS? I can connect just fine using the normal MySQL command line utilities. I get the following error instead:

Warning: mysqli_real_connect(): The server requested authentication method unknown to the client [authentication_windows_client] in c:\wordpress\wp-includes\wp-db.php on line 1386

Warning: mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client in c:\wordpress\wp-includes\wp-db.php on line 1386

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in c:\wordpress\wp-includes\wp-db.php on line 1416

Warning: mysql_connect(): The server requested authentication method unknown to the client [authentication_windows_client] in c:\wordpress\wp-includes\wp-db.php on line 1416

Warning: mysql_connect(): The server requested authentication method unknown to the client in c:\wordpress\wp-includes\wp-db.php on line 1416
Share Improve this question asked Apr 8, 2015 at 23:44 DigitalDDigitalD 1113 bronze badges 3
  • Are you modifying WordPress Core? If so this is extremely bad. There are far better ways to change the behavior of WPDB than editing the core files directly – Tom J Nowell Commented Apr 9, 2015 at 0:34
  • @TomJNowell I haven't done that at all. I'm using an official auth plugin for MySQL as I linked above. – DigitalD Commented Apr 9, 2015 at 4:16
  • Very late I know, but I'd guess you just have to make sure that your PHP is using the enterprise version of the mysql client libraries rather than the one it was supplied with. This may mean rebuilding the php_mysqli extension. You might also need to prevent WordPress trying to supply a password, albeit an empty one, which you can probably do by a drop-in db.php to modify the wpdb class. – Rup Commented Sep 23, 2019 at 12:31
Add a comment  | 

1 Answer 1

Reset to default -1

This is just bad security method.

Because the only way you can connect to the mysql database is via that pc you use.

Where is if you username/pwd, you can move the site to another server, etc.

So Windows Authentication is a bad idea, too easy to overcome, and honestly just not that secure.

Where as a username and strong password, that changes every so often, that's much better security.

But it's like this, if your insistent on driving your car over a cliff, we won't get in your way, but you won't like the results of your choices.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745137357a4613266.html

相关推荐

  • Connect to MySQL using Windows Authentication

    Is it possible to have WordpressPHP connect to my MySQL database using Windows Authentication on IIS? I can connect jus

    7小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信