Kompilieren von Php 8.* mit libmysqlclient für MySQL 8.* w/o standardmäßig in MySQL 8.4/O in MySQL 9 MySQL_Native_PasswoPhp

PHP-Programmierer chatten hier
Anonymous
 Kompilieren von Php 8.* mit libmysqlclient für MySQL 8.* w/o standardmäßig in MySQL 8.4/O in MySQL 9 MySQL_Native_Passwo

Post by Anonymous »

In MySQL habe ich den Benutzer in dieser Webseite mit der Abfrage erstellt: < /p>

Code: Select all

CREATE USER '[user]'@'[host]' IDENTIFIED WITH caching_sha2_password BY '[password]';

und gewährt diesem Benutzer die einzigen Berechtigungen, die er benötigt:

Code: Select all

grant insert, select on [db].[table] to '[user]'@'[host]';

Ich verwende speziell nicht mySQL_NATIVE_PASSWORD , da es in MySQL 8.4 standardmäßig deaktiviert und in MySQL 9.0 entfernt wird.

Code: Select all

// Recommended, compiles with mysqlnd
$ ./configure --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd

// Alternatively recommended, compiles with mysqlnd
$ ./configure --with-mysqli --with-pdo-mysql

// Not recommended, compiles with libmysqlclient
$ ./configure --with-mysqli=/path/to/mysql_config --with-pdo-mysql=/path/to/mysql_config
< /code>
Während MySQL 8.4 - 8.4.1.2 Caching SHA -2 -Pluggable -Authentifizierung lautet teilweise: < /p>
**Installing SHA-2 Pluggable Authentication**

The caching_sha2_password plugin exists in server and client forms:

- The server-side plugin is built into the server, need not be loaded
explicitly, and cannot be disabled by unloading it.

- The client-side plugin is built into the libmysqlclient client
library and is available to any program linked against libmysqlclient.

The server-side plugin uses the sha2_cache_cleaner audit plugin as a helper to perform password cache management.

sha2_cache_cleaner, like caching_sha2_password, is built in and need not be installed.
< /code>
Ich kompile derzeit PHP 8.4 mit: < /p>
./configure \
--prefix=$path_to_php_bin \
--with-apxs=/usr/local/apache2/bin/apxs \
--enable-mbstring \
--with-mysqli \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-iconv=$(brew --prefix libiconv) \
--enable-fpm
Aber wenn ich versuche, einen MySQLI -Link zu erstellen auf einer Webseite, generiere ich einen fatalen Fehler :

Code: Select all

Fatal error: Uncaught mysqli_sql_exception: The server requested authentication method unknown to the client [caching_sha2_password] in [path_to_global_php_commands_include_file]:201

Code: Select all

#0 [path_to_global_php_commands_include_file](201): mysqli_connect([host], [user], [password], [db])
#1 [path_to_mysqli_connect_variables_file](10): connectDBi([host], [user], [password], [db])
#2 [path_to_php/html_header_file](12):include('[path_to_mysqli_connect_variables_file]')
#3 [path_to_website_index_file](3): include('[path_to_php/html_header_file]')
#4 {main} thrown in [path_to_global_php_include_commands_file] on line 201
Ich nehme an, dass dieser fataler Fehler erzeugt wird, weil ich nicht Php 8.4 mit libmysqlclient kompiliert wird, weil es eine Bibliothek auswählt - PHP 8.4 empfiehlt, dass MySQL 8.4.1.2 Caching -SHA -2 -SHA -2 -SHA -2 -SHA -2 -SHA -2 -Authentifizierung dies. /> Wenn es notwendig ist, Php 8.* mit libmysqlclient < /code> zu kompilieren, um caching_sha2_password < /code> mit MySQL 8 zu verwenden. caching_sha2_password als
kompilieren Sie Php 8.* mit libmysqlclient ? />

Code: Select all

$ ./configure --with-mysqli=/path/to/mysql_config --with-pdo-mysql=/path/to/mysql_config
Gibt es Code, der in my.conf sein muss, um Php 8 zu kompilieren.* Effektiv für [caching_sha2_password] verwenden? mysql_config bedeutet my.conf , oder?

Danke im Voraus!

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post