Installing MySQL 9/8 Enterprise Edition in Oracle linux 7.8

Method 1 Unzip file RPM unzip mysql-commercial-server-8.0.40-1.1.el7.zip Run Installer yum install *.rpm Get password from temporary sudo grep 'temporary' /var/log/mysqld.log Secure MySQL Installation sudo mysql_secure_installation Enter current password for root (enter for none): Set root password? [Y/n] Y New password: Re-enter new password: Do you wish ...? : Y Remove anonymous users? [Y/n] Y Disallow root login remotely? [Y/n] n Remove test database and access to it? [Y/n] Y Reload privilege tables now? [Y/n] Y Try login mysql -uroot -p Method 2 After you have downloaded the MySQL Enterprise Edition software bundle from the MySQL Enterprise Edition Downloads page on OTR, follow the installation instructions below for your platform. Oracle Linux /Red Hat Enterprise Linux ...

December 12, 2024 · 2 min · 360 words · kidtz

Docker Command

command docker docker --version # Check Docker version docker info # Display system info docker --help # List all Docker commands docker run [OPTIONS] IMAGE [COMMAND] # Run a container docker ps # List running containers docker ps -a # List all containers docker stop <container_id|name> # Stop a container docker start <container_id|name> # Start a stopped container docker restart <container_id|name> # Restart a container docker rm <container_id|name> # Remove a container docker exec -it <container_id|name> /bin/bash # Attach to container docker images # List images docker pull <image_name>:<tag> # Download an image docker rmi <image_id|name> # Remove an image docker tag <image_id> <repo_name>:<tag> # Tag an image docker network ls # List networks docker network create <network_name> # Create a new network docker network connect <network_name> <container_name> # Connect container docker network disconnect <network_name> <container_name> # Disconnect container docker volume ls # List volumes docker volume create <volume_name> # Create a volume docker volume rm <volume_name> # Remove a volume docker run -d -v <volume_name>:/path/in/container IMAGE # Mount volume docker-compose up -d # Start services docker-compose down # Stop services docker-compose logs -f # View service logs docker-compose restart # Restart services docker logs <container_id|name> # View container logs docker logs -f <container_id|name> # Stream live logs docker stats # Monitor resource usage docker container prune # Remove stopped containers docker image prune # Remove unused images docker system prune # Remove all unused data docker ps check all images REPOSITORY TAG IMAGE ID CREATED SIZE kalilinux/kali-rolling latest 4bcd01f000d0 10 days ago 128MB postgres latest f0dfc903a663 2 weeks ago 434MB dpage/pgadmin4 latest a67d330eef3b 3 weeks ago 485MB grafana/grafana latest de903bc9ce7c 7 weeks ago 478MB mysql 8.4 f742bd39cd6b 2 months ago 584MB phpmyadmin/phpmyadmin latest 933569f3a9f6 15 months ago 562MB mysql/mysql-router latest 22e6cea4af02 21 months ago 255MB

December 10, 2024 · 2 min · 296 words · kidtz

Oracle Fleet Patching & Provisioning (FPP): Configuring FPP Server 19c

How Oracle Fleet Patching and Provisioning helps Oracle FPP provides a tool capable of patching and upgrading Oracle Grid Infrastructure and Oracle Database using gold image. Gold image is a compressed copy of a software-only Oracle Database home or Grid Infrastructure home. Oracle FPP server acts like a warehouse of various version of gold image that can be used to patching and upgrading. The image below describes a FPP server with GI and DB gold images: ...

December 9, 2024 · 4 min · 789 words · kidtz

Oracle Datapump Command

# Basic Data Pump Import Command Syntax impdp username/password DIRECTORY=directory_name DUMPFILE=dumpfile_name LOGFILE=logfile_name # Common Parameters: # 1. DIRECTORY - Specifies the directory object where the dump file is located. DIRECTORY=db_backup_dir # 2. DUMPFILE - Specifies the name of the dump file. You can use multiple files if needed. DUMPFILE=db_backup.dmp # 3. LOGFILE - Specifies the name of the log file to log the import process. LOGFILE=db_restore.log # 4. TABLES - Imports specific tables from the dump file. TABLES=hr.employees, hr.departments # 5. REMAP_SCHEMA - Remaps the source schema to a target schema during import. REMAP_SCHEMA=old_schema:new_schema # 6. REMAP_TABLESPACE - Remaps the source tablespace to a target tablespace. REMAP_TABLESPACE=old_tablespace:new_tablespace # 7. EXCLUDE - Excludes specific object types or objects from the import. Example: Exclude indexes. EXCLUDE=INDEX # 8. INCLUDE - Includes specific object types or objects for import. Example: Only import `employees` and `departments` tables. INCLUDE=TABLE:"IN ('EMPLOYEES', 'DEPARTMENTS')" # 9. CONTENT - Specifies whether to import only data (DATA_ONLY), only DDL (METADATA_ONLY), or both (ALL). CONTENT=DATA_ONLY # 10. ACCESS_METHOD - Specifies the method used for accessing the dump file (direct_path or external_table). ACCESS_METHOD=direct_path # 11. FULL - Imports the entire database. FULL=Y # 12. PARALLEL - Uses multiple parallel threads for faster import. PARALLEL=4 # 13. FLASHBACK_TIME - Imports data as it was at a specific point in time. FLASHBACK_TIME="TO_TIMESTAMP('2023-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')" # 14. TRANSPORT_TABLESPACES - Imports specified transportable tablespaces. TRANSPORT_TABLESPACES=users # 15. CLUSTER - Used when importing a cluster. CLUSTER=Y # 16. SINGLE_TRANSACTION - Imports all objects in a single transaction. SINGLE_TRANSACTION=Y # 17. REMAP_DATAFILE - Remaps datafile names during import. REMAP_DATAFILE='/old/path/datafile.dbf'='/new/path/datafile.dbf' # 18. TABLE_EXISTS_ACTION - Specifies what action to take if a table already exists during import. Options: SKIP, APPEND, REPLACE, TRUNCATE. TABLE_EXISTS_ACTION=APPEND # Example: Import Specific Tables impdp dbning/12345 DIRECTORY=db_backup_dir DUMPFILE=dbning_backup.dmp LOGFILE=restore.log TABLES=hr.employees,hr.departments # Example: Remap Schema During Import impdp sys/12345 as sysdba DIRECTORY=db_backup_dir DUMPFILE=dbning_backup.dmp LOGFILE=restore.log REMAP_SCHEMA=old_schema:new_schema # Example: Import with Parallelism (4 threads) impdp sys/12345 as sysdba DIRECTORY=db_backup_dir DUMPFILE=dbning_backup.dmp LOGFILE=restore.log PARALLEL=4 # Example: Import Data Only (No DDL) impdp sys/12345 as sysdba DIRECTORY=db_backup_dir DUMPFILE=dbning_backup.dmp LOGFILE=restore.log CONTENT=DATA_ONLY # Example: Import Full Database impdp sys/12345 as sysdba DIRECTORY=db_backup_dir DUMPFILE=dbning_backup.dmp LOGFILE=restore.log FULL=Y # Example: Exclude Indexes During Import impdp sys/12345 as sysdba DIRECTORY=db_backup_dir DUMPFILE=dbning_backup.dmp LOGFILE=restore.log EXCLUDE=INDEX # Example: Flashback Import to a Specific Time impdp sys/12345 as sysdba DIRECTORY=db_backup_dir DUMPFILE=dbning_backup.dmp LOGFILE=restore.log FLASHBACK_TIME="TO_TIMESTAMP('2023-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')"

December 9, 2024 · 2 min · 385 words · kidtz

MYSQL Shell Command

General Commands \help # Show help information \status # Display current connection and session status \quit or \exit # Exit MySQL Shell \clear # Clear the screen \history # Show command history \rehash # Update auto-completion data Session Management \connect user@host[:port] # Connect to a MySQL server \reconnect # Reconnect to the last session \disconnect # Disconnect from the current session \use database_name # Switch to a specific database Mode Switching \sql # Switch to SQL mode \js # Switch to JavaScript mode \py # Switch to Python mode Executing SQL Queries SELECT * FROM table_name; # Execute SQL queries (in SQL mode) session.runSql("SQL_QUERY"); # Execute SQL in JavaScript mode session.run_sql("SQL_QUERY") # Execute SQL in Python mode Working with Admin API dba.checkInstanceConfiguration(); # Check instance configuration dba.configureInstance(); # Configure an instance var cluster = dba.createCluster("name") # Create an InnoDB cluster cluster.addInstance("user@host"); # Add an instance to the cluster cluster.status(); # Get cluster status cluster.removeInstance("user@host"); # Remove an instance from the cluster Data Export and Import \util.dumpInstance("path", {options}); # Export instance data \util.loadDump("path", {options}); # Import data Script Execution \source /path/to/script.sql # Run a SQL script file Configuration Management \show defaultCharacterSet # Show default character set \set defaultCharacterSet=utf8mb4 # Set default character set Shell Customization \options # List shell options \set prompt "custom_prompt> " # Customize shell prompt

December 9, 2024 · 2 min · 217 words · kidtz