how can I transfer my MySQL database from my localhost to my WebSite??
My app(Done with Delphi) uses a local MySql database in home netWork Environment. Several users can access my database at the same time from within my home NetWork.
I wish be able to transfer my database to my WebSite so my database will be accessed from users from everywhere.
I have a website powered my Servage.net and have what I need to access my domain.
Please I need step by step directives in order to transfer my database to my website. I am actually use MySql WorkBench!
Thanks in Advance
DatabasesNetworkingMySQL Server
Last Comment
bish wakim
8/22/2022 - Mon
Julian Hansen
Logon to MySQL Workbench
Export
- Select Server => Data Export
- Select the database you want to dump from the dialog by checking the appropriate checkbox
- Select "Export to Self Contained File"
- Browse to where you want the file saved
- Check OFF "Skip Table Data" (bottom right)
- Click Start Export
(You will be asked for your DB password during this process)
Clean Export
- Open exported file and remove first two lines
CREATE DATABASE IF NOT EXISTS `YOURDB` /*!40100 DEFAULT CHARACTER SET utf8 */;USE `YOURDB`;
Importing depends on what is available on your server - if you are able to connect via WB then do as follows Import - WorkBench
- Select Server => Import
- Select Import from Self Contained File
- Browse to file saved in step 1 above
- Select target database from "Default Target Schema" dropdown
- Click Start Import.
Import - PHPMyAdmin
- Logon to PHPMyAdmin
- Select Database from DB list on the left
- Click Import
- Click Browse and browse to the file you saved in step 1
- Click Go NB With most PHPMyAdmin installations you can upload a .zip of your SQL file. If you use this option your file must be named
XXXXXX.sql.zip
Where XXXXXX is a name you choose
bish wakim
ASKER
It seems this is what I need. I will try and come back to you later!
Thanks
bish wakim
ASKER
Hello again Julian
I need answers to some Questions in order to proceed:
1. in the export section I did not see bottom right to check off "Skip table data"
2. do you mean I can use import-WorkBench only without using import-PHPMyAdmin?
3. I think I succeeded to export my database to a location in my computer. I am using FileZilla to access my web site. So what then? is it enough that I upload my database file to there?
Please don't let me down!
thanks
You can't use sftp for this. You'll use a specific tool or command sequence designed to create + load your database.
Also, if you use a CMS like WordPress, you can use a backup/restore plugin like Duplicator or BackupBuddy, which create a zip file + installer file, so in this case you just create an empty database using your hosting panel system or phpMyAdmin + then copy the .zip data file + installer.php file to your site using sftp + navigate to the installer.php file with a Web browser + follow all instructions presented to you.
If this is your first time going this process, you might consider hiring someone to assist you.
Have them make a video of all their steps, so you can do this yourself in the future.
bish wakim
ASKER
Yes this is my first time. I thought it would be simple.
You are right. I had better hire someone to assist me.
may you help me to find somebody?
Hello David
As a matter of fact my application should not run in the web. However with the help of FireDac component it is possible to retrieve data easily from my WebSite(This is what I need)
Thank you for you both. I will try to transfer MySql file to my WebSite using WorkBench.
Export
- Select Server => Data Export
- Select the database you want to dump from the dialog by checking the appropriate checkbox
- Select "Export to Self Contained File"
- Browse to where you want the file saved
- Check OFF "Skip Table Data" (bottom right)
- Click Start Export
(You will be asked for your DB password during this process)
Clean Export
- Open exported file and remove first two lines
Open in new window
Importing depends on what is available on your server - if you are able to connect via WB then do as follows
Import - WorkBench
- Select Server => Import
- Select Import from Self Contained File
- Browse to file saved in step 1 above
- Select target database from "Default Target Schema" dropdown
- Click Start Import.
Import - PHPMyAdmin
- Logon to PHPMyAdmin
- Select Database from DB list on the left
- Click Import
- Click Browse and browse to the file you saved in step 1
- Click Go
NB With most PHPMyAdmin installations you can upload a .zip of your SQL file. If you use this option your file must be named
XXXXXX.sql.zip
Where XXXXXX is a name you choose