docker安装mysql笔记 1055-mysql Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nona

First, find a mirror 

docker search mysql

Mirror Pull:

docker pull mysql

After the pull, you can check local mirror:

docker images

You can see there are two local mirror (redis before I pulled the mirror can be ignored.), The arrival of a mirror, we can create a container.

docker run  -d -p 3306:3306 --name mysql1 mysql

-d: background container;

-p: port mapped to the local container;

--name: Name vessel;

After starting the container, connect to the database failed to see the vessel running:

docker ps

Find mysql container is not running, view the container logs:

docker logs 6e

6e: Id mysql container vessel

Log error prompted for a password, delete the container just created:

docker rm 6e

Re-create the container:

docker run -d -p 3306:3306 --name mysql1 -e MYSQL_ROOT_PASSWORD=123456 mysql

The view of the operation of container, the container is determined not to quit.

Into the container:

docker exec -it  6e(containerId) bash

Login mysql:

-uroot-MySQL - the p-   
code: 123456

Create a user:

the User the Create ' username ' @ ' % ' IDENTIFIED by ' password ' ;

Setting permissions:

grant select,delete,update,insert,create,drop on *.* to '用户名'@'%' ;

Navicat connection with the database is given: Authentication plugin 'caching_sha2_password' execute the following statement in mysql

ALTER USER '用户名'@'%' IDENTIFIED WITH mysql_native_password BY 'newpassword';

Navicat and then connect to the database, OK.

Sql prompt execution in navicat in  1055-mysql Expression # 1 of ORDER BY clause is not in GROUP BY clause and contains nona 

Sql _mode is the only _full _group _by incompatibility problems.

show variables like "sql_mode"; 
set sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';

Everything OK;

Guess you like

Origin www.cnblogs.com/jasonbourne3/p/11257107.html