赞
踩
群晖7.2 安装了mariadb,想要开启外网访问权限,网站找了很多教程,都比较老了,有的已经不适用了,
这里将遇到**ERROR 1356 (HY000)**报错的解决做一下记录:
MariaDB [mysql]> update user set host=‘%’ where user=‘root’;
ERROR 1356 (HY000): View ‘mysql.user’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
cd /volume1/@appstore/MariaDB10/usr/local/mariadb10/bin
./mysql -u root -p
use mysql;
update user set host='%' where user='root';
到这里报错
MariaDB [mysql]> update user set host=‘%’ where user=‘root’;
ERROR 1356 (HY000): View ‘mysql.user’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
sudo -i
# 输入群晖管理员密码
# 进入目录
cd /volume1/@appstore/MariaDB10/usr/local/mariadb10/bin
./mysql -u root -p
# 输入mariadb root 用户密码
# 'your passwd' 换成你自己的 mariadb root密码
grant all privileges on *.* to 'root'@'%' identified by 'your passwd';
delete from mysql.user where User='';
FLUSH PRIVILEGES;
# 输入mariadb root 用户密码 Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 131 Server version: 10.11.2-MariaDB Source distribution Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> grant all privileges on *.* to 'root'@'%' identified by 'your mariadb's password'; Query OK, 0 rows affected (0.005 sec) MariaDB [(none)]> delete from mysql.user where User=''; Query OK, 2 rows affected (0.006 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.001 sec)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。