Adding DB from CPanel Not Showing in PHPMyAdmin

longevitysoft

Registered
Sep 21, 2006
3
0
151
I'm using CPanel for adding a MySQL database. When I add a database from CPanel there is no problem - however - the database just added isn't showing up in the PHPMyAdmin accessed from clients' CPanel. Yet - the PHPMyAdmin accessed from WHM shows the database exists. Also - I see the correct file structure in /var/lib/mysql as it should be - for the newly created DB.

Finally - running the "show databases;" command from the terminal (this client has chroot'ed shell access) as the client doesn't show the database!

Does anybody have ideas why the DB isn't showing up in PHPMyAdmin accessed from CPanel for the client?

We're running:
WHM 10.8.0 cPanel 10.9.0-C21
CentOS 4.4 i686 - WHM X v3.1.0
mySql 5.0
CPanel current build...
 

designeru

Well-Known Member
Nov 2, 2005
83
0
156
Access...

Did you allowed that customer to use that database ?
 

joker20

Member
Apr 14, 2006
6
0
151
Im having the same issue!
Running
WHM 10.8.0 cPanel 10.9.0-C39
CentOS 4.4 i686 - WHM X v3.1.0
Mysql 4.1

What could the problem be!
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
longevitysoft said:
I'm using CPanel for adding a MySQL database. When I add a database from CPanel there is no problem - however - the database just added isn't showing up in the PHPMyAdmin accessed from clients' CPanel. Yet - the PHPMyAdmin

Does anybody have ideas why the DB isn't showing up in PHPMyAdmin accessed from CPanel for the client?
Make sure the permission and ownership are set correctly on this client's DB in /var/lib/mysql/
uid.gid is mysql.mysql
chmod 700 CLIENT_DB
 

longevitysoft

Registered
Sep 21, 2006
3
0
151
more information

Andy - thank you for the reply - your reply is the only one in this thread (and MANY others from what I see in this forum) that offers progress towards resolving this issue. However, the uid/gid are _not_ the problem and (we should have mentioned this) always appeared correct.

We have more information - but are still working towards resolution. There seems to be a bug in a script we have not yet identified. Here's the deal...

Logging into mysql as root and checking the "mysql" database we found apparently missing records in the "db" table.

There was no record for the newly created database in the "db" table! We had to issue an insert statement for the "db" table in the "mysql" database. For example: "insert into db values ('localhost', 'clientuser\_fybprotos', 'clientuser', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'Y', 'Y', 'Y', 'Y', 'Y');"

Then issuing a "FLUSH PRIVILEGES;" command caused the database to appear in the user's PHPMyAdmin interface.

Clearly something is missing in a CPanel script for adding databases. ANY IDEAS WHAT SCRIPT TO LOOK AT?
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
longevitysoft said:
There was no record for the newly created database in the "db" table! We had to issue an insert statement for the "db" table in the "mysql" database.

Clearly something is missing in a CPanel script for adding databases. ANY IDEAS WHAT SCRIPT TO LOOK AT?
I couldn't replicate the problem you have on one of our servers using: WHM 10.8.0 cPanel 10.9.0-R37. What is your OS and WHM/cPanel version?
 

longevitysoft

Registered
Sep 21, 2006
3
0
151
check first post

Thanks for responding. The information you request is in the original post. As you noticed in the thread - at least one other person has the same issue - so it is reproducible. Once we figure out what script is handling the "add mysql db" from CPanel we'll post the fix or present a bug report.

It certainly is strange that you can't reproduce the issue since your WHM/CPanel version is so "close" to ours...If you're thinking something is unique to our setup your conclusion seems reasonable. My hunch is: reproducing this error may be related to switching from Stable to Edge and then to Current builds. Alternatively - perhaps Fantastico is a factor (the reaason being - for example - creating WordPress blogs in Fantastico works fine: the WP DB is created properly and doesn't exhibit the same problem(s)). Nevertheless, rebuilding the server is a poor option at this time and it will be easier to debug/fix the offending CPanel script...

Does anybody know what script is called when a user "Adds a MySQL DB" from CPanel?

-F