Issue with the database backup on the new version

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Issue with the database backup on the new version

Post by jsetzer » 2021-06-16 19:02

If you can connect to database "TecnoApps" on localhost, port 3307 with user "root" and password using Adminer, but mysqldump command with identical settings and credentials raises error "Unknown MySQL server host 'localhost:3307'", actually, I have no idea right now.

If the server is the same and all settings and credentials are 100% identical, I see no reason why mysqldump commandline executable can not find the database server, but php (Adminer) can.

Sorry, no better idea than triple checking all settings and credentials. Perhaps open cmd and execute the command with given parameters manually and check for error messages or warnings.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

federico
Veteran Member
Posts: 74
Joined: 2020-10-29 14:52

Re: Issue with the database backup on the new version

Post by federico » 2021-06-17 21:11

I have no idea right now :lol:
thanks Jan

Anyway from PowerShell this works:
mysqldump -u root -p --port=3307 -h localhost TecnoApps > BackUpTecnoApps.sql

I found a nice file of 8Mb

Could it be windows server permissions? no.. I'm logged as admin...
Should I create a root user?

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Issue with the database backup on the new version

Post by jsetzer » 2021-06-18 05:27

You don't have to create a "root" user, becaue you already have one. Have a look at your config.php file. There are the credentials which AppGini uses to connect to your database. According to your information, there will be the following lines:

Code: Select all

	$dbUsername = 'root';
	$dbPassword = '...YOUR.PASSWORD...';
Your generated application will use those for connecting to your DB. So, if you can login into your application and see the expected database, those connection parameters in config.php will be fine.

When executing mysqldump command, as you can see in the error message, AppGini passes exactly the same parameters to the command.

Don't mix up Windows-User | database user | logged in user.

Code: Select all

Could it be windows server permissions?
I don't think so, because the Apache webserver, which starts the mysqldump command, should be installed as a service having permission to start executables. Additionally, the error message does not speak about "cannot execute mysqldump.exe" but says "cannot find database server on port 3307"

So, I still don't have any idea why mysqldump cannot find the database server on that port, if you are on the same machine with 100% identical credentials and port settings.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

federico
Veteran Member
Posts: 74
Joined: 2020-10-29 14:52

Re: Issue with the database backup on the new version

Post by federico » 2021-06-18 14:09

Thank you Jan. I'll get a look during the weekend. I'll come back as I have news. Hope very soon and I hope good news

federico
Veteran Member
Posts: 74
Joined: 2020-10-29 14:52

Re: Issue with the database backup on the new version

Post by federico » 2021-06-19 16:58

I guess I have many problems on my lovely windows server 2016...
Let's say that I fixed by a workaround: I created a batch file from the command line and I run it in IperiusBackup before to make the server backup everyday, so it is scheduled too.
It's not clear to me why if I use powershell I get a file of 8MB meanwhile if I use the batch file I get 4Mb. I don't see any zip extension
And it could be a problem to recover the backup because I don't know how to do it yet :?:

Post Reply