MySQL server not started after installed Apache Cassandra - mysql

I am trying to work with multiple database with single project. I have successfully integrated my project with MySQL database, but after installing Cassandra (by DataStax 3.9.0) I face problem to connect with MySQL database.
I got error
can't connect to MySQL server on '127.0.0.1' (10061)
I have reverted the process and uninstalled Cassandra but there are same issue at time of starting MySQL. Also in the Services TAB in Control Panel, I do not get any option to start MYSQL Service Manually and the Startup type is "Automatic".

Please check if mysql database is already running or not.If running you can stop start with the database you want to work.

Related

How did mysql workbench get my old database?

I created database using mysql from phpmyadmin for some practice purposes. Now I've just downloaded and set up mysql workbench and right after I saw my old database which I created in phpmyadmin and that makes me wonder how did workbench get it?
Both phpMyAdmin and MySQL Workbench are administration/client tools. It is used to connect MySQL Service running on your machine / remote machine called server. (usually on port 3306).
When you create databases or store data which is stored under a folder represented as datadir which is owned by the MySQL service.
how did workbench get it?
Database is managed by MySQL Service, like a phpMyAdmin, Workbench also another client, connecting to same MySQL Service.
Similarly, you can use any other MySQL Client to connect with the same MySQL service running on your machine.
Additionally, you can refer my blog to understand more about MySQL Architecture.

mysql don't connect without running XAMPP mysql

I downloaded XAMPP before to create database of my application with it but when I tried to delete it and use mysql server it didn't connect to server till I downloaded XAMPP again and connect to mysql in XAMPP so mysql server connect successfully, now I want to use mysql server without XAMPP what can I do for that ?
You need to download MySql and run the same as a service.
Download it from here https://www.mysql.com/downloads.
Now after installing it, you can run Mysql as service just by following the below steps:
Press windows + R.
Write services.msc
Find the mysql service in the popup and select the same.
On selecting it, you can see few options appearing on the left panel. Click no start service.
You will be able to connect to mysql then.

databases not visible in mysql workbench sidebar

It started with installation of wampserver for php, before that I had already running MySQL server 5.7 with all databases properly showing in the side schema panel. When I launched MySQL server after installation of wampserver 5.7.14, the password for root was overridden and no database except sys is showing. Also I found another user (mysql.sys) has been created (found in Users and Privileges). Then I looked for databases in path "ProgramData\MySQL\MySQL Server 5.7\Data", all databases are present in the folder (thank god they are not deleted). Problem is now for my website I get this error:
"Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration"
Exception Details: System.Data.Entity.Migrations.Infrastructure.AutomaticMigrationsDisabledException: Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration.
I know this is not related to migrations because my database already exists but I don't know how to solve the problem that MySQL can see the databases in its "ProgramData\MySQL\MySQL Server 5.7\Data" again.
When you installed WAMPServer on a system that already had a MYSQL Server instance installed on it, you created a second MySQL Server instance. See your service you will have one called wampmysqld or wampmysqld64 and another called MYSQL.
Now, whichever service you start first will be the MySQL Server that Workbench, or anything else is talking to. And you will only see the databases that this MySQL Server instance knows about.
Correct Solution:
Stop WAMPServer
Start the MYSQL installed with Workbench
Backup all YOUR databases, NOT the ones created by MySQL like mysql, sys, information_schema, performance_schema
Stop this MYSQL Server.
Uninstall this MySQL Server
Start WAMPServer
Restore your databases to this MySQL Server instance
All should start working as expected now.
Connect your Workbench to WAMPServers MySQL Server
Update
Did a robust workaround, though not very suggestible but database is now accessible in MySQL workbench. Though I'm having the same error when opening the website on local web server. One thing that I did not mention before that environment is Windows based. what I did is copied database from the ProgramData MySQL path to "..\wamp64\bin\mysql\mysql5.7.14\data" path and refreshed schema in workbench. Any advice why I'm still having problem in web server.

Facing issues in MySql and SqlYog using together

I have MySQlWorkBench and SqlYog together on my machine.
And I have XAMPP control panel to start Apache and MySql.
When i have only SqlYog then XAMPP was starting the MySql successfully. But after installing MySql, XAMPP never started the MySql immediately and it starts once i stopped one service perhaps having name like "MySql57" from services.msc.
Please suggest how i could handled together the MySql and SqlYog.
And with this please suggest that how could i connect the MySql and SqlYog from ASP.Net application.
I will really thankful to you.

How to make phpmyadmin to use MySQL server instead of the wampserver64 default one

I have installed both wampserver64 and MySQL server 5.7. The MySQL service from wampserver64 on port 3307 and MySQL server 5.7 on 3306. After trying the androidhive tutorial for connection android app to remote mysql database (which never worked). I noticed that databases created with phpmyadmin doesn´t show up on MySQL server 5.7 and viceversa.
How can i "force" wampserver64´s mysql service to use MySQL server 5.7 that´s on port 3306?
I think changing this line will...
...but my MySQL server 5.7 has no data folder on it (i´ve installed and reinstalled mysql server many times, dont know where is it)
You absolutely should not share the data dir with two MySQL installations that are running at the same time. That can lead to corrupted databases and missing data.
You can configure your phpMyAdmin to talk to both MySQL instances by adding another server in the configuration file, config.inc.php.
If you want to make wampserver use the other MySQL installation completely, the proper way to do so is to edit the configuration files of wampserver to point to the other MySQL server's port or socket rather than to have the two MySQL services share the same datadir.