How to start up MySQL workbench and connection for beginners? - mysql

I need a quick and easy way to import MS Excel databases and query them with PL/SQL for a class assignment. So far I've tried downloading MySQL Workbench and SQL Developer based on my class recommendations. MySQL Workbench looks simpler so I'm trying to learn to use that.
I'm completely lost on how to get started. Is it required for me to connect to a SQL database server before importing data? If so, how do I create one? I'm working off of my laptop and again, this is just for class so I don't need anything fancy.
I apologize for the very basic questions, as I have just started with learning databases. I researched for 2+ hours trying to figure out what to do, as my class resources aren't helpful and I must not be googling correctly as I can't find answers. If it's helpful at all, I've been successfully working with MS Access for SQL queries, so I'm comfortable with the environment. Thanks in advance.

xampp is provides a control panel for start/stop the mysql server, you can download xampp from here. After installing xampp set the enviroment variable in your system for recognizing mysql commnad in your command prompt.
you can access mysql command line in your command prompt like this,
mysql -u root

Related

How to access data from a SQL snapshot

I have been given a SQL database snapshot in a file sqlfile.sql
I want to access these data, but I do not know how to proceed. I am new to SQL.
I have a Macbook pro with MacOSX Sierra (10.12) and I have installed mysql with Homebrew. The version of mysql is 8.0.16
running mysql works, I can access the mysql prompt line.
I would like to be able to access the data, in python if possible, but if it has to be through the mysql command line, it is fine. Once I can access the tables, I know how to query the data, that is not any problem.
I tried with MySQL Workbench as well, but it does not work either.
Can someone point me towards some guide on how to proceed? I have spend hours trying to find some clue, but I did not succeed.
Thanks a lot!!!
Finally I managed to solve the problem. It was not really complicated, but I had problems finding the right combination of commands.
What I did was, in the command line enter into the mysql prompt. Once here:
mysql> create database mydatabase
Once done, go outside the mysql prompt and in the normal command line execute:
mysql -uroot -p mydatabase < db_snapshot_file.sql
This populates the database called mydatabase. Once done, from Python I could access it. But first, since I had some problem with the authentication, I had to use this answer to solve it.
To access from Python, I used this information which gave me some indications on how to start.

Connecting my MySQL databases to phpMyAdmin

I am running Mac OS 10.10.2. I have recently been educating myself about php and SQL in order to create an online database application for my employer. However, I have been unable to load up my MySQL databases in phpMyAdmin. I have tried following some advice from this forum, but no answers seem to solve my issue.
I installed MySQLWorkbench (Ver. 6.2.4.12437) as well as XAMPP (Ver. 5.6.3-0), and was using phpMyAdmin to have a play around and better understand what I was getting myself into. I then found one of those follow-the-bouncing-ball type teaching websites which advised me to download and install the MySQL community server (Currently running Ver. 5.6.23)
As instructed, I was learning SQL commands through Terminal and built up some databases/tables this way. I decided I wanted to jump into phpMyAdmin where I felt it'd be easier to continue my work. At first XAMPP was unable to turn on the servers which I overcame by uninstalling and reinstalling. Then I was getting a #2002 error when trying to access phpMyAdmin. I tinkered with config files and put in details relating to my localhost MySQL server (Or at least I assume as much).
I was able to get back into phpMyAdmin finally, but my databases made through terminal are not there.
phpMyAdmin shows: cdcol (the example database), information_schema, mysql, performance_schema, phpmyadmin, and test.
If I open terminal and punch in 'mysql' then 'SHOW DATABASES;' it only lists: information_schema.
If I open terminal and punch in 'mysql' with username 'root' and my password, then 'SHOW DATABASES;' it lists: information_schema, mysql, performance_schema, my tutorial/learning database, and my business database. I dropped the test database from here. THESE are what I want to bring up in phpMyAdmin.
I can only guess that I haven't got it configured properly to access this last mysql server, but I can't determine where I am going wrong. If anyone can shed some light on this, that'd be greatly appreciated.
It appears as if you have two MySQL instances; one from the XAMPP and also the MySQL Community Server that you installed yourself.
The "M" of XAMPP is for MySQL, so yes usually it runs its own MySQL server instance. That's sort of the point of the packaged kit, so you don't have to worry about having any of your own applications installed. In theory it should be no problem to stop the XAMPP MySQL instance and instead use your other one, but may require tweaking some configuration files and is probably not supported. If you can make it work, I don't see a reason why it would be a problem, though.
My suggestion is to either use the complete XAMPP stack or roll your own installation rather than mix and match.

MYSQL - Connect MYSQL Workbench to a MYSQL server on localhost

I know the question I am about to ask is a very stupid once but I am new to MYSQL so please bear with me. Want I want to do is create a database on my local machine and also access/manipulate it from their. I thought MYSQL WB was the all in one tool to do this i.e it will also allow me to create a database and also make a MYSQL server from which to access it. But I came to know the Workbench is just a front end and you need to have a some kind of a seperate MYSQL server module for it to access.
The problem is I can't seem to find any link for a simple a server module on the MYSQL download site.
http://dev.mysql.com/downloads/ .
It has one Cluster Server but I don't think this is what I am looking for. If anyone could provide a link to the MYSQL server module using which I could connect MYSQL Workbench on my local host, and the steps to connect them that would be great.
The one your looking for is named MySQL Community Edition. The current version is 5.6.14. Just select your platform (mac, linux or windows) and follow the installation guide.
If you wish to have php/mysql then you can download xampp. It includes all the necessary tools. Or if you wish to install it separately then follow this for Windows,
http://dev.mysql.com/downloads/installer/

How can I copy a table from one database to another on the same server without shell (command line) access?

I do not use the Shell interface.
I have my own shared Linux server at SoftLayer with WHM and CPanel for my two joomla website installations.
I would like to start migrating populated tables from the old site to the new one.
BUT I don't know how to use shell access, and I prefer a graphical interface anyway.
I am working on installed extensions one at a time.
I saw a mention about MySQL Workbench 6.0.7
http://dev.mysql.com/downloads/tools/workbench/
but am unsure of it's operation on my server.
Any insight on making this task easier or more foolproof would be appreciated.
Export your tables from PHPMyAdmin on your cpanel, then import them to your new server via PHPMyAdmin too.

I need help in exporting an sql file from my database

Good day, I'm currently new in working with databases. I downloaded an application called MySql Worckbench 5.2 CE because I saw that it has an easy way of creating and accessing databases. I'm now in the process of exporting the .sql. Whenever I go to the export tab which looks like this:
After I click on Start Export, it gives me this error:
I'm not sure what the error is cause I'm not familiar with MySql dump.. is there a way to resolve this? or use an alternative way. I'm also not familiar with using mysql from cmd (Windows) but if there is any suggestion or steps I can follow, it would be a great help.
Great and simple tutorial for MySQL Workbench.
http://blancer.com/tutorials/25445/visual-database-creation-with-mysql-workbench/
Check out the Generating SQL section.
Still facing problem. ↓↓↓
Try installing MySQL Workbench on-default Windows directory.
I recommend using PhpMyAdmin
http://www.phpmyadmin.net/home_page/index.php
OR navicat? (not free)
or you can use Sequel Pro for mac (free)