I'm trying to understand what is meant by a Server Instance in MySQL. Googling for the term "MySQL Server Instance" reveals nothing, and the only reference I can find in the documentation refers to using the New Server Instance Wizard, but doesn't seem to explain why I'd ever want to use this.
Coming from a Microsoft SQL Server background, a (named) instance is a completely separate and isolated installation of the server, running in its own process and on its own port. However, in MySQL a (server) instance seems to be a different beast, as for starters it seems to use the same port as my "existing" "instance".
From the Home page of MySQL Workbench, I have the option on the right hand side to create a New Server Instance. What is a MySQL Server Instance, and why would I ever want to create a new one?
A server instance is a MySQL server running somewhere, and also how to connect to it. See the reference manual, which says:
A server instance is created to provide a way of connecting to a server to be managed.
Though it is somewhat circular, it makes sense from configuring the control manager's connection options where one can choose to connect to any number of MySQL servers, or connect to the same server in several different ways (like through a VPN or secondary network).
From this it appears each instance actually does have its own port judging from this guide to setting up an additional instance:
http://www.ducea.com/2009/01/19/running-multiple-instances-of-mysql-on-the-same-machine/
I'm not sure how this interacts in terms of named pipes on Windows though.
Related
sorry if title is not so clear, probably I am not finding what I need due I do not know how to search
I have few MySQL servers is separated online servers (from different wordpress) and I want to load some of the data on those databases/tablets into a SQL database located on Azure.
inside Azure portal itself I do not see where to establish external connections, neither at server level, neither at database level
I download and install Microsoft SQL Server Management Studio, connect to the server, I can see my databse and the master one, Security with logins, and Integration Service Catalog, nothing else.
I was looking for something like:
https://www.jetbrains.com/help/go/db-tutorial-connecting-to-ms-sql-server.html#step-3-connect-to-microsoft-sql-server-with-datagrip
but nowhere ...
maybe something like this:
https://www.devart.com/odbc/mysql/docs/microsoft_sql_server_manager_s.htm
but no Servers objects option available on my SSMS
Can be this done?
Note: Azure database is a basic wfor now, if that is a limitation
Some choices.
In your SQL Server Management Studio create a linked server pointing to each MySQL instance. You found the instructions for that. https://www.devart.com/odbc/mysql/docs/microsoft_sql_server_manager_s.htm But it probably will not work in Azure SQL Server; you don't have access to the underlying Windows OS to install stuff like MySQL ODBC drivers, which you need. (You could ask Azure techsupport if they can help.)
In each MySQL instance, try creating a federated table connection to appropriate table in SQL Server. That cross-vendor federation stuff only works in MariaDB, however; MySQL's federation only goes MySQL <--> MySQL.
Write yourself a purpose-built extract / transform / load (ETL) program, and arrange to run it every so often. Program it to connect to all the servers involved, retrieve the data needing to be transferred from your MySQL servers, and update / insert that data on the SQL server.
(edit) You may be able to use command-line SQL client programs. mysqldump, with its --compatible option, may generate usable INSERT statements in a file. You then may be able to use sqlcmd to run those INSERTs on your Azure server. It's going to take some hacking, and may take using sed(1) or awk(1) to make the MySQL output compatible with SQL Server.
I believe the third option is the most robust one for production use.
I am using MAMP Pro and I am having an issue where I cannot find existing databases on Sequel Pro, nor can I create new databases. However, on phpmyadmin, I can see and edit the existing databases and create new ones without any issue. I believe the issue lies with the mysql version on Sequel Pro.
As you can see, on the left, phpmyadmin is running on the MySql server version 5.6.35, as is MAMP Pro, which is in the center of the image. However, Sequel Pro, at the bottom of the image, is running on MySql server version 5.7.18.
I really appreciate any help that can be given, I am close to tearing my hair out!
Thank you!
Clearly the problem is that you're connecting to two different MySQL instances.
Unless you have a good reason to run two MySQL servers on your computer, you should consolidate the databases and remove one. That way you don't get confused when trying to connect. Perhaps you had MAMP installed and also installed another MySQL server; or vice versa. Be careful not to remove the datadir from the MySQL server you're using though, and take backups before you do anything. That's aside from the actual problem, anyway.
You can use the STATUS SQL command to see the connection information — it looks like Sequel Pro is connected via a socket, and STATUS will tell you the path to the socket. Run the command from phpMyAdmin as well to see how it's connecting (it's going to be socket or TCP/IP networking); you can the configure Sequel Pro to connect using the same connection settings phpMyAdmin is using. You could, if you really wanted to, run multiple MySQL instances alongside each other and configure your clients to connect to the proper one (phpMyAdmin at least allows connecting to multiple servers, I assume Sequel pro does as well). You'd use either a different socket or different network port numbers for each server instance — as well as a different datadir for each, since MySQL would not deal well with sharing the data between different versions of the server, especially if they're running concurrently.
To summarize, tell Sequel Pro to connect using the same settings phpMyAdmin is using.
EDIT:
You've determined that MAMP and phpMyAdmin are connecting via the socket /Applications/MAMP/tmp/mysql/mysql.sock — which means they're using the MySQL installed by MAMP (presumably you've installed another MySQL server independently of that). From the Sequel Pro "QUICK CONNECT" page, click over to the "Socket" tab and enter the correct socket like so:
I believe the "Name" field can be anything you prefer, although I don't really know this software program.
If you every use other software, try to remember that '127.0.0.1' and 'localhost' are two very different things to MySQL; the first one always implies using TCP/IP networking and the latter uses sockets (Sequel Pro seems to deal correctly with it so it's not relevant on this connection screen). You, of course, want 'localhost' since you're using sockets.
Im learning how to build a simple web app using PHP and MySQL. Tools:
-XAMPP for database, web and php servers
-Sublime for writing the code itself
-Mac OSX Yosemite
- Workbench for database creation
I'm having trouble understanding (and finding a good tutorial) how Workbench actually works. If I got things correctly, I need to create a connection between the Workbench (tool) and the database which sits "inside" the database server? In my case, provided by XAMPP.
After I get these two talking, I then create, edit, etc. tables inside this database, right?
Currently I have two MySql connections on the homescreen, please see attached file.
Thanks!
It's basically just the connection/transfer method. You can connect to a MySQL server via a named pipe if such ability is provided by the operating system OR via TCP connection which is generally for network access but also works and is widely used for localhost connections.
It is transparent to the user and should not affect the communication between server and the client. Those two will connect to the same database using different types of communication channels.
Specific Question: In a 2-3 week process of learning MySQL and attempting to get a Python stock info scrapping program to feed data into a MySQL schema (database, table) I’m having serious difficulties with connections. Having been bitten by doing something wrong & having to re-install MySQL about 8 times now, I’m getting rightfully leery of just about everything in the installation process. Thus this question:
Is “Local instance MySQL” which shows up in the upper left corner of the first (black) MySQL Workbench screen the proper one to use to connect to the database?
As a follow-up,
What is the difference between the windows service MySQL57, the connection MySQL57, and Local instance MySQL57?
During the very painful process of trying to get MySQL up and running, I think I've gotten further when with a fresh installation the first screen reads “MySQL57” as opposed to “Local instance …”
My setup parameters are pretty vanilla with the exception that I’m putting the MySQL program on my D: drive as opposed to the C: drive (an SSD reserved for the operating sys).
System: Windows 8 64bit on a Xeon Ivy Bridge processor, large SSD’s, large HD’s, mucho RAM, dual X-fired video cards, ASUS Sabertooth MB (self-built a yr ago)
Software: MySQL 5.7, complete installation except for module for Visual Basic and Python3 (running 2.7). Attempting to use the above hardware as both a server & client.
Even though I did my first Fortran programming in 1964, and spent my career on Unix machines, please regard me as a newbie when it come to the jargon associated with databases and client/server communications.
Why am I asking this question? My “down the road question” will be about getting data from Python into the MySQL table, but “first things first” --- I would like to get a nice clean installation that I can trust.
By the way, I’ve thoroughly scoured this site and many others but have not found any answers that fit my requirements; they’re either for a non-Windows environment, too full of jargon for me to understand, or too simplistic to be useful.
TIA, Doug
Seems there's some confusion about certain terms. So let's have a look at each:
MySQL is a server application that you can install and connect to via
TCP/IP (on any platform), named pipes (on Windows) or sockets (on
*nix like platforms). This server is totally independent and has no name or such for identification.
A Windows service to run the MySQL server: this is just a helper to allow running the server when your machine starts up. A service is not strictly necessary to run a MySQL server but without it you would have to manually start/stop the server. You can create as many service entries for a server as you want, but usually it makes no sense to create more than one. Since there can be more than one server (each with an own service) on the box it is highly recommended to give the services speaking names (like MySQL57 for a 5.7 MySQL server, MySQL56 or a 5.6 server etc.).
MySQL Workbench connections are entries that store parameters to connect to a MySQL server. They are not tied to a specific service in general (you can connect to a non-Windows server too), but might be associated with such a service if they are configured for a local server (on a Windows machine) and you want to be able to start/stop this server from within MySQL Workbench (see Administrator section). They use the service name to act on a particular service (you configure that in the Connection manager, System profile). On Windows MySQL Workbench attempts to find installed service (to help new users to get up and running quicker) when it is started and no connection is currently defined. It then automatically creates a connection for each service it found (it uses "mysql*" as pattern to search for services). You can retrigger this process by removing all connections and restart MySQL Workbench.
The created connnections (like the “Local instance MySQL”) appear as tile you can simply click to open that connection. Be aware that clicking on the rightmost 1/4 of the tile will open an information popup only, not open the connection as such.
Now to your question:
What is the difference between the windows service MySQL57, the
connection MySQL57, and Local instance MySQL57?
I don't understand where you see a connection MySQL57. There's usually only a service MySQL57 and connection in MySQL Workbench to the server this service is for involved.
I'm also not sure why this is such a dreadful process for you. Especially for Windows a lot of effort has been put into an easy installation experience. The normal process should be like:
Download the MySQL Installer
Run the installer. Select a typical scenario from the presets or select the individual products you want to have installed, say, a MySQL server + MySQL Workbench.
The installer will download and install the selected components.
Configure your server (like giving it a proper service name, TCP/IP port etc.).
After finishing the installer you start MySQL Workbench and can immediately work with your new server (as described above MySQL Workbench picks up the service automatically).
Depending on your download speed this should be something like a 5 - 10 mins. process.
HTH
with due respect sir , windows service mysql is a service created by windows upon successful to help you start / stop mysql. You can use Local Instance Mysql57 without a glitch, as that is just a way of MySQL representing your local mysql instance in the workbench.
I don't know if I'm searching for the wrong queries in google but I can't seem to find an answer to this. I have SQL Server 2008 installed in my pc and according to services.msc, I've got 2 database engines running: SQLEXPRESS (probably one that came along with Visual Studio) and MSSQLSERVER. When I try to connect only SQLEXPRESS is visible in the Server Name drop down list. I tried to explicitly state MSSQLSERVER by typing in
MYPCNAME\MSSQLSERVER
Didn't work. The best solution I could find in the internet was to enable stuff at Configuration Manager. Didn't work either (although I did find that TCP/VIA and all other options were disabled for MSSQLSERVER).
Anyone have any other ideas on what I should try next or probably something that I overlooked?
By default SQL Express installs itself as a named instance (\SQLExpress) so you need to specify that when connecting to it.
SQL Server doesn't do this (unless you tell it to during setup) so you connect to it with just the machine name.