1 安装Mysql

    跳过

2 开启远程访问(开启3306端口)

2.1修改/etc/mysql/my.cnf 文件 (也可能是 /etc/mysql/mariadb.conf.d/50-server.cnf)

找到bind-address这行,并用#注释掉

#bind-address        = 127.0.0.1
 SpringBoot 访问树莓派上的MySql

 

   保存:wq,退出。输入:sudo service mysql restart,重新启动mysql。

2.2登录mysql,输入下面命令

mysql>grant all privileges on *.* to username@"%" identified by "password";(username一般是root,password是新的密码)
mysql> FLUSH PRIVILEGES;

 例如:

grant all privileges on *.* to "root"@"%" identified by "123456";
FLUSH PRIVILEGES;

  

 

相关文章:

  • 2021-05-09
  • 2021-08-16
  • 2022-02-03
  • 2021-07-18
  • 2022-12-23
  • 2021-09-22
  • 2021-07-02
  • 2022-01-16
猜你喜欢
  • 2021-05-05
  • 2022-01-11
  • 2021-11-12
  • 2021-06-30
  • 2021-12-31
  • 2021-08-03
  • 2021-12-03
相关资源
相似解决方案