Deleting MySQL LocalHost Server in MySQL Workbench - mysql

I set up a MySQL LocalHost server on my computer a few weeks ago. I've been testing some code on the server, but now I'd like to delete it. When I open up my MySQL Workbench Workspace view, the server LocalHost pops up under the "Server Administration" and "Open Connection to Start Querying" sections. I right click on the LocalHost listings under both sections and delete them. Unfortunately, when I restart MySQL Workbench, the LocalHost instance I deleted from the previous session pops back up. How do I permanently get rid of the LocalHost instance in my MySQL Workbench Workspace view?

MySQL Workbench will load the localhost server instance by default. As of Workbench 5.2.40 there does not seem to be a way to disable this action.
If you truly do not wish to see the server in Workbench then I am assuming you are no longer using the localhost server as you said it was for testing anyways. If you uninstall the server from your machine then it will no longer show up in Workbench. However, given the small footprint of two list items (for the server and the connection) it hardly seems worth getting bothered over IMO.

As of Workbench 6, the local connections are no longer automatically added after a restart. However, to add them, right-click on the Workbench Home screen and select "Rescan for Local MySQL Connections" from the context-menu.

Related

Workbench doesn't connect to mySQL server (MacOS)

I'm trying to start workbench 8.0.32 from macOS ventura and the result is that it connects to the localhost but never starts.
I have tried to use the brew version of mySQL, the .dmg version and I get no results with either one.
I try to connect with root user and password configured from terminal.
On Sequel Ace I can access without problem, also from VScode, but not from workbench and I need it to study.
screenshot workbench problem
As seen in the image, the connection is made correctly, but it stays connecting forever and never opens the manager, I have tried to configure the connection in several different ways and I have not obtained any results, I have also tried to install different versions of mySQl and from Workbench and nothing. I currently use brew mySQL version 8.0.32 , but I could change to whatever is needed.

WAMP server switch MySQL to MariaDB

How can I switch the database from MySQL to MariaDB in WAMP 3.1.0?
I'm looking for it, but I can not find it.
From the image you show it looks like both MySQL and MariaDB are already running!
NOTE: Thats a bit memory hungry!
Simple test to see if both MySQL and MariaDB are running. Launch phpMyAdmin and look at the login screen. If both are running you should see a Server Choise dropdown under the Username and Password fields. In there you will see 2 options like below.
To pick MySQL or MariaDB, right click on the wampmanager icon in the system tray and you should see this this menu
Just click on either MySQL or MariaDB to Enable or Disable either or both database servers. If there is a green tick beside the database server name, like above against MySQL, then that database server is configured to run, and if no tick exists, that server is not configured to run.
Alternatively, just look at the services.msc snap-in to see if the database server is a) installed and b) running (started)
Small note WAMPServer is now at V3.1.2, the update can be found here This contains a fix that if I remember correctly, contains a relevant fix. This is the WAMPServer backup repo, but it is a lot easier to navigate than SourceForge and is often more up to date than SourceForge as Oto does not have to jump through all the SourceForge loops to keep it up to date.
Also note: that MariaDB and MySQL cannot both run on the same port i.e. 3306. So by default MySQL runs on 3306 and MariaDB runs on 3307. When you come to write PHP code you will have to specify port 3307 on your database connection code to make the connection to MariaDB if you are going to run both at the same time.
Alternatively, if you want to use just MariaDB, Turn off MySQL and then switch MariaDB to use port 3306. There are menu items that make it quite easy if you look for them.

MySql workbench not responding w local server

I have been using MySql Workbench to connect to a local MySql server and to remote MySql Servers. The last couple of days the Workbench freezes when I connect to the local version. It still works for the remote servers.
I am using workbench 6.3.4 and then tried 6.2.5 just to see if it is a version issue.
I also can access the local MySql instance using HeidiSQL.
Any recommendations on what to look for?
Update
The advice to recreate the connection solved the issue. I just created a new one and it works fine.
A couple of things you can try:
Try restarting the sql server (remember, workbench is just a utility for accessing a db, it does not host the database for you)
See if you can access mysql on the command prompt / terminal, the command for mac & windows
(once you navigate to the mysql folder, try the command:)
mysql -u root
(if you have a password-protected account, the command will be
mysql -u someuser -p
If the above doesn't work, mysql is either offline or denying you access (depending on response), and you'll need to setup the server / assign privileges.
If all else fails, it may help to try another version of SQL / Workbench (for a easy-to-use sql sever setup, I'd recommend WAMP or MAMP, assuming you want a HTTP server bundled with it)
Additionally, it may help to recreate the local connection in workbench (of if your getting regular crashes, reinstall & update workbench). Good luck with it.

How to show different databases MySQL workbench?

I downloaded MySQL, and installed it correctly.
When I started the MySQL workbench it shows me these databases (I don't remember all of them):
sakila
test
world
It is ok, they are work, I can access them with no problems. But later I installed xampp, after that when start MySQL workbench it shows me different databases:
cdcol
phpmyadmin
test
webauth
I can't access the previous databases.
How to switch between them?, or
view them all?
Not sure whether xampp uninstalled your first server, but it is more likely that its installation changed the default MySQL TCP/IP port (3306). Maybe both servers try to run on the same port (which doesn't work) and one failed to start (in this case the first installation).
So what you need is to make each server run on its own port. You can use MySQL Workbench to make the necessary change. However first you need to check if still both servers are installed. Do you have 2 MySQL services running? Switch off one of them and connect with MySQL to the running server. If that works shut this down and run the other service. Connect again with MySQL but this time go to the admin section, config file, and change the port to e.g. 3307. Save and restart the server (all within WB possible). Now you should be able to run both servers at the same time (provided the first one runs still on the default port). Create a second connection and server instance in WB so that you can access one server at 3306 and the other at 3307
If there's only one MySQL service entry then xamp has removed the previous installation and you must install it again if you really need two servers.

MySQL remote connection slow even after enabling skip-name-resolve

I have a development environment set up with remote access to a shared dev database.
I'm experiencing VERY slow response time from the remote MySQL server. I've added skip-name-resolve to the my.cnf file, restarted mysqld, and also verified that it is indeed, turned on via 'show variables' at the mysql command line.
Interestingly, if I connect to the command line interface remotely via
mysql -h IPADDRESS -u USERNAME -p
All commands are executed lightning fast.
Select * on a large table comes down the pipe instantaneously.
I'm wondering why the CLI would allow immediate response, but the php connection in my application waits 8-10 seconds before returning any data from the remote MySQL server. It's an Amazon EC2 instance, and it's the Amazon linux ami, seems to be similar to CentOS. Any ideas?
Thanks!
I've just solved same problem I was having, took me 4 days.
Apache was ok
MySQL was ok too
Problem was in my script - gethostbyaddr();
when accessing web server on the localhost is fine.
But when accessing the server from another computer takes ages, so for now I have commented out gethostbyaddr() and it is fast as if run from localhost.
I am guessing gethostbyaddr() is some sort of Windows DNS issue which I'll look into later
I'd start by determining where the slowness comes from. Is it in establishing the connection when you open the db, or is it in returning the results from the select, or both? You don't say what version of PHP you're using or what version MySQL is running on the server. My money would be on that specific combination being problematic. Make sure you're running the latest updates on your AMI.