mysql-8.0

How to resolve the error: SQL authentication method unknown in Laravel-MySql

谁都会走 提交于 2019-12-01 20:37:03
问题 I using docker and I have a container of Laravel Framework 5.5.25 and other with mysql Ver 8.0.11 for Linux on x86_64 (MySQL Community Server - GPL). in my configuration of docker compose I have this: version: "2" services: mysql: image: mysql ports: - "3307:3306" command: --sql_mode="" So, when Laravel try to connect to MySql I have this error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from 回答1: You have to use legacy style

How to resolve the error: SQL authentication method unknown in Laravel-MySql

ε祈祈猫儿з 提交于 2019-12-01 20:05:16
I using docker and I have a container of Laravel Framework 5.5.25 and other with mysql Ver 8.0.11 for Linux on x86_64 (MySQL Community Server - GPL). in my configuration of docker compose I have this: version: "2" services: mysql: image: mysql ports: - "3307:3306" command: --sql_mode="" So, when Laravel try to connect to MySql I have this error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from You have to use legacy style passwords for MySQL 8 and PHP7+: ALTER USER 'username'@'ip_address' IDENTIFIED WITH mysql_native_password BY

Use a CTE to UPDATE or DELETE in MySQL

空扰寡人 提交于 2019-12-01 17:24:45
问题 The new version of MySQL, 8.0, now supports Common Table Expressions. According to the manual: A WITH clause is permitted at the beginning of SELECT, UPDATE, and DELETE statements: WITH ... SELECT ... WITH ... UPDATE ... WITH ... DELETE ... So, I thought, given the following table: ID lastName firstName ---------------------- 1 Smith Pat 2 Smith Pat 3 Smith Bob I can use the following query: ;WITH ToDelete AS ( SELECT ID, ROW_NUMBER() OVER (PARTITION BY lastName, firstName ORDER BY ID) AS rn

what are the changes in mysql 8 result rowset case?

老子叫甜甜 提交于 2019-12-01 02:00:44
when running SELECT maxlen FROM `information_schema`.`CHARACTER_SETS`; mysql 5.7 and mysql 8 produce different results: on mysql 5.7 the results row names are lower cased, on mysql 8 the results row names are upper cased. NB : in the CHARACTER_SETS table, the comumn name is MAXLEN (upper cased). Since I can't find a resource documenting it, my question is : what are the changes in mysql 8 result rowset case ? MySQL 8.0 did change the implementation of some views in the INFORMATION_SCHEMA: https://mysqlserverteam.com/mysql-8-0-improvements-to-information_schema/ says: Now that the metadata of

How to use REGEXP on the word boundary in MySQL 8.0.5+?

时间秒杀一切 提交于 2019-11-29 14:59:13
It does not work in MySQL (8.0.5+) using ICU-REGEXP to perform a search on the word boundary. As far as I understand it should be a-la $ mysql -e 'SELECT REGEXP_LIKE("aaa abc ccc", ".*\b+abc\b+.*")' +---------------------------------------------+ | REGEXP_LIKE("aaa abc ccc", ".*\b+abc\b+.*") | +---------------------------------------------+ | 0 | +---------------------------------------------+ but this option does not work. First, note that REGEXP_REPLACE can match strings partially , and you do not need .* before and after a search word. The \ char should be escaped in order to define a

How to grant all privileges to root user in MySQL 8.0

三世轮回 提交于 2019-11-27 06:48:11
Tried mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; Getting ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'root' WITH GRANT OPTION' at line 1. Note: The same is working when tried in previous versions. Also tried mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; Getting ERROR 1410 (42000): You are not allowed to create a user with GRANT MySQL (8.0.11.0) username/password is root/root. Mike Lischke Starting with

PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client [duplicate]

夙愿已清 提交于 2019-11-27 00:42:18
This question already has an answer here: php mysqli_connect: authentication method unknown to the client [caching_sha2_password] 6 answers I'm running MySQL version 8 on PHP 7.0. I'm getting the following error when I try to connect to my database from PHP: Connect Error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client PHP might show this error Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password] in D:\xampp\htdocs\reg\server.php on line 10 How can I fix this problem? @mohammed, this is

Node.js can't authenticate to MySQL 8.0

谁都会走 提交于 2019-11-26 16:40:57
I have a Node.js program that connects to a local MySQL database with the root account (this is not a production setup). This is the code that creates the connection: const mysql = require('mysql'); const dbConn = mysql.createConnection({ host: 'localhost', port: 3306, user: 'root', password: 'myRootPassword', database: 'decldb' }); dbConn.connect(err => { if (err) throw err; console.log('Connected!'); }); It worked with MySQL 5.7, but since installing MySQL 8.0 I get this error when starting the Node.js app: > node .\api-server\main.js [2018-05-16T13:53:53.153Z] Server launched on port 3000!

How to grant all privileges to root user in MySQL 8.0

你说的曾经没有我的故事 提交于 2019-11-26 12:06:48
问题 Tried mysql> GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'%\' IDENTIFIED BY \'root\' WITH GRANT OPTION; Getting ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'IDENTIFIED BY \'root\' WITH GRANT OPTION\' at line 1. Note: The same is working when tried in previous versions. Also tried mysql> GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'%\' WITH GRANT OPTION; Getting ERROR 1410 (42000): You are

PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client [duplicate]

江枫思渺然 提交于 2019-11-26 05:55:53
问题 This question already has answers here : php mysqli_connect: authentication method unknown to the client [caching_sha2_password] (12 answers) Closed 5 months ago . I\'m running MySQL version 8 on PHP 7.0. I\'m getting the following error when I try to connect to my database from PHP: Connect Error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client PHP might show this error Warning: mysqli_connect(): The server requested authentication method unknown to