• spinhead

    (@spinhead)


    A database shown in phpMyAdmin and Mysql Workbench doesn’t show when invoking SHOW DATABASES running mysql from the Mac terminal.

    My end goal is to use the WordPress command line tool on my local MAMP WordPress installation.

    I have MAMP installed and running on my Mac. WordPress is installed and working fine. PhpMyAdmin sees the database ‘wordpress’ just fine, and behaves as I’d expect it to.

    Using Mysql Workbench, I was able to list all the databases properly.

    MAMP, phpMA, and MySQL are all using port 3306 (I changed the MAMP defaults, and have confirmed in the config files etc. for everything.)

    Running mysql (logged in as root, with password) the command SHOW DATABASES lists the 4 default databases but not the ‘wordpress’ database.

    I do not know how to confirm that the commands I’m running in Mac’s terminal are using port 3306, or even confirm that I’m not accidentally using some other instance of MySQL.

    • This topic was modified 2 years ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • wlpdrpat

    (@wlpdrpat)

    @spinhead You need to check the status of your MySQL from Mac Terminal to see what instance is running. It sounds like you have an additional instance of MySQL running from Mac Terminal; otherwise it would show the wordpress db. If that is the case then you need to stop the current instance of MySQL and start the correct instance.

    $ systemctl status mysql

    Should display the status of the instance that is running.

    There are many online sources for MySQL support that you can easily access via Google.

    This one will help you understand how to start and stop instances and check the status.
    https://zetcode.com/mysql/firststeps/

    Thread Starter spinhead

    (@spinhead)

    I would love to identify which instance I’m running in each of the two places, since that is obviously what’s happening, but I don’t see how checking the status of MySQL, showing that it is up and running, tells me which instance is which.

    According to the wp-cli docs, it logs in using the credentials in wp-config.php which are the same credentials being used by phpMyAdmin and MySQL Workbench. This makes it quite difficult to identify where, how, why, and what different instance is being run at the command line.

    I’m here because my identical post on the MySQL forum has gone unanswered; that forum doesn’t seem to be very active.

    Having 40+ years of database experience, I don’t need help with basic commands, I need a specific answer to my exact question.

    Thread Starter spinhead

    (@spinhead)

    apologies; I didn’t mean to sound like a jerk. I did sound like one, but I didn’t mean to.

    I’ve been hammering at this for months, and every time I think I’m one step away, I’m only one step away from the next problem.

    this seemed like such a straightforward issue: I know I’m running multiple instances, it’s obvious from the symptoms. shouldn’t there be an easy way to determine which is what? I am a master googler, yet I can find no existing answer, and no one seems to even have a guess.

    wlpdrpat

    (@wlpdrpat)

    @spinhead I get your frustration…no offense taken. However, this forum is specifically for WordPress related issues. I happen to be very familiar with MySQL and have used it with multiple different types of configurations. I’m also pretty good on a Mac. Unfortunately, I have no way of knowing a person’s background or experience level when they post a question here. I just do my best to help when and where I can, however, I am not a WordPress staffer – I’m an independent business owner that enjoys helping others in my spare time.

    I don’t know your exact file structure but I would assume you have something like this: /usr/local/mysql/ The mysql directory may also include the version details in the directory name or as a sub-directory of mysql there may be mysql-version-details.

    Navigate to inspect those directories and see if there are multiple instances. Inside the directory that includes the version details you should see sub-directories for the various database names. Find the one that has wordpress (or whatever your wordpress database is named) and that is the version you want to keep.

    Next you need to stop the instance that you are not going to keep. Stopping it will depend on how it was installed. Take a look here: https://stackoverflow.com/questions/100948/how-do-you-stop-mysql-on-a-mac-os-install

    Once it is stopped you need to change the instance of MySQL. Take a look here: https://www.positronx.io/how-to-install-mysql-on-mac-configure-mysql-in-terminal/

    Next you need to start the correct instance via Mac Terminal.

    Personally, I would delete the extra instance but once you have it configured properly the extra instance should pose any significant problems.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘database shown in phpMyAdmin not listed by mysql cli’ is closed to new replies.