Ubuntu 安装Mysql8(单机)
- 直接sudo apt-get install mysql-server安装
- mysql -uroot -p 回车回车进入mysql
- 初始root密码:ALTER user ‘root’@‘localhost’ IDENTIFIED BY ‘123456’;
- 增加远程连接权限
create user 'root'@'%' identified by 'PASSWD'; 或 ALTER USER 'canal'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
grant all privileges on *.* to 'root'@'%';
flush privileges;
- 修改配置/etc/mysql/mysql.conf.d/mysqld.cnf,注释bind-address
- 重启服务 service mysql restart