搭建个人的云盘--NextCloud--踩过的坑

踩过的坑:

1. php 网页无法解析

Resolve : 

vim /etc/httpd/conf/httpd.conf

add fellow

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

LoadModule php7_module modules/libphp7.so

2. mysql grant 无权限 (https://www.douban.com/note/311849800/)


mysql> grant all privileges on *.* to root@"%" identified by "password" with grant option;

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

通常此问题出现,是由于MySQL数据库是从旧版本升级,但是没有执行mysql_upgrade操作,导致root用户本身的权限不是all(因为新版本可能增加了某些权限)。

确认方式(查看是否有grant all 没有就是权限不全):
mysql>SHOW GRANTS FOR'root'@'localhost';
+---------------------------------------------------------------------+
|Grants for root@localhost |
+---------------------------------------------------------------------+
|GRANTALLPRIVILEGES ON*.*TO'root'@'localhost' WITH GRANTOPTION

Resolve :

解决方法:运行bin下的mysql_upgrade,再重启数据库。(/user/bin/mysql_upgrade

(运行前,最好先备份原来的数据库)运行报错请看(http://logpress.org/error-failed-while-fetching-server-version-could-be-due-to-unauthorized-access.htm)


Error: Failed while fetching Server version! Could be due to unauthorized access.

MySQL更新版本后要需要更新数据库,否则可能出现意外,使用命令:mysql_upgrade -u root -p出现错误提示:

修正方法:

然后等待执行完毕即可。




你可能感兴趣的:(云盘,NextCloud)