[mysqld] default_authentication_plugin=mysql_native_password
default-authentication-plugin = caching_sha2_passwordPour l'instant, j'ai trouve plusieurs problèmes, que voici :
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';Je passe le contrôle du mot de passe de phpmyadmin, mais je me retrouve avec l'erreur suivante :
Fatal error: Uncaught Error: Call to a member function exists() on null in F:\Wamp\apps\phpmyadmin4.8.0\libraries\classes\DatabaseInterface.php:1544 Stack trace: #0 F:\Wamp\apps\phpmyadmin4.8.0\libraries\classes\DatabaseInterface.php(2477): PhpMyAdmin\DatabaseInterface->postConnectControl() #1 F:\Wamp\apps\phpmyadmin4.8.0\libraries\common.inc.php(358): PhpMyAdmin\DatabaseInterface->connect(257) #2 F:\Wamp\apps\phpmyadmin4.8.0\index.php(26): require_once('F:\\Wamp\\apps\\ph...') #3 {main} thrown in F:\Wamp\apps\phpmyadmin4.8.0\libraries\classes\DatabaseInterface.php on line 15442) je change de phpmyadmin et je teste la version 4.7.9.
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'root';Je passe le contrôle du mot de passe mais je me retrouve avec l'erreur suivante :
#2054 - The server requested authentication method unknown to the client
; binary logging is required for replication skip-log-binet
[mysqld] default_authentication_plugin=mysql_native_password
mysqld.exe --default_authentication_plugin=mysql_native_password --initialize-insecure
skip-log-bin default_authentication_plugin=mysql_native_passwordComme je l'ai indiqué ci-dessus, soit en déclarant le nouveau mot de passe ainsi :
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';ou bien en mettant :
default_authentication_plugin=mysql_native_passworddans le fichier "my.ini", et en déclarant le mot de passe comme ci-après :
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';je peux sans difficulté entrer dans phpmyadmin dans la version mysql 8.0.4-c.
mysqld.exe --default_authentication_plugin=mysql_native_password --initialize-insecure
key_ buffer_size = 256M max_allo wed_packet = 1Mne sont pas prises en compte. À croire que ce n'est pas le fichier my.ini qui est chargé comme fichier de configuration.
2018-04-11T15:02:29.675918Z 0 [System] [MY-001077] f:\Wamp\bin\mysql\mysql8.0.4\bin\mysqld.exe: Normal shutdown 2018-04-11T15:02:30.409770Z 0 [System] [MY-010910] f:\Wamp\bin\mysql\mysql8.0.4\bin\mysqld.exe: Shutdown complete. 2018-04-11T15:02:32.482634Z 0 [System] [MY-010116] f:\Wamp\bin\mysql\mysql8.0.4\bin\mysqld.exe (mysqld 8.0.4-rc-log) starting as process 8720 ... 2018-04-11T15:02:38.165034Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed. 2018-04-11T15:02:38.286553Z 0 [System] [MY-010931] f:\Wamp\bin\mysql\mysql8.0.4\bin\mysqld.exe: ready for connections. Version: '8.0.4-rc-log' socket: '' port: 3306 MySQL Community Server (GPL).Orion est le nom de mon ordinateur.
mysql --ssl-mode=DISABLED -u sha2user -pL'astuce est d'utiliser la commande "flush privileges" pour réinitialiser le cache.
mysql --host=localhost --user=root --password=root --verbose --force --ssl-mode=disabled --server-public-key-path=F:/Wamp/bin/mysql/mysql8.0.4/data < %FIC%J'ai toujours la même erreur :
mysql: [Warning] Using a password on the command line interface can be insecure. mysql: [Warning] Can't locate server public key 'F:/Wamp/bin/mysql/mysql8.0.4/data' ERROR 2061 (HY000): Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. Appuyez sur une touche pour continuer...Voire même quand j'utilise les déclaratives SSL :
mysql --host=localhost --user=root --password=root --verbose --force --ssl-mode=verify_identity --ssl-capath=F:/Wamp/bin/mysql/mysql8.0.4/data --ssl-ca=ca.pem --ssl-cert=client-cert.pem --ssl-key=client-key.pem < %FIC%
mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed Appuyez sur une touche pour continuer...Or en consultant la partie déclarative du SSL, voici ce que j'ai :
-------------- mysql Ver 8.0.4-rc for Win64 on x86_64 (MySQL Community Server (GPL)) Connection id: 21 Current database: mysql Current user: root@localhost SSL: Cipher in use is DHE-RSA-AES128-GCM-SHA256 Using delimiter: ; Server version: 8.0.4-rc-log MySQL Community Server (GPL) Protocol version: 10 Connection: localhost via TCP/IP Server characterset: utf8mb4 Db characterset: utf8mb4 Client characterset: latin1 Conn. characterset: latin1 TCP port: 3306 Uptime: 16 min 42 sec Threads: 2 Questions: 63 Slow queries: 0 Opens: 173 Flush tables: 2 Open tables: 149 Queries per second avg: 0.062 -------------- -------------- SHOW VARIABLES LIKE '%ssl%' -------------- +---------------+-----------------+ | Variable_name | Value | +---------------+-----------------+ | have_openssl | YES | | have_ssl | YES | | ssl_ca | ca.pem | | ssl_capath | | | ssl_cert | server-cert.pem | | ssl_cipher | | | ssl_crl | | | ssl_crlpath | | | ssl_key | server-key.pem | +---------------+-----------------+ Appuyez sur une touche pour continuer...On constate que le SSL est bien activé, mais je ne retrouve pas le chemin (ssl_capath) que j'ai mis dans le fichier my.ini pour indiquer où se trouve les certificats.
mysql --verbose --force --ssl-mode=verify_ca ^ --ssl-ca=f:/Wamp/bin/mysql/%MYSQL%/data/ca.pem ^ < %FIC%Ce test fonctionne !
mysql --verbose --force --ssl-mode=verify_identity ^ --ssl-ca=f:/Wamp/bin/mysql/%MYSQL%/data/ca.pem ^ --ssl-capath=F:/Wamp/bin/mysql/%MYSQL%/data ^ --ssl-cert=f:/Wamp/bin/mysql/%MYSQL%/data/client-cert.pem ^ --ssl-key=f:/Wamp/bin/mysql/%MYSQL%/data/client-key.pem ^ < %FIC%Ce test ne fonctionne pas :
ERROR 2026 (HY000): SSL connection error: SSL certificate validation failure Appuyez sur une touche pour continuer...J'ai fait une recherche sur le net et il semble que le CN du certificat ne soit pas à localhost.
2018-04-13T06:19:32.931574Z 0 [Note] [MY-010949] Basedir set to f:\Wamp\bin\mysql\mysql8.0.4\. 2018-04-13T06:19:32.931659Z 0 [System] [MY-010116] f:\Wamp\bin\mysql\mysql8.0.4\bin\mysqld.exe (mysqld 8.0.4-rc-log) starting as process 6204 ... 2018-04-13T06:19:33.398397Z 0 [Note] [MY-010747] Plugin 'FEDERATED' is disabled. 2018-04-13T06:19:33.404901Z 1 [Note] [MY-011066] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2018-04-13T06:19:33.405789Z 1 [Note] [MY-011066] InnoDB: Uses event mutexes 2018-04-13T06:19:33.406355Z 1 [Note] [MY-011066] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier 2018-04-13T06:19:33.407204Z 1 [Note] [MY-011066] InnoDB: Compressed tables use zlib 1.2.11 2018-04-13T06:19:33.408517Z 1 [Note] [MY-011066] InnoDB: Number of pools: 1 2018-04-13T06:19:33.409383Z 1 [Note] [MY-011066] InnoDB: Not using CPU crc32 instructions 2018-04-13T06:19:33.411430Z 1 [Note] [MY-011066] InnoDB: Directories to scan 'f:\Wamp\bin\mysql\mysql8.0.4\data\ibdata\;.\;.\' 2018-04-13T06:19:33.412685Z 1 [Note] [MY-011066] InnoDB: Scanning '.\' 2018-04-13T06:19:33.496990Z 1 [Note] [MY-011066] InnoDB: Completed space ID check of 101 files. 2018-04-13T06:19:33.499919Z 1 [Note] [MY-011066] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2018-04-13T06:19:33.520151Z 1 [Note] [MY-011066] InnoDB: Completed initialization of buffer pool 2018-04-13T06:19:33.717188Z 1 [Note] [MY-011066] InnoDB: Applying a batch of 0 redo log records ... 2018-04-13T06:19:33.717964Z 1 [Note] [MY-011066] InnoDB: Apply batch completed! 2018-04-13T06:19:33.721111Z 1 [Note] [MY-011066] InnoDB: Resizing redo log from 2*3072 to 2*1280 pages, LSN=24951553 2018-04-13T06:19:33.875875Z 1 [Note] [MY-011066] InnoDB: Starting to delete and rewrite log files. 2018-04-13T06:19:33.884452Z 1 [Note] [MY-011066] InnoDB: Setting log file f:\Wamp\bin\mysql\mysql8.0.4\data\ibdata\ib_logfile101 size to 20 MB 2018-04-13T06:19:34.180089Z 1 [Note] [MY-011066] InnoDB: Setting log file f:\Wamp\bin\mysql\mysql8.0.4\data\ibdata\ib_logfile1 size to 20 MB 2018-04-13T06:19:34.493642Z 1 [Note] [MY-011066] InnoDB: Renaming log file f:\Wamp\bin\mysql\mysql8.0.4\data\ibdata\ib_logfile101 to f:\Wamp\bin\mysql\mysql8.0.4\data\ibdata\ib_logfile0 2018-04-13T06:19:34.495454Z 1 [Note] [MY-011066] InnoDB: New log files created, LSN=24951553 2018-04-13T06:19:34.528649Z 1 [Note] [MY-011066] InnoDB: Opened 2 existing undo tablespaces. 2018-04-13T06:19:35.098565Z 1 [Note] [MY-011066] InnoDB: Creating shared tablespace for temporary tables 2018-04-13T06:19:35.099628Z 1 [Note] [MY-011066] InnoDB: Setting file 'f:\Wamp\bin\mysql\mysql8.0.4\data\ibdata\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2018-04-13T06:19:35.724160Z 1 [Note] [MY-011066] InnoDB: File 'f:\Wamp\bin\mysql\mysql8.0.4\data\ibdata\ibtmp1' size is now 12 MB. 2018-04-13T06:19:35.731303Z 1 [Note] [MY-011066] InnoDB: Created 128 and tracked 128 new rollback segment(s) in the temporary tablespace. 128 are now active. 2018-04-13T06:19:35.733150Z 1 [Note] [MY-011066] InnoDB: 8.0.4 started; log sequence number 24951553 2018-04-13T06:19:37.887532Z 1 [Note] [MY-011089] Data dictionary restarting version '80004'. 2018-04-13T06:19:39.221143Z 1 [Note] [MY-011066] InnoDB: Reading DD tablespace files 2018-04-13T06:19:39.369869Z 1 [Note] [MY-011066] InnoDB: Validated 103/103 tablespaces 2018-04-13T06:19:39.435566Z 1 [Note] [MY-010006] Using data dictionary with version '80004'. 2018-04-13T06:19:39.678200Z 0 [Note] [MY-011066] InnoDB: DDL log recovery : begin 2018-04-13T06:19:39.732760Z 0 [Note] [MY-011066] InnoDB: DDL log recovery : end 2018-04-13T06:19:39.780643Z 0 [Note] [MY-010303] Skipping generation of SSL certificates as options related to SSL are specified. 2018-04-13T06:19:40.965829Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed. 2018-04-13T06:19:40.967248Z 0 [Note] [MY-010308] Skipping generation of RSA key pair through --sha256_password_auto_generate_rsa_keys as key files are present in data directory. 2018-04-13T06:19:40.968672Z 0 [Note] [MY-010308] Skipping generation of RSA key pair through --caching_sha2_password_auto_generate_rsa_keys as key files are present in data directory. 2018-04-13T06:19:40.983916Z 0 [Note] [MY-010252] Server hostname (bind-address): '0.0.0.0'; port: 3306 2018-04-13T06:19:40.986175Z 0 [Note] [MY-010264] - '0.0.0.0' resolves to '0.0.0.0'; 2018-04-13T06:19:40.987185Z 0 [Note] [MY-010251] Server socket created on IP: '0.0.0.0'. 2018-04-13T06:19:41.273428Z 4 [Note] [MY-010051] Event Scheduler: scheduler thread started with id 4 2018-04-13T06:19:41.273179Z 0 [System] [MY-010931] f:\Wamp\bin\mysql\mysql8.0.4\bin\mysqld.exe: ready for connections. Version: '8.0.4-rc-log' socket: '' port: 3306 MySQL Community Server (GPL).Vu que je n'utilise pas la section MysqlD dans mon fichier my.ini, comment indiquer que la section WampMysqlD et MysqlD, c'est la même chose ?
mysql --verbose --helpVous avez un compte-rendu du démarrage de MySql. Au milieu de celui-ci, vous pouvez lire :
Default options are read from the following files in the given order:
C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\my.ini C:\my.cnf F:\Wamp\bin\mysql\mysql8.0.4\my.ini F:\Wamp\bin\mysql\mysql8.0.4\my.cnf
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file,
except for login file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=#
Also read groups with concat(group, suffix)
--login-path=# Read this path from the login file.
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
Ce que j'ai mis en rouge, indique que MySql est lancé sans option.Note A MySQL program started with the --no-defaults option reads no option files other than .mylogin.cnf.--> [dev.mysql.com]
2018-04-14T17:04:51.189454Z 0 [Warning] [MY-010069] Failed to set up SSL because of the following SSL library error: SSL_CTX_set_default_verify_paths failedEt si je la renseigne avec ce chemin : F:/Wamp/mysql/mysql8.0.4/data, j'ai maintenant ce nouveau message d'anomalie :
2018-04-14T17:10:05.444812Z 0 [Warning] [MY-010069] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private keyJ'ai même testé avec cet autre chemin : F:\\Wamp\\mysql\\mysql8.0.4\\data, sans plus de succès :
2018-04-14T17:12:07.368080Z 0 [Warning] [MY-010069] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key