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.
Related
I installed MySql community server on Windows 10 Home. Then, I installed WAMP server 64 to setup an Apache php server. Finally, I installed Wordpress where my problem arose. All products are current releases just downloaded.
During installation of Wordpress, phpMyAdmin says the database was created and it shows on the left panel. The name is wordpress_db. MySQL Query Workbench doesn't find it with a SQL show databases command. Wordpress gave an error "not found". I finally manually created the db in MySQL Workbench, rebooted, and after restarting Wordpress on the Apache server created I was able to finish the installation. There were no errors showing with the db create from phpMyAdmin and it allowed me to set privileges for users without a problem. I can't explain what happened and don't particularly like mysteries that just go away. They always com back to haunt you!
Can anyone shed any light on what happened during the installation and db_create?
Thanks in advance for anyone who looks at this.
Update
I uninstalled and reinstalled and the problems went away. Now I am running a MySQL instance that isn't distributed directly from the vendor and I lost some of the things that come with MySQLcommunity server.
One thing to note - the installation docs don't tell you to change the port on MariaDB from 3306 to something else using phpMyAdmin when you are using MySql. Once i changed the port, the server instances instantly popped up green. They were initially orange.
thanks
I installed MySQL Workbench recently, and had a bunch of problems starting MySQL. After a lot of troubleshooting I realized the MySQL Services wasn't running. Also I don't have a 'bin' folder in the MySQL directory. I've seen some other weirdness as well. I'm thinking that something may have gotten mangled during the install. Is that a realistic assumption? At this this point is it better to uninstall and then reinstall MySQL? Or is there an easy fix for the MySQL Services not running problem?
My appreciation is as follows::
To be able to use mysql workbench, you have to download a program to run on localhost, these can be Xamp, Wamp, among others.This is the interface of Xampp
After installing any of these programs, you start the mysql service that appears in these programs.Connection from Mysql to localhost
Once the service starts, open your mysql workbench and connect to the localhost.
Finally, create your tables and do your queries in the workbench or in the mysql provided by PhpMyAdmin.
I hope it will be a great help.
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.
I know the question I am about to ask is a very stupid once but I am new to MYSQL so please bear with me. Want I want to do is create a database on my local machine and also access/manipulate it from their. I thought MYSQL WB was the all in one tool to do this i.e it will also allow me to create a database and also make a MYSQL server from which to access it. But I came to know the Workbench is just a front end and you need to have a some kind of a seperate MYSQL server module for it to access.
The problem is I can't seem to find any link for a simple a server module on the MYSQL download site.
http://dev.mysql.com/downloads/ .
It has one Cluster Server but I don't think this is what I am looking for. If anyone could provide a link to the MYSQL server module using which I could connect MYSQL Workbench on my local host, and the steps to connect them that would be great.
The one your looking for is named MySQL Community Edition. The current version is 5.6.14. Just select your platform (mac, linux or windows) and follow the installation guide.
If you wish to have php/mysql then you can download xampp. It includes all the necessary tools. Or if you wish to install it separately then follow this for Windows,
http://dev.mysql.com/downloads/installer/
I recently upgraded to Mountain Lion from Snow Leopard, and in doing so threw my entire local development environment into disarray. I solved the majority of my issues by finally installing MAMP Pro (I was previously using the "native" methods provided by Apple). The problem I have now is I still can't access my old mysql databases. I can view the "new" databases via phpmyadmin in MAMP, but I have old projects that I'd like to work on.
My old databases still exist in /usr/local/mysql/data, but they don't appear in phpmyadmin or even if I query via Terminal (after logging in to mysql & using the show databases; command). I'm sure the answer involves just a few simple commands, but I'm mainly a front-end guy, and I can't for the life of me find the solution on the internets.
Thanks.
UPDATE:
Just a reference for anyone else who might have this issue (or something similar). In order to do the dump, I ended up having to turn off MAMP's instance of MySQL, and starting up the old version (through System Preferences). Otherwise I was getting 1049 errors ("unknown database"), I suppose since it was looking at the new databases instead? Really out of my element here, if you can't tell...
Either way, now it looks like it actually doesn't matter if the MAMP version is active or not. Maybe I just needed to restart all instances of MySQL? Seriously, no clue, but all is good now...
Try this in terminal to dump old databases (replacing [text]):
/usr/local/mysql/bin/mysqldump -u root -p[pass] [db] > [filename].sql
Once you have the sql file you can import it back in with PHPMyAdmin within MAMP.