Last active
August 3, 2023 13:59
-
-
Save stephdl/9ddd0fa3e0c0615ab05642e44b88e003 to your computer and use it in GitHub Desktop.
connect to mariadb container and upload file by scp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# connect to mariadb1 (module_id) | |
ssh mariadb1@localhost | |
# connect to the mysql container as root | |
podman exec -ti mariadb-app mysql | |
# create the database and grant user to all from any IP (external port is closed to 127.0.0.1) | |
MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS mydatabase; | |
MariaDB [(none)]> grant all privileges on mydatabase.* to username identified by 'password'; | |
MariaDB [(none)]> flush privileges; | |
MariaDB [(none)]> exit | |
send all local files by scp (password is 9001) | |
sftp -P 3092 9001@r1.rocky9.org | |
lcd Téléchargements/wordpress-6.2.2-fr_FR/wordpress/ | |
sftp> put -r * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment