How to synchronize Mysql Database from 3 Different Computer? - mysql

I want to synchronize one mysql database from 3 computer. But sometimes main pc can be closed.
Question 1: How can I make a database like a cloud database?
Question 2: Is there any free cloud database? If yes how can we connect with node.js and php?

From the information that you have shared, I feel that you need to look at a different stackexchange forum where the first question is answered.
Regarding the second question - yes. There are other databases like Cassandra that supports clustering.

Related

Where should I store images for my website? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 months ago.
Improve this question
I've built a simple website with authorization and registration system.
So I have user accounts and I wonder where to store profile pictures for every user.
I tried to store them in MYSQL in BLOB, but I don't think it is the best way to do this.
Most people have the opinion that files should reside on the filesystem, outside the database. But there are exceptions to every rule. There are some good reasons to keep large binaries inside the database, depending on your project requirements.
See some of my past answers on this topic:
Should I use MySQL blob field type?
What is difference between storing data in a blob, vs. storing a pointer to a file?
VARCHAR(MAX) vs TEXT vs .txt file for use in MySQL database
I also cover this in the chapter "Phantom Files" in my book, SQL Antipatterns Volume 1: Avoiding the Pitfalls of Database Programming.
The short answer is in most cases a file system (eg. the server where your code is hosted, if that's an option).
Read this short article:
Storing images in a database table is not recommended. There are too many disadvantages to this approach. Storing the image data in the table requires the database server to process and traffic huge amounts of data that could be better spent on processing it is best suited to. A file server can process such image files much better. Source: Store Images in the Database
If you do not have access to storing images on your server or enough space, you could take a look into hosting you images on an image server.

How to remote connect to SQL server via php website [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a laravel website and a MySQL database for it.
My website has few users, and any user has a SQL database on his computer and that database has the same name, same password, and same configuration.
Now I want my user login to my website and via website information, make changes to his SQL database on his computer.
How can I do this?
How can I connect to any SQL database on user's computer by my website?
The direct answer to your question is that if you know the details of your users' machines, you can create connection strings for them in your config file, and use those connections to open MySQL sessions on the client machines - see https://laravel.com/docs/5.5/database, section "Using Multiple Database Connections".
This assumes all the machines are accessible from your server - presumably because they are on the same, local, non-internet-accessible network.
If your user's machines are accessible from the Internet, please do not do this - they will get hacked. It's a question of "when", not "if".
It's also a pretty horrible solution from an application architecture point of view - presumably the databases on the users' machines expect certain things about the database to be true, and your application would have to guarantee all those things. For instance, your application might expect "all orders have a valid customer; all customers have a valid country code". That's hard enough to guarantee on a single database, but on a distributed system, it's really hard.
It's much better to use MySQL replication for scenarios like this.

Creating an online mySQL Database [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Is it possible to make an mySQL database on the web so that any person from any network can access it? For example if somebody in Europe downloads my program, it will still be able to connect to the mySQL database without problems.
Currently, I am using Connector J with a locally hosted mySQL database.
Edit: Basically I want to create an online mySQL database (not locally hosted) where anybody can download my program and the program from any internet connection can read and write the data from the server online.
Also are there any free online mySQL hosting services?
Edit:
For example, java games access data online from a database, but they are not on the same database. How can I achieve this? Are mySQL databases still the way to go?
It's difficult to understand your purpose but what I perceived from your question is maybe you are looking for some sort of cloud app service like Heroku. Take a look at their ClearDB add-on and see if that fulfills your need.
[This was supposed to be a comment but due to the lack of my Reputation points I have to submit it as an answer]

MySQL Framework [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am looking for a MySQL Framework. I have a database ready containing 100's of tables. I just want to attach a front-end to this database using which one can edit, modify and delete the data in the database. I am not willing to write php code for this work as I have some time-constraint. So does a solution for this exist? In my basic research I stumbled upon Xataface. How is it? Are there any other solution?
Thanks
There are some other as well:
HeidiSQL
phpMyAdmin
SQLyog and MONyog
For database modeling:
MySQL Workbench
You can try SQLyog which has 30-day free trial. You can download it from here. List of features available: http://www.webyog.com/en/sqlyog_feature_matrix.php
i would recommend phpmyadmin. It has many features and it more user friendly
The main PhpMyAdmin features are as follows:
User-friendly web interface;
Support for most MySQL functions like browse, drop, create, copy and
alter databases, tables, views, fields and indexes, execute MySQL
queries, manage stored procedures and functions;
Import data from CSV and SQL files;
Export data to various formats: CSV, SQL, XML, PDF, ISO/IEC 26300 -
OpenDocument Text and Spreadsheet, Word, Excel, LATEX and others;
Searching globally in a database or a subset of it;
And much more.
For an user interface, you can try phpmyadmin as a web based and a lot of desktop applications depending upon your operating systems.
If you are looking at a programming framework for the user, then cakephp or rails are an excellent option - you would have to need extra tables for storing metadata though.
If you are looking for a GUI to work with MySQL databases, you can try dbForge Studio for MySQL. Try Trial or free Express edition. Here it is a list of features.

Which one should I use: MySQL Lite or SQLite? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am starting a simple windows forms application that requires a database to store inventory and purchasing records (less than 1000 items). What I want to ask is for your opinion which 'lite' database should I use for this small project, considering that the prerequisites I'll be installing in a client computer should have 'minimal' file size.
The client computer has a running OS of Windows 7, and I don't want him to install so many files, such as the .NET framework and the server that hosts the database, just to install the main application I'm currently developing.
What I'm really asking from you guys is to find out which of these two commonly known databases should I use, and look for the 'right recipe' to be used when building the installer. Thank you.
Of the two, SQLite is simpler to install and deploy. Fewer files, smaller distribution footprint and fewer configuration options to deal with (mostly because SQLite is a library that links into your application where as MySQL is a full client/server RDBMS).
SQLite is made for extremely simple database needs, and is probably a good fit based on your description.
I have never heard of MySQL Lite and a web search turned up nothing, so I will assume you meant MySQL. MySQL is a RDBS client/server system and probably major overkill unless you plan to store many records, or to have multiple people accessing the database at the same time.