Linux database initialization configuration

mysql:

The first time you log in to mysql -uroot -p, enter the password and press Enter, and log in with an empty password

 

Select database: use mysql;

 

UPDATE user SET password=PASSWORD('Java0713!') WHERE user='root';

 

update user set host = "%" where host = "localhost.localdomain";

 

flush privileges;

 

oracle:

Go to the Oracle user

1. The default database is started after it is established. If the server is restarted, it must be started manually. The command is as follows:

 

export ORACLE_SID=Asen (select the database SID you need to start)

 

echo $ORACLE_SID (display instance name)

 

sqlplus /nolog

 

connect sys/Java0713! as sysdba

 

startup (database startup)

 

2. Start monitoring

 

First, exit the sql execution that started the database above, and use quit or exit to return to the ordinary command line

Start the monitor: lsnrctl start (if the monitor name is not the default, start your corresponding monitor name)

 

 

Then go to the root account

setenforce 0

 

service iptables stop

 

 

unlock scott account

(1) conn sys/sys as sysdba;//Log in as DBA

(2) alter user scott account unlock;// then unlock

(3) conn scott/tiger //A dialog box pops up to change the password, just change the password

 

Grant scott account permissions

grant dba to scott;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326410927&siteId=291194637