Hey,
i am looking to create a mysql database for one of my websites and i was wondering if it can be installed along side OMV6 without any conflics
not intrested in using docker as the remote connection is way longer to get working
thanks
Hey,
i am looking to create a mysql database for one of my websites and i was wondering if it can be installed along side OMV6 without any conflics
not intrested in using docker as the remote connection is way longer to get working
thanks
i was wondering if it can be installed along side OMV6 without any conflics
not intrested in using docker as the remote connection is way longer to get working
Yes but it would take way longer to get working without docker. You could do it with one docker-compose file and the compose plugin. Maybe I will even work on adding an example to the compose plugin to do this.
Just create shared folders on one data disk called:
See later post...
hmm, i will try this
Yes but it would take way longer to get working without docker. You could do it with one docker-compose file and the compose plugin. Maybe I will even work on adding an example to the compose plugin to do this.
Just create shared folders on one data disk called:
- code
- nginxconf
- phpconf
- database
- phpmyadmin
CodeAlles anzeigenversion: "3" services: nginx: restart: always image: nginx ports: - "8080:80" volumes: - /srv/dev-disk-by-uuid-USE_YOUR_UUID_FROM_SHAREDFOLDER_TAB/code:/code - /srv/dev-disk-by-uuid-USE_YOUR_UUID_FROM_SHAREDFOLDER_TAB/nginxconf/default.conf:/etc/nginx/conf.d/default.conf php: restart: always image: php:fpm volumes: - /srv/dev-disk-by-uuid-USE_YOUR_UUID_FROM_SHAREDFOLDER_TAB/code:/code - /srv/dev-disk-by-uuid-USE_YOUR_UUID_FROM_SHAREDFOLDER_TAB/phpconf/php.ini:/usr/local/etc/php/php.ini mysql: image: mysql environment: MYSQL_ROOT_PASSWORD: SOME_DIFFICULT_PASSWORD restart: always volumes: - /srv/dev-disk-by-uuid-USE_YOUR_UUID_FROM_SHAREDFOLDER_TAB/database:/var/lib/mysql ports: - "3306:3306" phpmyadmin: image: phpmyadmin/phpmyadmin environment: PMA_HOST: mysql PMA_USER: root PMA_PASSWORD: ANOTHER_DIFFICULT_PASSWORD ports: - "8081:80" restart: always volumes: - /srv/dev-disk-by-uuid-USE_YOUR_UUID_FROM_SHAREDFOLDER_TAB/phpmyadmin/php.ini:/usr/local/etc/php/php.ini
This is going to need work. Playing with it now.
ok, it is much simpler and working on my system. I also added the compose to the compose plugin samples list.
I was over-complicating it with nginx and php-fpm. With this, you just login via root and my_secret_password. leave the host blank.
version: '3'
services:
db:
image: mysql
container_name: db
environment:
MYSQL_ROOT_PASSWORD: my_secret_password
ports:
- "3306:3306"
volumes:
- /srv/dev-disk-by-uuid-f4986fb7-838b-41ab-bc30-cfd22e29a4d1/database:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: pma
links:
- db
environment:
PMA_HOST: db
PMA_PORT: 3306
PMA_ARBITRARY: 1
restart: always
ports:
- 8081:80
Alles anzeigen
i tried the first one, it seemed to be working
although not sure how the remote connection will work for the website to connect to this docker mysql
ok, it is much simpler and working on my system. I also added the compose to the compose plugin samples list.
I was over-complicating it with nginx and php-fpm. With this, you just login via root and my_secret_password. leave the host blank.
CodeAlles anzeigenversion: '3' services: db: image: mysql container_name: db environment: MYSQL_ROOT_PASSWORD: my_secret_password ports: - "3306:3306" volumes: - /srv/dev-disk-by-uuid-f4986fb7-838b-41ab-bc30-cfd22e29a4d1/database:/var/lib/mysql phpmyadmin: image: phpmyadmin/phpmyadmin container_name: pma links: - db environment: PMA_HOST: db PMA_PORT: 3306 PMA_ARBITRARY: 1 restart: always ports: - 8081:80
I just tested the sample in the plugin and it is working well with just creating one shared folder called database.
ah i went for the overkill way and created there own shared folder lool
I just tested the sample in the plugin and it is working well with just creating one shared folder called database.
The overkill ends up with nginx and php-fpm running that neither mysql nor phpmyadmin needs. Not the end of the world but definitely not needed.
thanks,
any idea where the mysql config be located? i need to enable remote connection
The overkill ends up with nginx and php-fpm running that neither mysql nor phpmyadmin needs. Not the end of the world but definitely not needed.
any idea where the mysql config be located? i need to enable remote connection
The mysql config isn't exposed in this but remote connection is already enabled (doesn't really make sense for it not to be enabled in a docker container):
$ mysql -h omv6dev -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 8.0.31 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
Alles anzeigen
The mysql config isn't exposed in this but remote connection is already enabled (doesn't really make sense for it not to be enabled in a docker container):
CodeAlles anzeigen$ mysql -h omv6dev -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 22 Server version: 8.0.31 MySQL Community Server - GPL Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.00 sec)
ah explains why i cant find it, still wierd tho cant seem to connect with the credentials i have set from the other server possibly something im missing out?
Zitatah explains why i cant find it, still wierd tho cant seem to connect with the credentials i have set from the other server possibly something im missing out?
Did you create a database and user for this other server? The default compose file doesn't create any databases that you would use for applications. If you did create a database and user, did you create a user that can connect from all IPs using '%'?
i managed to connect on the other server via root instead of the user of the DB, i should prob go about altering this somehow
i should prob go about altering this somehow
You should be able to do this in phpmyadmin. Sorry, I don't use phpmyadmin though (mysql admin at work but always use command line).
You should be able to do this in phpmyadmin. Sorry, I don't use phpmyadmin though (mysql admin at work but always use command line).
i learned on phpmyadmin so ive just always stuck to what ive known but atleast i can connect thats the main thing
progress is progress and ive learned something new tonight, thanks
You should be able to do this in phpmyadmin. Sorry, I don't use phpmyadmin though (mysql admin at work but always use command line).
wait just wanted to ask something, the phpmyadmin panel is accessible without password?
the phpmyadmin panel is accessible without password?
No. In the initial config, only root with the password you specify in the compose file should be able to access it. If you create a user in phpmyadmin for an app database, that user should be able to login to phpmyadmin as well but shouldn't see the mysql or sys databases.
for some reason not in this case, i go to the link serverip:8081 and it has a phpmyadmin wide ass open? no login prompt
Could this be missing?
PMA_CONTROLPASS: '' or the ' <---- ----> '
for some reason not in this case, i go to the link serverip:8081 and it has a phpmyadmin wide ass open? no login prompt
Could this be missing?
PMA_CONTROLPASS: '' or the ' <---- ----> '
Sounds like it is using your previous login. If you close your browser and open it, do you still not get a login prompt? My install is not wide open and I am not using the PMA_CONTROLPASS environment variable.
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!