How to configure Hibernate Tools HQL editor in Eclipse with a custom NamingStrategy
I didn't use Hibernate Tools in Eclipse. But here is an alternative solution to issue HQL statements against your database.
there is tool called HQE Hibernate Query Editor. Hibernate Query Editor (HQE) is a simple application designed to make easy the work of writting HQL/SQL queries for Hibernate. It has simple features like syntax highlight and other editing stuff.
more information about HQE can be found here https://hqe.dev.java.net/
ben-ju
Updated on July 09, 2022Comments
-
ben-ju almost 2 years
Here is the command I used to create containers :
docker network create prestashop docker run -ti --name db --network prestashop -e MYSQL_ROOT_PASSWORD=1234 -p 3307:3306 -d mysql:latest docker run -ti --name prestashop --network prestashop -e DB_SERVER=db -p 8080:80 -d prestashop/prestashop
With that I can access to the Prestashop installation however when I need to configure the database I get this error :
Database Server is not found. Please verify the login, password and server fields (DbPDO)
I'm using thoses fields :
Database server address : (for this one I tried :) db | 127.0.0.1:3037 | 127.0.0.1 Database name : prestashop Database login : root Database password : 1234
And I'm stuck to this step
EDIT :
Tried :
Insert another computer the same commands, everything works until I try to connect from the prestashop database configuration.
Removing the
-ti
options from the command line like @balexandre said.
Update
The issue come from the MySQL Version 8. I changed the
mysql:latest
tomysql:5.7
and everything is working but this is not the version I'm looking for. I still have no clue why MySQL 8 doesn't work-
balexandre over 3 yearscan you access the database from a GUI? meaning you can connect to the database? - this is how I actually run my docker services, in case you want to have a look
-
ben-ju over 3 yearsYes i'm using : mysql --host=127.0.0.1 --port=3307 --user=root --password=1234 and evrything seems to work
-
balexandre over 3 yearsnever worked with, but maybe investigating if PrestaShop can connect to any other port that is not the default one?
-
ben-ju over 3 yearsyes it says that the default port is 3306 but you can specify by typing <address:port>
-
digitaljoel about 15 yearsgood thought... wouldn't start out of the box for me in cmd.exe or cygwin even without me mucking it up with additional configuration.
-
digitaljoel over 14 yearsYour blog entry doesn't reference the hibernate tools plugin at all.
-
Erick Luz over 4 yearsthe link is broken
-
ben-ju over 3 yearsYes, I tried this solution as mentionned in the doc, does this worked for you ? Because I still get the error
-
balexandre over 3 yearsyou can see it works for me, it says "Connection to MySQL server succeeded"... the warning is that it will create a new database as the one mentioned in "Database name" does not exist yet....
-
balexandre over 3 years@ben-ju the only thing different is, I didn't use the interaction param, so I didn't run the docker commands with
-ti
, just removed that to run normally as I didn't need to jump inside the CLI -
ben-ju over 3 yearssorry, I was in lunch break thanks for your response. I tried to recreate with the command and by removing the -ti, still have the same issue. I must have done something wrong if yours is working by the command I wrote
-
balexandre over 3 yearsI've executed step by step and worked... try to remove the images and start again. Stop both containers, remove containers and then remove the images...
-
ben-ju over 3 yearsI completely uninstalled docker, images, containers, networks. I tried using mysql:latest and mysql:8.0 and for both I can't connect to the database. But when I try to connect to my database with the command line you wrote :
mysql -uroot -padmin -h localhost --port 3307
I connect to my apache server and not the docker container. This one worksdocker exec -it db mysql -uroot -p
-
ben-ju over 3 yearsThanks a lot for your patience, I really appreciate that you took time for a junior. I found the solution. Prestashop is not familiar with the plugin
caching_sha2_password
so I had to change it to mysql_native_password on theroot@%
user -
Jono over 2 yearsHas anyone got a docker-compose.yml solution for this?
-
Jono over 2 yearsI made a Docker Compose solution: gist.github.com/jonpontet/f82ca436c44208a765da705921ed444c