html button for mysql database backup and send to gmail - html

i have researched that doing backup and restoring mysql databases is done through phpmyadmin.
I just want to ask, is it possible to have a button in a webpage that will let the user automatically backup a database and send it to his/her desired email account? the backup will be in a zip file.

Just a couple of things
1) phpMyAdmin is just a GUI to manage a mysql database. Basically just a user friendly way to interact with the db without having to use command line.
2)What you want to do is certainly possible in various ways.
You need some sort of server. If you are new to programming you could use an apache server and php as backend technology ( use xampp for a ready to use hosting environment ).
Basically the tasks are the following :
1)Serve a webpage with a button
2)On click of button call another page that connects to the db, backs it up, saves the backup to disk and then emails it. I'm sure there are lots of examples on the web, just make a quick google search :)

Yes it is possible to do that with php or any other server side language which have a functions to deal with MySQL or any type of database

You can program it , here is a good answer on that
Stakeoverflow question &
implementation from dzone

Here is the code on github which could help you.https://github.com/tazotodua/useful-php-scripts/blob/master/export-mysql-database-sql-backup.php

Related

Can I use elfinder to browse items from database like mysql

Instead of using elfinder to browse files. Can I use elfinder to browse Items from database like MySQL.
I'm working on MVC.net
Thanks
Not with elFinder, no, but you can use other open source tools such as Adminer, which works very nicely. Adminer requires PHP.
https://www.adminer.org/
Note this is for general overall DBA tasks for the person running the site, if your aim is to provide limited access to update and retrieve things out of MySQL for end-users usually people code this up themselves, half the web is app servers querying MySQL for stuff.

mySQL database using phpMYAdmin and Joomla3

I have a database built in Php myAdmin, and I want to connect it to a form I have on a joomla3 website. But when I fill details in on form, all data goes to default joomla3 database and not my database. Anyone got any ideas around this ?
I need my front end form data connecting with my own database not the default database in Joomla.
Thanks in advance.
Probably what you want may be figured out by following this Joomla docs instructions.
You can install the great RS Forms component for a small fee - this allows complete control of the form and you can wire it to your own php script to process the form.
You need to be careful to protect your script from bad data designed to hack your site as people enter code into the form - js is not enough you need to scrub the data before you attempt to do anything with it.

MYSQL Database offline use

Is there a way to use a MYSQL database without the database management system.. Like use tables offline without installing the db management system on the machine..
If there is can you please point me in the right direction?
Thank you!
As far as I know, there is no way to do this.
However, there is a portable DBMS SQLIte. It comes in different ways and can be used on other platform with different programming languages.
After reading your comment, I'm almost sure, this is what you need.
It's not that fast as MySQL I guess, but it works.
You can use The embedded MySQL Server Library to access MySQL data files without running the MySQL server.
You can setup a database to work on your localhost. This will be offline unless you setup the front-end stuff to let the internet interact with it.
What exactly do you mean "without the database management system"? You always need a way of interacting with it, even if it is offline. (Otherwise how can it work for you?)
The server side piece of the application, mysql-server, is needed at a minumum to run mysql. This server application comes with all the tools built-in to manage the instance. I doubt you can prevent installation of this.
If you've actually opened the table files in a hex or text editor, you'll see that you will definitely need the mysql application installed to make any sense of them to use them. Sure the records are all there in plain text (.myd files for myisam, the ibdata1 file for innodb tables), but it would be a complete time-waster devising a custom app to parse or update the file structure, as well as trying to tie in table structure contained in the related files for each table.

Migrating Widget Settings in WordPress

I've done a lot of WordPress migrations from one server to another at work and elsewhere, but one strange thing I've never been able to understand is why widget settings never get carried over.
I'll dump the MySQL database, find/replace localhost with the live domain, SSH the database up to the live server, and then ftp the whole WP installation (core and theme, from my local machine), and still the widget settings are wiped out. And sometimes this is also the case with values saved in theme options pages I make in the Dashboard.
What am I missing?
Wordpress stores widget options - and some plugins and themes also store their options - as serialized data, and so you have to be more careful than a full find/replace of the URLs.
Much more comprehensive answer and some other ways to do move databases and retain serialized data: https://wordpress.stackexchange.com/questions/9076/why-is-my-database-import-losing-text-widget-data
To move a wordpress site and to reconvert all serialized data I used this script.
the using is very simple, download the script, change the credential variable to the database inside the php script and run it.
link to download the script:
http://davidcoveney.com/575/php-serialization-fix-for-wordpress-migrations/
work fine.
Don't do it manually!
Dont edit database manually when migrating between different domains!
Use small scripts, like this:
Wordpress-Migrator.php (read description too.)
because SERIALIZED arrays needs to be modified specifically too!!!

Uploading a Website

This is my first time building a website and using CodeIgniter for a school project. I was wondering whether you have any tips on uploading CI to a free web host , my database, free webhosting and basic security tips.
Can I just upload the entire CI folder? Or do I have to upload individual files (God no!)? What are my options?
What about my MySQL database - do I just upload my mysqldump to the webhost?
Also, can you recommend a good free webhost. I was thinking about 000webhost.
Any basic tips on security would also be appreciated (I've implemented many of the form_validation rules like xss_clean for starters)
Any other suggestions will be more than welcome. Thanks!
I used 000webhost.com long time ago and remembered having minor inconvenient here and there (i.e.: slow connection, server unreachable sometime). I don't have any suggestion on a good free webhost because in most situation the words "good" and "free webhost" do not belong in the same sentence. You get what you paid for.
Now, onto the uploading itself.
You need to upload the entire CI folder and your app as well
You can either zip them all and extract the zip if you have shell access to the server
You can use FTP to upload all files at once
MySQL DB: if you have SQL scripts, you can execute them in phpMyAdmin interface if the web host provider gives you access to it. Please read phpMyAdmin documentation for ways to upload your MySQL data.
In terms of security:
http://codeigniter.com/user_guide/installation/index.html
http://codeigniter.com/user_guide/general/security.html
Sanitize user input if you're using SQL expression directly
If you are using CI ORM/database library, make sure you keep yourself up to date to any security issues by checking CI mailing-list, IRC, or whichever the preferred communication channel the CI people use.
For simplicity, avoid HTML tags (as a user) input, treat them as literal
Instead of uploading individual files make the entire directory into a zip folder (or any compressed folder) to save bandwidth and time.
Also most webhosts will have an uploader, but im not sure about free hosts supporting database services, you would have to look into that.