search
HomeBackend DevelopmentPHP ProblemIs MySQL8.0 version incompatible with PHP7?

Is MySQL8.0 version incompatible with PHP7?

Incompatibility between MySQL8.0 version and PHP7?

MySQL8.0 version is incompatible with PHP7. There are generally two situations:

1. Mainly because MySQL8.0 defaults to utfmb4 format, and PHP defaults to UTF8 format;

Solution: You need to set the default format of MySQL8.0 to UTF8

Is MySQL8.0 version incompatible with PHP7?

2. Caused by incompatible encryption methods for identity authentication, the default format in MySQL8.0 The method is caching_sha2_password.

Solution:

Just create a new user with the old encryption method and initialize the password:

CREATEUSERusername@localhostidentifiedwithmysql_native_passwordby'password';

Then add a line in my.cnf:

default_authentication_plugin=mysql_native_password;

Recommended tutorial: "PHP Tutorial"

The above is the detailed content of Is MySQL8.0 version incompatible with PHP7?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft