On my CQLSH command line I tried to login with my ID and password given by the university:
cqlsh> cqlsh -u username -p password whatever.university.ca;
But somehow it's not connecting. I was told by the provider that I should be able to connect to the database this way from my university server. But I wasn't. Can anyone please help on this? By the way, I installed Cassandra before starting cqlsh. Thanks in advance.
Related
I'm trying to set up a SQL Server on my raspberry with Ubuntu server 20.04. I've followed both a tutorial and the Microsoft documentation and it runs pretty well.
I've finally run this command :
sudo docker run -e 'MSSQL_PID=developer' -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=XXXX' -p 1433:1433 --name azuresqledge -h azuresqledge -d mcr.microsoft.com/azure-sql-edge:latest
I assumed the login would be "developer" and the password "XXX" but it turns out it's not working (Login failed, err n.18456). I tried to access the SQL Server from my computer with SQL Server Management Studio, but it refuses the connection telling me that the credentials are wrong. What can I do?
I also tried with the login "azuresqledge" in doubt, but without result.
Thanks for your help !
The environment variable MSSQL_SA_PASSWORD specifies the password for the sa account. The MSSQL_PID environment value is unrelated an account; it specifies the SQL Server product edition (Developer edition here).
You can provision other accounts after starting the container by connecting with the sa login and executing statements to create logins, database users, etc.. Alternatively, use the SSMS Object Explorer graphical interface for same.
CREATE LOGIN developer WITH PASSWORD = 'password1';
To expand on Dan's answer above which helped me discover the following...
If you need to use a specific login with a password that doesn't meet the requirements, you can turn off the policy like this:
create login admin with password = 'admin', check_policy = off
and if you want it to have sa permissions...
exec master..sp_addsrvrolemember #loginame = 'admin', #rolename = 'sysadmin'
On GCP, when you connect to Google Cloud Shell, and then connect to PostgreSQL database instance using "gcloud sql connect..." GCP connects you to postgres database.
How can I change to another database already created?
Is there any psql (or specific GCP Shell) command to change database connection?
I have not tried GCP, so I'm not sure if this works there. But in some of my scripts I've the need to do this.
In those scripts, I use
\c DBNAME
More info: How to switch databases in psql?
As #scottsargent answer: \c DBNAME is the solution.
You need on GCP Shell to add a semicolon ; at the end, press ENTER and provide the user password to change database connection when psql ask for it:
postgres=> \c elboticario;
Password for user postgres:
psql (9.6.7, server 9.6.6)
SSL connection (protocol: TLSv1.2, cipher: **************-SHA256, bits: 128, compression: off)
You are now connected to database "elboticario" as user "postgres".
elboticario=>
A database administrator has used to connect to oracle database on unix operating system by using the following:
$ sqlplus sys/sysPass1#orcl as sysdba
What are the big mistakes in the previous method to connect?
What do you suggest to avoid such mistakes?
Please help me ...
That it exposes the password to other users running a ps -e command.
I'd suggest using an Oracle wallet to avoid the need to specify a password/
It is not necessary to connect to the database in this way - unless you are using Oracle RAC.
If the environment variables ORACLE_HOME and ORACLE_SID are correctly used and the unix user is in the DBA group and you are on the DB server a
sqlplus / as sysdba
is still working.
If you are using a script it is always a good idea to connect with
sqlplus /nolog # script.sql
and in the script as first line
connect user/password#tnsnames
or, if the script is running on the database server
connect user/password
I can successfully connect to my local server from SQL Management Studio, but when I try to connect from sqlcmd, there is an error: "Login failed for user 'my_username'".
I have checked my username and password - I can login with them in SQL Management Studio.
P.S.
I think that there is a problem in configuration of MS SQL, cause I can't connect to local server with "(local)" name and allways connect to it with COMP\COMP (COMP is my computer name). How can I correct it?
sqlcmd works when I connect to my team network server
I was having same problem, in the comment there is the solution by #Dave K
sqlcmd -S (local)\COMP -U user_name -P password
or
sqlcmd -S .\COMP -U user_name -P password
Hope it helps someone
I am trying to use amazon for the first time. I have created a database instance and it is up and running. I want use this database. I tried it using terminal in my mac by following command:
mysql -h xxxxx.xxxxxxxxx.us-east-1.rds.amazonaws.com -P 3306 -u mymasteruser -p
But I am getting error as following:
-bash: mysql: command not found
can some one help me how to connect to database from here and also how should I access it from Phpmyadmin. I have all the details about the database but I am not sure about how to get url for phpmyadmin.
Thanks
Pankaj
Make sure you have made security group to allow access from outside of AWS for port 3306.