Does the mysql program running under the linux terminal look at the same databases as the phpmyadmin tool?
The problem that I have is that using "show databases;" in mysql in the terminal I can see a database I created, but in the phpmyadmin tool it does not show up in the list of databases.
Consequently my php programs cannot find the database (I am trying to get started with the yii2 cms framework).
How is it possible that the phpmyadmin and the mysql command show different databases? They are both logged in as the same user. ie..
"select user();" executed in the mysql command and in phpmyadmin both say: root#localhost.
phpmyadmin uses the local host to connect with mysql, so you have to check if you have an apache server running and connected with phpmyadmin... The terminal works when you install mysql... So if you have not configured the apache server this will heappen.
Related
I have installed mysql using dmg from mysql website.
mysql-8.0.23-macos10.15-x86_64.pkg
package version: mysql-8.0.23-macos10.15-x86_64.dmg
I have connected to localhost server using: mysql connect -h127.0.0.1 -uroot
I am successfully connected and able to run operation/queries.
But not able to connect through django project. I suspect it is due to server not running. I am unable to understand when server is not running how i am able to connect from terminal.
UPDATE:
After reading answer on dba exchange I realised it might be because I
ran kill to stop mysql server.
I am trying to configure my Linux server to create a staging environment for my Wordpress Multisite. I am trying to access the wp_options table to be able to make changes, but I'm getting a garbled mess of dashes when I attempt to "SELECT * FROM WP_OPTIONS".
To counter this, I am attempting to use MySQL Workbench to see if it tidies up the mess. However, while I see the database entitled "wordpress" when I SSH into the server (I'm using Google Cloud Platform as my host), I do NOT see the database when I use MySQL Workbench!
I'm running sudo when activating mysql in SSH, and I'm logging in as "root" when using MySql workbench, so the permissions should be the same.
Below is the comparison between the SSH and what I'm seeing after running a "SHOW DATABASES;" command between them:
How can I get the wordpress database to show up in MySQL Workbench???
Edit 1: I have ruled out that this is a permissions issue- using SELECT_CURRENTUSER(); I see that I am logged in as the exact same account in both (root#%), so despite having the EXACT same permissions I am getting different tables showing.
You should consider logging in through your root session and then updating your permissions to view the database as the correct user, from whatever server you'd like.
GRANT ALL PRIVILEGES ON <Database Name>.* TO '<Username>'#'%';
I searched for this topic and couldn't find any relevant help. A coworker of mine has MYSQL server set up on a Windows 7 machine. On the same network, I have a machine running Centos 7. I have also installed MariaDB on my machine.
How do I access my coworker's MYSQL database (and any tables in it) from my machine?
He has given me the IP address of his machine, the username and password for the database, and the name of the database. We're on the same network and I can ping his IP from the Centos command prompt and get a response.
Do I need to be at the MariaDB prompt on my machine before I can access his MYSQL database?
My ultimate goal is to retrieve some data from one of his tables and join it (or manipulate it) to some of the data in one of my tables in my MariaDB database, and he should be able to do the same thing (i.e., access data in my tables in my database). I hope the question is specific enough.
Once you have the CentOS MySQL client installed ( yum install mysql ) . In the Bash shell execute the following:
mysql -u YOUR_MYSQL_USERNAME -p YOUR_MYSQL_PASSWORD -h MYSQL_SERVER_IPADDRESS
You can also omit your password after the -p and it will prompt you for it so it does not get logged in your bash history.
Your coworker may also need to grant access to your host address to the database as explained in the following thread.
https://stackoverflow.com/a/10236195/3006366
Once logged into the server successfully, you will be at a mysql> prompt. From here you can select the database to query use MYDATABASE; then run any queries.
I can't access phpMyAdmin on XAMPP for Windows and the problem must be with MySQL, because on the XAMPP Status, it says MySQL database is DEACTIVATED. But on my XAMPP Control Panel Application, I've already started MySQL and it says Running, although I didn't check the Svc tick box (Is that necessary?). How to activate MySQL database so that I can run phpMyAdmin?
Also, when I open phpMyAdmin page, it says :
*Error
MySQL said: Documentation
2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
Connection for controluser as defined in your configuration failed.*
I've already done a research for an answer to this question, but none of them works for me.
XAMPP only summarys MySQL (Database Server) & Apache (Webserver) in one setup and u can manage them with the xampp starter.
Aftet the successfully installation navigate to your xampp folder and execute the xampp-control.exe
Press the start Button at the mysql line.
Now u started successfully mysql. Now there are 2 different ways to administrate your mysql server and his databases.
But at first u have to set/change the MySQL Root password. Start the Apache server and open at your browser localhost or 127.0.0.1. If you didn't deleted anything from the htdocs folder the xampp status page appears. Navigate to security settings and change your mysql root password.
Now after this, you can browse to your phpmyadmin under localhost or download a windows mysql client for example navicat lite or mysql workbench. Install it and log to your mysql server with your new root password.
In this question I am using Windows 7 32-bit, and MySQL Workbench 5.2.35 CE Rev 7915
I'm trying to create and connect to a mysql database on my localhost. It seems obvious. I should start up Workbench, go to Server Administration -> New Server Instance, tick the 'localhost' radio button and follow the wizard. But I get to the 'Test DB Connection' step and it fails to 'Open Database Connection'. The Message Log says:
Connecting to MySQL server localhost...
Can't connect to MySQL server on '127.0.0.1' (10061)
Now, my question is this: Am I supposed to have already installed and started up a MySQL server on my localhost with some tool or program other than Workbench? It seems like this wizard is just supposed to create a connection to an already existing mysql server, but I don't know how to create a server on my localhost. I hoped Workbench would provide a way to do all of this: Create MySQL server, start it up, connect to it, query it, etc. but it seems like maybe it can only connect to already existing servers.
What should I do to create a MySQL server on my local machine and connect to it with MySQL Workbench?
You can't. MySQL Server and MySQL Workbench are separate products, as Workbench is a GUI to the Server. To install both, download "MySQL Installer for Windows" and (by default) it will install both (and other) MySQL products.