GBase 8s
安装配置
问答

安装问题

发表于2024-09-29 17:17:21187次浏览6个评论

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

【GBase版本】:GBASE 8S V8.8试用版

【操作系统】:麒麟V10 桌面版

【CPU】:intel

【问题描述】*:

1.按照按照手册上的典型安装,到最后一步 source .bash_profile,环境变量只能生效在当前终端,重开一个终端需要重新执行source .bash_profile 

2.按照安装手册上的 create database gbase8s;是成功的,接着执行use gbase8s; 或者show databases: 就报错201: A syntax error has occurred. Error in line 1 Near character position 1

评论

登录后才可以发表评论
用户头像
liaosnet发表于 1年前
1,如果环境变量是.bash_profile,且你的shell是bash,那么su - gbasedbt 就会自动加载.bash_profile。这问题是操作系统shell问题。
2,显示库,不是mysql语句show databases。使用 select * from sysmaster:sysdatabases;
GBase用户19681发表于 1年前
@liaosnet:1.
shell已经改为bash后,添加环境变量,重开终端还是没有环境变量
---------------------------------------------------------------------------------------
启动终端1
test@test-pc:~$ sudo su
输入密码
root@test-pc:/home/test# echo $SHELL
/bin/bash
root@test-pc:/home/test# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
root@test-pc:/home/test# cd /home/gbasedbt/
root@test-pc:/home/gbasedbt# source .bash_profile
root@test-pc:/home/gbasedbt# echo $PATH
/opt/GBASE/gbase/sbin:/opt/GBASE/gbase/bin:/opt/GBASE/gbase/extend/krakatoa/jre/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
---------------------------------------------------------------------------------------
然后启动终端2
test@test-pc:~$ su gbasedbt
输入密码
gbasedbt@test-pc:/home/test$ echo $SHELL
/bin/bash
gbasedbt@test-pc:/home/test$ echo $PATH
/sbin:/bin:/extend/krakatoa/jre/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games


2.test@test-pc:~$ su gbasedbt
输入密码
gbasedbt@test-pc:/home/test$ dbaccess - -
Could not find command-not-found database. Run 'sudo apt update' to populate it.
dbaccess:未找到命令
gbasedbt@test-pc:/home/test$ cd /home
gbasedbt@test-pc:/home$ cd gbasedbt
gbasedbt@test-pc:~$ source .bash_profile
gbasedbt@test-pc:~$ dbaccess - -
Your evaluation license will expire on 2025-09-27 00:00:00
> select * from sysmaster:sysdatabases;

349: Database not selected yet.
Error in line 1
Near character position 37


hugolin发表于 1年前
@GBase用户19681:切换到gbasedbt要带-
su - gbasedbt
最佳回答
用户头像
liaosnet发表于 1年前
@GBase用户19681:你需要补充一下linux/shell知识点:su - 与 su 的区别:su - 带的是目标用户环境变量,而su 带的是当前用户(源用户)的环境变量。
用户头像
柒柒天晴发表于 2个月前
不清楚啊。
GBase用户51934发表于 2个月前
不清楚啊。