I have a very general question about unix.
After using the ls command in the shell prompt, the following is listed
students
students is a database which i wanted to access.
How to access and query this database? Should i use sudo su commands?
First you determine the database type, where it is located (host address), the username, and password to access it. The you determine if you have the appropiate client to connect to it. Then you connect and run your sql query.
Is this a sqllite or berkly db? Mysql?
If MySql, and you have the mysql client installed, and the db is on the localhost... do this:
mysql -u username -p
Where username is the username to connect. It will prompt for password. When at the mysql prompt see all dbs with this:
show databases;
Select a db like this:
use somedatase;
Then query away.
Related
I wanted to create a repository to store transformations and jobs in it. I don't want to install a heavy weight RDBMS, and since Kettle/Spoon can deal with SQlite3 Databases I thought, I could use a SQlite3 Database.
So I created a new database file using the shell and I used the Repository Manager to create a new database connection to this new database file.
It worked, no problem. It also doesn't matter which user password combination I use: the test is successful.
My connection details look like this:
All database tables seem to be in place:
But when I want to access the repository, I'm being asked for a password. I use admin:admin, but I'm getting this message:
I checked the r_user table in the database. I was considering, to change the password there, but I read here that the default password is admin.
I was also thinking, that it's the database user and password that is required, but since it's a sqlite3 DB there is no such thing as a user and password to access it.
Anyone can help, please?
It's a bit embarrassing, but I'm not sure for whom, but...
If you open up the repositories.xml in .kettle directory, you'll see this:
That's a version where I didn't supply a password for the DB User (not the repository user). In this case you see the text Encrypted in between the <password> tag.
If you delete this text (leaving the <password> tag empty) the connection to the repository works (with user admin and password admin for the repository connection).
If you specified a password for the DB connection the encrypted password is stored in the repositories.xml file. But it's also prefixed with Encrypted. If you delete the prefix and leave the encrypted password intact it also works.
Since it's a sqlite3 database it doesn't matter what's the password, though.
Hope someone else will find this helpful.
I created a VM instance on gcloud hosting Rstudio. However, after a month of not using the server I forgot the password of the VM instance and not sure if I'm using the right user name. When I tried to login by external IP:8787 the credentials that I remember are not valid. Does anyone know how to recover password and username for VM instance?
Thank you!
You should connect to your rstudio Vm via SSH and then you will be able to choose new password by following these steps:
Go to your VM instances page and in the list of virtual machine instances, click SSH in the row of the instance that you want to connect to.
When you log-in your VM via SSH:
1) Run the command sudo passwd < YOUR_USERNAME > (Keep in mind by default the admin username is rstudio-user) .
2) Type the new password and then retype it and done.
3) Try to connect to your VM with your new password
Moreover, if you are not using the default username or you forget, you can run
sudo cat /etc/passwd to see the username when you logged in to your VM via SSH.
I'm trying to connect to amazon using aws and an user that I created in ec2. Unfortunately, I can't connect in filezilla to that user using the key, only to the default aws user. How exactly should I go about this?
If you created a user on ec2 with a command like adduser then to use this new user with filezilla set a password for the user with the passwd command. Then use the same username/password combination from filezilla
To use filezilla with ssh key pairs
generate a new key pair for the new user with the ssh-keygen command.
Put the public part in the new user's .ssh/authorized_keys file.
Ensure that the authorized_keys has the correct permissions and owner.
Convert the private key to pem or ppk format and load it into filezilla
See https://wiki.filezilla-project.org/Howto
I have downloaded Oracle - OraDb11g_home1 and I want to use sqlplus.
The problem is, when I open sqlplus, it's prompts me for username and password which I don't think I have.
Is there a way to log in as a default super user and create a new account?
Thanks
Start SQL*Plus:
C:\> sqlplus /NOLOG
Connect as SYSDBA:
SQL> CONNECT / AS SYSDBA
change password and connect again.
ALTER USER username ACCOUNT UNLOCK;
ALTER USER username IDENTIFIED BY password;
I am new to Oracle. I would like to know how to set login password for sqlplus / as sysdba in oracle 11g.
I want to set the password for my next login, i dont want to login as sqlplus / as sysdba since anyone can log in using sqlplus / as sysdba and can easily access the data or change password for the existing user.I need to restrict the login.
To set a new password you should (after connecting to the DB):
alter user SYS identified by "newpassword";
But if you want to prevent connecting without a password - sqlplus / as sysdba, then you need to add this:
SQLNET.AUTHENTICATION_SERVICES=none
in sqlnet.ora
Not just anyone can login using sqlplus / as sysdba. The OS user must be a member of the OS DBA group created to manage the database (this group can have a different name).
You should only be assigning real DBAs membership of this group. And, in my opinion, no one should ever login as oracle (assuming a Unix(-like) system here).
SQLPLUS username/password#identifier_name