Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [student@linfuncent ~]$ sudo mkdir /opt/dbfiles
- [student@linfuncent ~]$ sudo chmod o+w /opt/dbfiles
- [student@linfuncent ~]$ podman run -d --name mydbase -v /opt/dbfiles:/var/lib/mysql:Z -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=mydbase registry.redhat.io/rhel8/mariadb-103
- Error: error creating container storage: the container name "mydbase" is already in use by "f76f56c08d9476243a9d5a74968ee4671a51ecd554a9af0583f980b60f7fcfd5". You have to remove that container to be able to reuse that name.: that name is already in use
- [student@linfuncent ~]$ podman rm mydbase
- f76f56c08d9476243a9d5a74968ee4671a51ecd554a9af0583f980b60f7fcfd5
- [student@linfuncent ~]$ podman run -d --name mydbase -v /opt/dbfiles:/var/lib/mysql:Z -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=mydbase registry.redhat.io/rhel8/mariadb-103
- 83ba4312ebacd9e185ff003253ec3c7f248fd412b00c316e8930a4df81924c55
- [student@linfuncent ~]$ podman ps -a | grep mydb
- 83ba4312ebac registry.redhat.io/rhel8/mariadb-103:latest run-mysqld 8 seconds ago Exited (1) 8 seconds ago mydbase
- [student@linfuncent ~]$ podman logs mydbase
- => sourcing 20-validate-variables.sh ...
- => sourcing 25-validate-replication-variables.sh ...
- => sourcing 30-base-config.sh ...
- ---> 13:19:47 Processing basic MySQL configuration files ...
- => sourcing 60-replication-config.sh ...
- => sourcing 70-s2i-config.sh ...
- ---> 13:19:47 Processing additional arbitrary MySQL configuration provided by s2i ...
- => sourcing 40-paas.cnf ...
- => sourcing 50-my-tuning.cnf ...
- ---> 13:19:47 Initializing database ...
- ---> 13:19:47 Running mysql_install_db ...
- mkdir: cannot create directory '/var/lib/mysql/data': Permission denied
- Fatal error Can't create database directory '/var/lib/mysql/data'
- The latest information about mysql_install_db is available at
- https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
- [student@linfuncent ~]$ podman rm mydbase
- 83ba4312ebacd9e185ff003253ec3c7f248fd412b00c316e8930a4df81924c55
- [student@linfuncent ~]$ sudo chown $(id -un) /opt/dfiles
- chown: cannot access '/opt/dfiles': No such file or directory
- [student@linfuncent ~]$ sudo chown $(id -un) /opt/dbfiles
- [student@linfuncent ~]$ podman run -d --name mydbase -v /opt/dbfiles:/var/lib/mysql:Z -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=mydbase registry.redhat.io/rhel8/mariadb-103
- eab7a3b9ff5436e67256aea7955f8be96186ede921567bae8f7f19416178c8ad
- [student@linfuncent ~]$ podman ps
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- eab7a3b9ff54 registry.redhat.io/rhel8/mariadb-103:latest run-mysqld 3 seconds ago Up 3 seconds ago mydbase
- [student@linfuncent ~]$ ls /opt/dbfiles/
- data mysql.sock
- [student@linfuncent ~]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement