After changing the environment recently, the docker reported an error when installing mysql8. The solution is as follows
Find my.cnf to modify
# Add the data [client] # Default character set #default-character-set=utf8 socket= /var/run/mysqld/mysqld.sock [mysql] # Default character set #default-character-set=utf8 socket= /var/run/mysqld/mysqld.sock #### Here the original configuration is written above [client] #socket= /storage/db/mysql/mysql.sock [mysqld] # server-id=01 port=3306 ## Turn on binary logging log-bin=mysql-slave-bin ## relay_log configuration relay log relay_log=edu-mysql-relay-bin # Ignore case lower_case_table_names=1 pid-file= /var/run/mysqld/mysqld.pid socket= /var/run/mysqld/mysqld.sock #socket= /storage/db/mysql/mysql.sock # Database data storage directory datadir= /var/lib/mysql secure-file-priv= NULL # Disabling symbolic-links is recommended to prevent assorted security risks skip-symbolic-links=0 # Maximum number of links max_connections=200 # Maximum number of failures max_connect_errors=10 # Default time zone default-time_zone='+8:00' character-set-client-handshake=FALSE character_set_server=utf8mb4 # default-character-set=utf8 collation-server=utf8mb4_unicode_ci init_connect='SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci' # Default authentication with 'mysql_native_password' plugin default_authentication_plugin= mysql_native_password # Custom config should go here !includedir /etc/mysql/conf.d/
Similar Posts:
- Solution to the error of MySQL: unrecognized service (CentOS)
- How to solve the error of PHP connection to mysql8
- mysql Slave_IO_Running:NO [How to Solve]
- The solution of job failed to start when modifying MySQL character encoding
- Mysql:ERROR 1698 (28000): Access denied for user ‘root’@’localhost’
- [Solved] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.6…
- [Solved] MySQL Restart Error: Another MySQL daemon already running with the same UNIX socket
- [Solved] Deploying Tomcat connection in Linux Navicat reports error 2059 – authentication plugin ‘caching_sha2_Password ‘cannot be loaded: + Xi input 9 g
- How to Solve MYSQL Error: mysqldump: Error 2013
- MYSQL 8.0 Login Error: caching_sha2_password [How to Solve]