msyql ERROR:1698 远程访问配置
ERROR:1698
su
mysql
use mysql
update user set authentication_string=password("123456"),
plugin='mysql_native_password',
Host='%' where user="root";
flush privileges;#使生效
使数据库能够远程访问需要修改绑定地址
bind-address = 127.0.0.1 修改为 bind-address = 0.0.0.0
#ubuntu
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
#deepin
sudo vi /etc/mysql/mariadb.conf.d/50-server.cnf
创建账号和密码
create database dbname;
create user username identified by 'password';
grant all on dbname.* to 'username'@'%' identified by 'password' with grant option;
#替换 % 为localhost 只能从本机访问这个数据库。