Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议:通过 tars 官方提供的镜像部署时,使用非 root 权限的用户名,仍然需要赋予该用户 root 权限 #31

Open
tangyouyou opened this issue Mar 30, 2021 · 0 comments

Comments

@tangyouyou
Copy link

问题描述:
通过 tars 官方提供的镜像部署时,使用非 root 权限的用户名,仍然需要赋予该用户 root 权限;通过镜像内部的 tars-install.sh 脚本可以看出该问题

参考解决方案:
针对该情况,将 database 创建、用户名的授权步骤提前,提前到 tars-framework 镜像部署之前。

使用例子参考:

  1. 创建用户名 &数据库

create user tarsAdmin identified by 'Tars@2019';

create database db_tars;

create database tars_stat;

create database tars_property;

create database db_tars_web;

create database db_cache_web;

create database db_user_system;

create database db_base;

  1. 授权语句(需要以下数据库权限)

grant all on db_base.* to 'tarsAdmin'@'%' identified by 'Tars@2019' with grant option;

grant all on db_cache_web.* to 'tarsAdmin'@'%' identified by 'Tars@2019' with grant option;

grant all on db_tars.* to 'tarsAdmin'@'%' identified by 'Tars@2019' with grant option;

grant all on db_tars_web.* to 'tarsAdmin'@'%' identified by 'Tars@2019' with grant option;

grant all on db_user_system.* to 'tarsAdmin'@'%' identified by 'Tars@2019' with grant option;

grant all on tars_property.* to 'tarsAdmin'@'%‘' identified by 'Tars@2019' with grant option;

grant all on tars_stat.* to 'tarsAdmin'@'%' identified by 'Tars@2019' with grant option;

flush privileges;

建议:可以考虑支持非 root 权限的用户名,可以完成 tars 依赖数据库的安装

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant