What Do I Do If gsql: command not found Is Displayed When I Run gsql to Connect to the Database?
Symptom
The following error information is displayed when running the gsql -d postgres -p 26000 -r command:
1 | gsql: command not found... |
Possible Causes
- The command is not executed in the bin directory of gsql.
- The environment variable is not executed.
Handling Procedure
- Run the environment variable in the client directory, for example, in the /opt directory.
cd /opt
source gsql_env.sh

- Go to the bin directory of gsql and run the gsql command to connect to the database.
cd bin
gsql -d gaussdb -h Database_IP_address -p 8000 -U dbadmin -W Database_user_password -r;

Last Article: Database Connection
Next Article: Database Cannot Be Connected Using the gsql Client
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.