Connect to xampp mysql database, project path & backup

Hello,

I am stuck at the moment. I have created my first project and I am working on a secure login page.

Tutorial: Paul Strydom
06. Creating a secure Wappler Login page

I am running xampp on my local machine and I have saved the wappler project in C:\xdata - wappler\myProject. I want to keep all my projects in this folder (backup task running).

  1. How can I alter the path to my project, in case I want to rename the project folder?
  • C:\xdata - wappler\myProjectNewFolderName
  1. How can I connect to my MySQL local xampp database?
  • I go to settings and then

  • General > Project Name: myProject

  • General > Links relative to: Document

  • General > Server Modal: PHP

  • Targets > Target Name: ???

  • Targets > Web Server URL: ???

  • Targets > Access Type: Local Folder

  • Targets > Local Folder: ???

I am just not sure about what "Target " means.

  1. Is there a way to run scheduled backups with Wappler with everything included (database schema)?

Thank you

Have a look at how to setup a project with serverside code/database at https://wappler.io/docs/#Server-Side-Components.

For login and security go to https://wappler.io/docs/#Security-and-Login

You will notice that you will need to place the project files within the wamp/www/ folder. This is important!

ok, thank you
this step confuses me…

I have copied my project folder to:

C:\xampp\htdocs\myProject

Then adjusted my target:

  • Targets > Target Name: myProject
  • Targets > Web Server URL: http://127.0.0.1
  • Targets > Access Type: Local Folder
  • Targets > Local Folder: file:///C:/xampp/htdocs/myProject

So where does Wappler SAVE my project now?
Will the xampp folder now be the path to project?

That would mean I have to save all my projects within the xampp folder.

//=====
How about the database? Does Wappler save the database schema upon deploy or how should we setup our backup? Right now my backup includes the whole xampp folder.

Had to adjust the Web Server URL…now connection works

Web Server URL: http://127.0.0.1/prettyappChargeTracker/

ok.
I have deleted myProject in the wappler project overview and opened an existing project at:

C:/xampp/htdocs/myProject

I guess I will have to save my projects within xampp folder.

sorry, me again

i tried different settings with project targets. i was able to connect, but i still can’t create a server side action > connect database. It says with connection properties:

You have to specify Remote Target in Project Options and Activate it first!

I am still confused on what to enter with my target. i have xampp installed and my project folder is within C:\xampp\htdocs

Could you send some screenshots for me to look at so I can try and assist.

I may be speaking out of turn here because i do not use local targets, and probably havent for the last 5 years, so this is just my best guess.

With a local server like wamp/xampp you have an FTP server installed as well as an apache web server and a mysql server, now even though those are locally available on your machine in a folder like C:/xampp/htdocs/ they are also accessable from an ip address of 127.0.0.1 and/or a domain name of localhost.

So if it were me, my setup would be something like
New Project > Project Name: myProject
New Project > Project Folder: C:/My Documents/Whatever Your Project Is Called
New Project > Type: Website
New Project > Links Relative To: Site Root
New Project > Server Modal: PHP

Thats takes care of the local side, as you can see I pretended like we do not even have a server at this point, I am just placing the project folder inside My Documents or wherever you want, just not inside xampp/htdocs/

Then my new project opens, I click the targets gear icon and hit the Plus button to add another target.
Project Settings > Target Name: Whatever My Project is called
Project Settings > Web Server URL: http://127.0.0.1
Project Settings > Access Type: FTP
Project Settings > FTP Server: 127.0.0.1
Project Settings > Port: Leave Black for Default
Project Settings > Remote Directory: /htdocs/
Project Settings > User: Whatever you setup in your xampp setup of the FTP server
Project Settings > Password: Whatever you setup in your xampp setup of the FTP server
Project Settings > Use Active: OFF

SAVE

So bascally we are pretending to Wappler that this is a real server as such, with an FTP account, with an Apache web server, with a MySQL server and user accounts with privlidges setup and phpMyAdmin or Navicat etc. and can be access remotely at 127.0.0.1

Hope that makes sense.

yes it does make sense.
i tried as adviced.

project folder is on one drive and target folder within xampp/htdocs

here is my current problem:

xampp > MySQL does not have a password. but a password is required within the target form.

i tried to change the password with user “root” inside phpMyAdmin. did not work.
i would really like to connect local.

Paul, all of these complicated steps are not required. He doesn’t need to use FTP.

All you need to do @WatchThatCode is to make sure to select the created target from the dropdown at the bottom of the screen, when you create it and save it.
Your target is properly configured, no need of FTP for server running on your local server!

I suppose that makes sense. I am glad I only use remote connections, seems like an easier way to me. Thanks @Teodor, I think at some stage I will install a local server just to see how it works myself.

ok. connection successful!
but when i try to establish a database connection with my server action, i am still getting error: Target Invalid!

Have you selected the target in the dropdown?
What exactly the error is?

of course …i still had local there instead of project folder.
looks like it is working now.

but i would have banged my head for eternity finding the solution.
thank you

1 Like