Using MySQL workbench I can't create new connections - mysql

I have a freshly installed workbench 6.3 version and a 5.1 mysql Server version.
I already have connections created. Namely, I can successfully connecto to local Instance MySQL56, which I assume is a default connection. I have two, way older connections that have appeared even though last time I used this program (and later uninstalled) was months ago, with another version.
I've read what I've found and felt could help
MySQL Workbench 5.2 CE, Windows 7, "Can't connect to MySQL Server on 127.0.0.1 (10061)"
MySQL Workbench: "Can't connect to MySQL server on 127.0.0.1' (10061)" error
And tried every option. Nothing works. I try to create a connection with this steps:
Database -> manage connections -> bottom left corner: New
Then I give it a name, leave everything as default, put a pw into the vault, and try to test it. Does not work. Whatever combination I try, it does not work. Yes server is running, I've tried 3 different ways of checking.
I do not understand at all how something I've done in the past is taking me so many hours, I do not know what I'm missing, but I can't create a new connection.
Also to be noted, in case it's useful: On default schema, I write the name of a schema I previously created. Thing is, as I said, I've tried every combination. But when I've tried to save said schema in a folder, workbench has instantly crashed. Twice already.
I'm all out of ideas, so if anyone can tell me what to do, it'd be of great help, I find nothing following guides out there.

Related

How do I restart a MySQL local instance in MySQL workbench?

I've recently gotten into databases for a class I'm currently in, and I need a little bit of help. I've managed to create a database, and even populate a table with data which I was then able to grab from a node.js project I've made in Atom. Wonderful! When I went to shut it down, all seemed normal but now it won't restart. As in, when I'm in the homepage section of MySQL I double click the local instance I made(I can only assume this is opening the connection to the local instance where my database is stored) but it won't start up. I don't know what I'm doing wrong. Here is an image of the error I'm getting. I can only assume it's because the actual server isn't on but I don't know how to turn it on.
Any help is much appreciated!
Thank you!
As according to the users ikiK, P.Salmon, and Y4glory the issue I was having was that I wasn't actually turning on the server. I was able to do so by going through my Window's Services application, finding the MySQL server and starting it there instead of trying to do so through the workbench.
Once again, thank you to those who commented as that was really helpful!!
I have tried every other way mentioned here and other related posts, but it did not solve my problem, the service just wont start, but the below approach with the mysql-installer did.
For this to work you need to have your installer which you have used earlier to install MySql.
Start your windows mysql installer. For me it was "mysql-installer-community-8.0.20.0"
Then remove/uninstall the SQL Server and remove all configurations
Manually delete the SQL Server folder from "C:\Program Files\MySQL\MySQL Server 8.0."
Start your mysql installer again and install the SQL Server again
You can check now that the MySqL Server has started.
Hope it helps someone.

AWS MySQL Database Disappearing

I have a MySQL database running on AWS RDS. I have a node.js server that queries the MySQL database. Everything is fine for most days but around once a week, my node server says "Unknown database."
I try to query the database with MySQL Workbench and receive the same message. I have checked my instance and it is running fine with the status being "available."
To fix the issue, I have to recreate the database which means I lose all my data.
Has anyone had issues with this? This is very frustrating since I have no idea what would cause this problem.
We‘re running MySQL RDS databases since AWS launch and never had such an issue. Are you sure the created database is really gone? Do you maybe have a job running at an interval that doesn’t work as intended? What do the RDS logs say?
To debug the issue you can
have a look at RDS server logs
enable query logging to table and analyze queries fired at the server
run a small instance which is not touched for the period to proof it’s not a RDS-related isssue
A few years later...lol. I had the same problem and realised you have to be connected to the same domain in AWS as your database. If you know the connection string of your database, find the domain it is in. Then in the top right hand side of the aws console you should see a drop down that shows the current domain you are logged into. My guess is the two are not the same. Change the value of the drop down and you should see your database.

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 password not taking after new account creation

I'm running MySQL 5.5 on Ubuntu Linux 12.04. I set MySQL up with a root user and two accounts to access the db with using Workbench. The root user works just fine and I can use it to access the DB from Workbench and other programs (like RapidAnalytics), but when I try and access the DB with my other two accounts it will recognize the user, but it won't recognize the password. I know I've entered them correctly, I've reset them a few times, I'm 99.99% certain I'm putting the right password in. On top of that, I've set up both users as DBAs, it made no difference. I made sure they had schema privledges, still nothing (though I may have done that last one wrong. I Just went into the users panel in Workbench and used the wizard they had there...)
I set a MySQL DB up on Windows 7 in the last few days, and that one works just fine. I'm quite certain I followed the same procedure...
At any rate, I have two questions.
Firstly, I read on another thread that this happens sometimes when more than one version of MySQL is installed on Linux. But I'm kind of new to Linux and I'm not sure how to figure out if I have more than one version installed. Can someone please advise if that is a good theory and if so, how to go about checking for what I have installed?
Secondly, well, I'm really just out of ideas. If someone could point me in a good direction...I'm just not sure what to ask Google anymore.

MySQL can't connect - ERROR 2002 (HY000). Please HELP!

I was using mysql, trying to add some foreign keys to a database on a Debian server... and all of a sudden I started getting this message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
No matter what I do, I get this message. If I restart mysql, it just spits this crap out a bunch of times.
I have rebooted the server a bunch of times, and it's not going away. I have no idea what I did... I was just changing the schema of a database that has actually been in production for over a year.
I recently changed the domain name of this server, but mysql was working for a few days after this change.
Beyond that, I can't think of anything I did differently.
Please help. I have to get this database back online.
EDIT: Joy, mysql corrupted my actual database by trying to add foreign keys into a freaking database. The database is toast.
Good thing I have backups, but this is unreal.
This seems to be a useful link. It suggests starting mysql daemon, then type mysql.
/etc/init.d/mysqld start
mysql
If that does not work check the config files for both your mysql client and server to make sure they are pointing to the correct locations.
It turns out that the database was corrupted. If you're also getting an error like this that defies reason, try showing tables and selecting data out of your basic default databases that comes with mysql just to be sure.
In my case, dropping and adding foreign keys actually destroyed my database, which explains why rebooting the server or restarting mysqld was having no effect.