(6)树莓派安装数据库

安装数据库

apt-get install mysql-server

默认没有密码 mysql

use mysql;

MariaDB [mysql]> update user set host = '%' where user = 'root';
Query OK, 1 row affected (0.02 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [mysql]> select host, user from user;
+------+------+
| host | user |
+------+------+
| %    | root |
+------+------+

MariaDB [(none)]> grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.04 sec)


exit
service mysql restart  # 重启服务
posted @ 2018-12-28 08:51  紫金龙骑  阅读(686)  评论(0编辑  收藏  举报
UV PV