Why SQL Fiddle doesn't work during "Building schema" and "Run SQL" functions? - mysql

I'm practicing learning MySQL code with SQL Fiddle, it worked sometimes but now I get errors all the time when I use the "Build schema" or "Run SQL" functions.
After a while, the error printed is "Unable to get host connection: Connections could not be acquired from the underlying database!"
Anyone know how to solve the problem? Is there another tool I can use to do practice with queries to my schema?

Install your MariaDB or MySQL database server on your local machine. Install a decent native SQL client program. HeidiSQL is great on Windows. There are plenty for Mac. Any modern laptop computer (since about 2014) can handle a student- or developer- scale database server and client without breaking a sweat.
You can install phpmyadmin. But that's a php web app, so you also have to install a web server and php to get it working. Hence the suggestions for XAMPP or LAMP stack packages. I prefer the native clients; less to go wrong; less stuff in your laptop.
It's best to reserve the database fiddles for sharing SQL demos with other people. Like for Stack Overflow posts.

Related

What tools do you use to connect to AWS Athena via JDBC

I am trying to connect to AWS Athena via my Windows as well as Mac system. My goal is to have a SQL Editor that I can use to perform quick research about the data. I was trying to find tools and tutorials for connecting to Athena. So far I have only found some tutorials around SQL Workbench. What are some other tools that you guys leverage and is there something particular that you like about that tool and how easy was it to setup either on Windows/Mac.
I use SQuirreL SQL for connecting to Athena. It has served the purpose so far. Once you import the JDBC drivers(you can download them from AWS's site) the tool itself is pretty straight forward to setup. The URL that you can use to connect can be seen here -
jdbc:awsathena://AwsRegion=<AWS Region>;User=<AWS Access Key>;Password=<AWS Secret Key>;S3OutputLocation=<S3 folder>
I'm pasting the "Overview" of SQuirreL below:
SQuirreL SQL Client is a graphical Java program that will allow you to
view the structure of a JDBC compliant database, browse the data in
tables, issue SQL commands etc, see Introduction. The minimum version
of Java supported is 1.6.x as of SQuirreL version 3.0. See the Old
Versions page for versions of SQuirreL that will work with older
versions of Java.
SQuirreL's functionality can be extended through the use of plugins.
A short introduction can be found here. To see the change history
(including changes not yet released) click here.
For a more detailed introduction see the English or German of our
paper on SQuirreL.
Susan Cline graciously took the time to document the steps she
followed to setup an Apache Derby database from scratch and use the
SQuirreL SQL Client to explore it.
Quite some time ago Kulvir Singh Bhogal wrote a great tutorial on
SQuirreL and published it at the IBM developerWorks site. He has
kindly allowed us to mirror it locally. The tutorial is not really up
to date but especially for doing the first steps it is still of help.
SQuirrel was originally released under the GNU General Public License.
Since version 1.1beta2 it has been released under the GNU Lesser
General Public License.
Another tool that I have used pretty extensively is SQL Workbench. This is also sort of recommended on the AWS site. The is good, but I found that it would hang up sometimes and I would loose my work.
Both of these can be easily downloaded from the links provided or if you like to use CLI then Homebrew can be used on MacBook or Chocolatey on windows
Some other tools that you can use are DataGrip by JetBrains. Guide to setup the tool can be seen here. The functionality of DataGrip is also built into IntelliJ Ultimate Edition.
DB Visualizer is another tool that can be used to connect to AWS Athena the guide to connect can be found here
TeamSQL and Razor SQL are some other tools that you can leverage.
One of the strengths of JDBC drivers is that as long as a tool supports JDBC, you can use it for any data source which has a JDBC driver. First, get the JAR file for the JDBC driver for Athena here: Amazon Athena Connect with JDBC. Java works across platforms, so as long as you have Java in your Windows/Mac environment, you should have no problem using any of these tools.
The tool SQL Workbench/J is fairly popular, but I find it frustrating to work with when switching between multiple databases.
Another tool is Squirrel SQL, which also supports JDBC drivers. I prefer it, but it looks a little less pretty than SQL Workbench/J. Once you've downloaded the JDBC driver, configure it in SquirrelSQL by going to Drivers and then adding a new one. Label it "Amazon Athena" and specify the Example URL as jdbc:awsathena://AwsRegion=[Region];User=
[AccessKey];Password=[SecretKey];S3OutputLocation=[Output];
[Property1]=[Value1];[Property2]=[Value2];...
Leave the Website URL Blank, but specify the Class Name as com.simba.athena.jdbc.Driver. Add the .jar file of the JDBC driver to the "Extra Class Path" page.
Once you've set up the driver, you can set up connections by going to the Alias tab and hitting the plus sign. Simply fill in the values in the example URL to point to your data source. Once you're connected, you're good to start writing queries.
SquirrelSQL saves the connection information for you, allowing you to quickly jump between data sources, and makes it easy to write multiple queries in one input window, with their outputs going to separate tabs in the output pane. I've used it for database, exploration, DDL, and regular day-to-day tasks with data. It's been good for most anything I've connected it to. It is definitely not perfect, but it's getting better all the time.
I guess you need a Docker SQL Editor that you can use to perform quick research about the data.
But I suggest two ways.
One is Offline/Online and with installation methods, which you can use with a fixed connection.
The first solution is to select a system as a server and connect to it from other operating systems. This is the traditional / old solution.
In the second solution you just need to be trained to work with Docker. This is a newer and more popular solution.
if you want use MySQL in MAC read this article :
Installing MySQL in a Mac OS X environment
If you want use MySQL in windows read this article :
How to Install MySQL on Windows
But you need a synchronous space for use MySQL or other DBMS you can use docker.
Docker is very Flexible . But you need connect to internet.
If you want use Docker read this article and view docker site :
Docker : SITE
Docker Doc : Start a Remote MySQL Server with Docker quickly

Realm Object Server + server performance monitoring

I am looking to implement some performance monitoring on my ROS server.
I'm running Ubuntu 16.04 running on a VPS. Unfortunately the VPS has no performance statistics. So I'm looking to install a tool or connect to a server that will help me understand the load the server is experiencing.
I'm specifically considering deploying Prometheus. Although it looks like quiet an effort to get it running I figure it's the most comprehensive tool available.
Before I start I want to be sure that this is achievable and it will not impact the ROS performance/capability.
Has anyone implemented performance monitoring? Did you use a particular service or tool and did you use a great document/page to help you install and configure?
Closed. See my comment, in the end I used Datadog, which appears to be very good.

LAMP Server, MYSQL, PuTTy

I am connection to a LAMP Server trough PuTTY.
I have no idea if there is a GUI available so I'm doing this trough the CLI. The problem now is that I need certain fields from the database and I have no idea how the database looks since the lack of documentation.
How should I approach this. In the database there are 148 tables. Should I just go trough every table one at a time? Is there a smart way?
Thanks.
You could always install PHPMyAdmin, but if you don't have access to do so, you can try MySQL Workbench. This installs on your computer, and you just put in your server info and connect
There's plenty of GUI tools available for MySQL, some that you normally install on the server and others that you run on your desktop, here's a short list:
MySQL Workbench - Official mysql gui tool with really nice features (especially coming to db design)
PHPMyAdmin - web based interface, can be installed on the server and reached through a web interface.
HeidiSQL (free, windows) - desktop app
SQLYog (lot's of features, costs money) - desktop app
Sequel Pro (free, slim and good for macosx) - desktop app
You can also use the mysql-query browser for connect database.
Download link for window use : ->
http://downloads.mysql.com/archives/query/

MySQL standalone or via XAMPP?

This is my first question ever at stackoverflow, hope I make sense out of it. I am starting to learn about databases and also programming these days. So I would want to get some advice on MySQL database. Though it's open source and available for download, Should I install the standalone MySQL GUI version on my laptop (Windows 7 32bit) or should I install XAMPP and then access it through phpMyAdmin ?? My purpose of asking this question is that , for starters..I am learning SQL and querying. And then I would want to learn to create web application using php or JavaEE.
I am completely unaware of these concepts, so I would appreciate if someone can just take few minutes and guide me accordingly.
Thanks !
Regards
and welcome :)
If you're planning on concentrating on PHP more than MySQL, it's a good start to install XAMPP. It's more lightweight and contains both PHP and Mysql. It's better for you to concentrate on learning the basics first, rather than spend time on software components. That's why I would choose XAMPP (or my personal favorite: WAMP Server)
If you'd like to spend a bit more time on database management such as user management, jobs,... it could be interesting to download the Mysql server package from their site.
Also, that package comes with example databases which you can use to learn some SELECT and UPDATE queries. It queries a lot easier that PHPMyAdmin.
If your goal is to use MySQL with self-made applications, get XAMPP and learn some PHP before diving into queries
And then I would want to learn to create web application using php
In this case XAMPP should be your friend. BTW with XAMPP you get an MySQL-Server which is identically with the MySQL standalone. You can fire your querys by using phpmyadmin, or connect via shell (console) or thridparty programms ....
In case that you are using NPM, you can install a standalone version of MySQL using the mysql-server package: https://www.npmjs.com/package/mysql-server

Flash Application with local database (not sqlite, not air)

I would like to have a Flash Application (not air) to connect to a local database.
Air is not only getting unsupported by Adobe in LINUX but besides, it has serious problems and miss implementation with SQLite.
So we want to connect to a local MySQL database.
This application should be simple, so we do not want to also have an unnecessary web server (also local) to make a middle communication between the flash app and the MySQL server.
There is this driver that allow to communicate Flash with MySQL
http://code.google.com/p/assql/
Question is:
Is this the best approach?
Would it be any problem using this approach when installing the whole application to each client? (because we also in the installation should install a MySQL server).
A MySQL SERVER is called a SERVER for a reason: It is meant to be installed on servers, not on clients. So the answer to your question is:
1) No, this is not the best approach. Not even close. You would be better off using a SQLite database (however shitty you may think it is)
2) Yes. Nobody would like installing a MySQL server on their computers just for the sake of running your application. Think of casual (non-expert) users who would need to install and configure the server just for running your app. That is the very REASON why they developed SQLite and so many languages support it.
You should check out http://code.google.com/p/air-sqlite/ for sqlite access in AIR (I don't know if this is the same as the inbuilt code or not, so just check that out)