How did mysql workbench get my old database? - mysql

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.

Related

Running local MySQL instance + connecting to Crystal Reports

I am on Windows 7 32-bit.
I have a .SQL file database backup/dump from our relational database software/server. I need to run this locally, as our relational database is going to the cloud where ODBC connections, etc won't be permitted at first. I use this MySQL database for reporting and so I still need to connect it to Crystal Reports, but locally. I have a daily .SQL backup file I can download from an FTP site to keep it up to date.
I am attempting a local MySQL database instance now, no server just a local database that I can query from in Crystal Reports. But I am having issues.
How do I:
1. Successfully Run a local instance of MySQL on my computer.
2. Connect the instance to Crystal Reports via MySQL driver setup.
3. Perform a import + restore to bring the database copy into the live instance.
download MySQL installer here:
http://dev.mysql.com/downloads/installer/
And then I downloaded MySql WorkBench.
At workbench's connection configuration I put hostname as "127.0.0.1" ( I also attempted "localhost"), port "3306", user: "root", password is empty.
I click "test connection" and it gives me this error:
"Can't connect to MySQL server on '127.0.0.1' (10061)"
What am I missing?
Based on your posted instructions that you followed, I didn't see any mention of mysql itself being installed.
The MySQL workbench is not the actual server, but a suite of tools use to help manage it.
In the installer for MySQL you should see an option for an instance of mysql or some verbiage to that effect, if not "MySQL Server". That is what you also need to install.

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.

How can we view the databases/tables created in phpmyadmin in the MySQL workbench schemas section?

How can we view the databases/tables created in phpmyadmin in the MySQL workbench schemas section? In my case the database created in the phpmyadmin are not reflected in workbench(v-6.3) and mysql server v-5.7.12.How can I check that the phpmyadmin used is reflecting the correct workbench.
I am running the phpmyadmin locally (XAMPP 5.6.20-0) and I am using Mac OS X El-capitan. Is the import only option copy all databases/tables created in phpmyadmin into MySQL and visa versa?Please advice
As long as MySQL Workbench and phpMyAdmin are connected to the same MySQL instance, any changes made in one program should immediately be visible from the other. You might be restricted if you're connecting as different, non-administrative users who doesn't have access to the same databases.
From each program (MySQL Workbench and phpMyAdmin), issue the STATUS; SQL command and compare the host and port or socket. If they don't match, you would seem to have more than one MySQL installed on your machine.
The fact that you have specifically mentioned installing MySQL server and XAMPP makes this highly likely; XAMPP comes with its own version of MySQL server and you should pick one to access from both client programs to minimize confusion.

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 create a connection with MySQL Admin?

I am extremly new with databases. I have only created one, and that was in SQLite on android. I downloaded MySQL Admin for linux (Ubuntu) and downloaded and installed Admin. Now I want to create a database, but I jave know idea what I'm doing. I created a connection via the drop down menu option 'Open Connection Editor', and I keep getting a 'MySQL Error Nr. 2005' error. Do I have to do something command line wise first to set up the database?
Any help is appreciated.
Aedon
MySQL is different to SQLite in that you need to have some server software running the whole time managing the database. It's that server software that you connect a MySQL client to.
You need to grab yourself a copy of MySQL Server then I'd recommend this tutorial
Good luck!
If you are using Ubuntu you can install MySQL Server easily with this command:
sudo apt-get install mysql-server
and then I suggest you to download MySQL Workbench, it's a GUI Tool where you can do almost everything with MySQL databases (create,drop,alter, modeling, administer the service).
Then, you can create a connection with mysql workbench or mysql admin (or another client) and do your stuff. If you installed the server in your PC then the parameter are something like this:
host = localhost
user = root
password = (the password you specified in the installation)