phpMyAdmin and mysql not showing the same database - php

I have setup WAMP which I managed by using a tutorial and everything seems fine... I am logging into mysql as the root user with full privileges granted and I am able to create databases in mysql and view them by using SHOW DATABASES; so far so good !
...However...
When I access phpMyAdmin and go to the databases section, there are no databases which I have created in mysql, even though phpMyAdmin shows the Database server as User:root#localhost which is the same user I am accessing mysql with.
This situation is also the same when reversed, I can create a database as the root user in phpMyAdmin but the database will not show in mysql when I am logged in as root user and use SHOW DATABASES;
i have tried every soution available ONLINE ..
most of them saying about
$cfg['Servers'][$i]['hide_db'] = '';
i have done that too ....
but nothing seems to work....
plzzzz help

Related

cant connect opencart to mySQL database

I'm trying to set up opencart for my website, but when I fill in everything for the MySQL database I get this error:
No connection could be made because the target machine actively refused it.
I've tried putting it on localhost, I've tried on 127.0.0.1. when I try on 192.168.1.126 (the database server) it says it can't find the database
the server hosting the PHP site is on 192.168.1.125
I'm very new to SQL, I really don't understand it fully. I'm creating a new database in SQL workbench. and filling in the info I need. How to I fix this error?
My guess is that your DB user is only allowed to access the DB server from 127.0.0.1. You might want to grant additional privileges to it and in your SQL shell run something like
GRANT ALL PRIVILEGES ON *.* To 'your-db-user'#'192.168.1.125'

phpBB and mySQL "Could not connect to the database..."

I am trying to set up a phpBB forum on a locally hosted webpage. It being done in an openSUSE Linux OS.
I have installed MariaDB (MySQL), and created a new database named new_database using the command CREATE DATABASE new_database;, along with a user named user with the command CREATE USER 'new_user'#'localhost' IDENTIFIED BY 'password';. I also changed the root password to password, just for testing purposes.
When I enter this info into the phpBB installation database settings screen, I get the error
Could not connect to the database, see error message below.
Access denied for user 'new_user'#'localhost' to database 'new_database'.
I am using localhost for the DSN. Any ideas? From everything I've found online it should be working...
After you create the user you have to Grant Privileges, this is how you do it.
GRANT ALL PRIVILEGES ON new_database.* TO 'newuser'#'localhost';
Do not forget to flush.
FLUSH PRIVILEGES
Common Privileges
ALL PRIVILEGES- all access
CREATE- allows them to create new tables or databases
DROP- allows them to them to delete tables or databases
DELETE- allows them to delete rows from tables
INSERT- allows them to insert rows into tables
SELECT- allows them to use the Select command to read through databases
UPDATE- allow them to update table rows
GRANT OPTION- allows them to grant or remove other users' privileges
You can specify the database and table.
new_database.* (Specific Database, all tables)
new_database.table (Specific Database, specific table)
*.* (all databases, al tables)
I had the same issue with a phpBB install and solved the problem by accessing the database through phpMyAdmin and noticing on the splash page it said "User: pits#localhost", which was different from the user (pits_bull) I had created and attached to the database and was trying to connect with.
I tried it with just "pits" and it worked. Not sure whether there is a security issue with that though, or why it worked, but it IS working!

HowTo configure phpMyAdmin to show specific databases only for root user

I just installed phpMyAdmin 4 on Ubuntu 14.04 with access for multiple users.
This works fine but I am wondering how to hide specific databases for all users except root.
For all users I edited /etc/phpmyadmin/config.inc.php:
$cfg['Servers'][$i]['hide_db'] = '^(information_schema|mysql)$';
And how to configure phpMyAdmin to show this databases only for root?
Instead of hiding the database, I would recommend removing their access via the Users menu. Typically you should only allow users access to the tables they need access to; hiding a database would not prevent them from dropping a hidden table or even changing the root password via a SQL statement if they still have access to the users table.

MySQL not showing databases created in phpMyAdmin

I'm trying to build a database for my server in phpmyadmin but when I finish building it I can't access it using PHP and it won't show when I list the databases in MySQL. But when I create a database in mySql it shows up in phpmyadmin. Also I'm running phpmyadmin version 4.0.3, and theres a statement at the bottom of the page saying The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here.
Thanks!
I just had the problem, and realized that I was creating database with names with '_test' suffixes.
It happens that phpmyadmin has a feature to hide some DBs. To change that behaviour, you can navigate to : settings > features > general > Hide databases
By default, hiddent databases have these patterns : information_schema|mysql|performance_schema|test|phpmyadmin
If you Still don't see it, Try to logout and then log in again to cPanel or PHPMyAdmin. It worked for me.
This sounds like a permissions issue. I'd guess that your phpMyAdmin is connecting to MySQL as root (or another user with the superuser privilege) and can therefore see all databases. Your app is probably connected using a different, lower privileged user.
Try running select user(); from your app and from phpMyAdmin and you will know for sure.
Assuming your app is running with a different user, you will need to add privilages for it to access the database you create. Please read the section titled Assigning privileges to user for a specific database in the phpMyAdmin documentation.
This is pure permission issue.
If you logged in without specifying the user, you won't see all the databases just like #t3po7re5 mentioned. What you should do is specify root user in your command.
mysql -uroot -p
It will prompt you to then enter the password. this is the default password if you have not specified or changed the default root password depending on the local server you are using.

Wamp Server Error #1045

I would like to know about the Wamp server #1045 error on my machine. few days back i had installed my Wamp server and it was working fine like loading PhpMyAdmin, creation of database, localhost etc. i even performed some basic practices in Php.
Later on i learnt to change the password of MySQL via MySQL CMD and i performed the same. After that when i tried to load the PhpMyAdmin again, it showed me error #1045 access denied.
I tried to perform many thing but no respite from the pains. I tried to perform some fixes in phpmyadmin/config.inc, some setting in ctrl panl- Admin tools-Services-mySql (Start and stop)..
May i know what has happened to this and how to solve this problem. Thanks for help in advance.
You are basically giving yourself the answer inside your question.
You changed the mysql password. With which you most probably mean that you changed the mysql root user password. Since phpmyadmin is a mysql GUI (graphic user interface) it is only understandable that phpmyadmin can not function anymore because you haven't told it the new password you set. Just login to phpmyadmin by using 'root' as user and the new password you set. Works?

Categories