===== < /p>
В mysql я создал пользователя в этой веб -странице, используя запрос: < /p>
Код: Выделить всё
CREATE USER '[user]'@'[host]' IDENTIFIED WITH caching_sha2_password BY '[password]';и предоставил этому пользователю единственные разрешения, которые ему нужны:
Код: Выделить всё
grant insert, select on [db].[table] to '[user]'@'[host]';=====
php 8.4 - Выбор библиотеки считывает, частично:
Код: Выделить всё
// 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>
В то время как MySQL 8.4 - 8.4.1.2 Кэширование SHA -2 считываемой аутентификации считывается, частично: < /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>
Я в настоящее время компилирует Php 8.4 с: < /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
Код: Выделить всё
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Код: Выделить всё
#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
- Почему Php рекомендует против этого? caching_sha2_password , чем
Компилирование Php 8.* с Libmysqlclient ? />Код: Выделить всё
$ ./configure --with-mysqli=/path/to/mysql_config --with-pdo-mysql=/path/to/mysql_config
Существует ли код, который должен быть в my.conf , чтобы скомпилировать PHP 8.* Эффективно для [caching_sha2_password] unhy? mysql_config означает my.conf , верно?
Подробнее здесь: https://stackoverflow.com/questions/797 ... or-mysql-8
Мобильная версия