db.version();
It couldn't be simpler!
Human memory is pretty amazing but it fails to remember details as time passes. This is my personal memory bank for technical (and sometimes not so technical) issues. Hopefully, it could help other people too.
db.version();
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
[ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 97983975202 and the end 97984446291.
[ERROR] InnoDB: Plugin initialization aborted with error Generic error
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Failed to initialize plugins.
[ERROR] Aborting
[Note] Binlog end
[Note] /usr/sbin/mysqld: Shutdown complete
sudo rm /var/lib/mysql/ib_logfile0
sudo rm /var/lib/mysql/ib_logfile1
[ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.
[mysqld]
innodb_force_recovery = 4
mysqldump -u root -p --all-databases > all_db_local.sql
sudo rm -rf /var/lib/mysql/
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mysql-server
sudo apt-get install libmysqlclient-dev
mysql -u root < ~/all_db_local.sql
env | grep -i ora
ps -ef | grep -i pmon
- Are the listeners up and running? lsnrctl status
netstat -ln
- Can I connect to the DB? sqlplus <user>/<passwd>@<host>:<port>/<service>
sudo iptables -F
To make it persistent: sudo service iptables save
select username,account_status from dba_users where account_status like '%LOCK%';
alter user <USER> account unlock;
select profile from dba_users where user=<USER>;
alter profile <PROFILE> limit FAILED_LOGIN_ATTEMPTS unlimited;
alter profile <PROFILE> limit PASSWORD_LIFE_TIME unlimited;
alter profile <PROFILE> limit PASSWORD_REUSE_TIME unlimited;
alter profile <PROFILE> limit PASSWORD_REUSE_MAX unlimited;
alter profile <PROFILE> limit PASSWORD_LOCK_TIME unlimited;
alter profile <PROFILE> limit PASSWORD_GRACE_TIME unlimited;
mycolumn VARCHAR2(10 BYTE)
mycolumn VARCHAR2(10 CHAR)
SQL> grant create any directory to <user>;
Grant succeeded.
SQL> create directory my_data_pump_directory as '/tmp/db_dmp';
Directory created.