树莓派从入坑到放弃 (五)安装GIT与监控平台 使用SQL语句添加mariaDB数据库用户

一、安装GIT

sudo apt-get install git

二、安装PI BOARD

cd /var/www/html
sudo git clone https://github.com/spoonysonny/pi-dashboard.git
sudo chown -R www-data pi-dashboard      #为pi-dashboard分配权限

三、访问pi-dashboard

浏览器登入:localhost/pi-dashboard
在这里插入图片描述Tips:
eth0:以太网卡0 1 2 3 …
lo:localhost
wlan0:无线网卡 0 1 2 3……

使用SQL语句添加mariaDB数据库用户
在这里插入图片描述

进入mariaDB环境:

mysql –u root -p
CREATE USER 'wxl'@'localhost' IDENTIFIED BY '1324483661';#wxl为用户名,后面为密码

查看用户对数据库具有的权限:

show grants for hp@localhost;

赋予用户对数据库具有的权限:

grant all privileges on *.* to hp@localhost;

撤销用户对数据库具有的权限:
#revoke all privileges on . from hp@localhost;
刷新权限:

flush privileges;
exit;

注意:一定要加分号

重新验证phpMyAdmin
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值