Q. How to access the database without its cPanel credentials?
This article will help you to access databases of cPanel users’ without accessing the cPanel account.
Consider the scenario, you’ve a cPanel account and you want to share the details of a database (DB) with one of your we site developers and actually you do not want to share the cPanel credentials.
In normal cases, to access the PhpMyAdmin you need the cPanel login credentials. In this post Cr a solution for that problem. You can use the PhpMyAdmin package to access databases separately without knowing the account’s password.
In cPanel, the default location for phpMyAdmin is:
https://yourdomain.com:2083/3rdparty/phpMyAdmin/index.php
This main user will have the privilege to access all the databases created under the cPanel account. In this topic, you will find out the way to grant MySQL database access outside the cPanel login.
Download its latest version!
Phymyadmin Latest version – Download
Step 1. Download the stable version of PhyMyAdmin (phpMyAdmin-4.x.x-english.tar.gz)
Step 2. Upload the the tar file (ex: phpMyAdmin-4.x.x-english.tar.gz) into public folder of the shared account and extract it.
Step 3. Rename the folder so that you can access it by an easy-to-remember URL.
The default URL should be look like:
http://yourdomain.com/phpMyAdmin-4.x.x-english
Rename it to an easy link:
http://yourdomain.com/phpMyAdmin
How to test?
Create a MySQL database and a database user.
You can create MySQL database and user for it from cPanel itself, under MySQL databases section.
I created crybit_phpMyAdmin db and crybit_phpAdmin user for testing purpose.
Access the PhyMyAdmin panel from your web browser
Now you can use the MySQL username (Eg. crybit_phpAdmin) and password to the access the assigned database (Eg. crybit_phpAdmin).
You will get a login prompt like the image below:
Once login success, you can manage the database like you deal via cPanel default PhpMyAdmin. Try it and let me know if you face any trouble.
That’s it! Thank you!
Related Links
- cPanel icon is missing from WHM’s List accounts option.
- How to find the total number of connections for a cPanel domain from the log files.
- cPanel is showing invalid login
What are the modern methodologies to build a perfect monitoring setup?
Yeah, the SRE signals. Mainly there are three modern methodologies available in building a perfect dashboard.1, USE method by Brendan Gregg.
2, RED method by Tom Wilkie.
3, LTES method from Google SRE book.
READ MORE : https://www.crybit.com/modern-monitoring-concepts-an-intro-to-prometheus-world/
Hi Arun, thanks alot for posting this, i was looking for this everywhere but i think everyone was saying own stuff and bla bla bla..
Thanks alot, finally i can share single database to single user without sharing my cpanel 😀
How do I access my database without the cpanel.
I know what the username and password is. but it is different from the cpanel one.
I have to access my database
maybe something like telnet?
You can access your database by using the package phpMyAdmin as I posted above.
Bro phpMyAdmin is not working as you have mentioned above
please any other method to access database without cpanel
Thanks..
thanks a lot
Thanks for your feedback.
Thanks Arun! Helpful and to the point.
You are welcome 🙂 and thanks for your valuable feedback!
Hello Arun i m not find solution please explain me that how can i bring out db without using cpanel
when i type this url then it redirect me on my website ‘http://yourdomain.com/phpMyAdmin’;
Hello Mukul,
Have you renamed the folder name to “phpMyAdmin”?
Thanks a lot Arun. (y)
Your post is really helpful. And the explanation is also short and to the point.
It saved my time. 🙂
Thanks Akshay 🙂
Hello,
I did what you said, and when I go the site i get this.
Not Found
The requested URL /phpMyAdmin/ was not found on this server.
thank, you.
Hi Alain,
Have you renamed the folder name?
Eg: “phpMyAdmin-4.2.5-english” to “phpMyAdmin”
Bravo Arun! you are such a genius man. I was searching this from last one year and you made it so easy. Thanks a bunch. I would require any other assistance then I will eat your brain. Arun you are awesome and deserve for beer(s) with me.
This is one of the best complement that I got ever, Amit 😉
I’m very happy.
Thank you so much for this. You have been a great help!
You are welcome, John!
Hi Arun Lal,
You are really great.. You solved my problem which I am trying to discover from 6 months.. I am really so much happy and thankful to you. It solve my biggest problem. Thanks a lot.. You are genius person.
Thanks Arun…this was really helpful. Thanks for such a clear-cut solution.
I have one question. please excuse if it is too stupid.
I already have multiple DB’s installed on my server. I am owner of all of them. I need to share one of them to my developer. So, I’ll install the package.
But, post completion of development, will I be able to UN-install the same without loosing my DBs.
Thanks,
Amit
Sure thing!
You can uninstall this whenever you want without the fear of data loss.
I have extracted the files and its saying that “PHP 5.3+ is required”
Where do i install the php and how can i assign the user to this path
Ravi,
Do you’ve a server with CloudLinux with PHP selector? Then you can change it via cPanel.
How can i download the database without accessing cpanel/phpmyadmin.
Is there a shortcut for this?
I’m not sure whether it’s possible or not.
For those having trouble accessing the link after uploading and renaming the folder. The URL is case sensitive. So if you just trimmed off the last few bits off of the folder but show phpMyAdmin then you have to type that exactly:
http://www.yourdomain.com/phpMyAdmin
In order to fix this simply rename the folder and make everything lowercase.
Thank Arun. Great help.
You’re welcome, Sham!!
I am able to access the phpmyadmin page but when i enter the username and password there it says :
” Cannot log in to the MySQL server”
Meghal,
Please make sure that DB user and password are correct.
Thank you very much for your tutorial. It’s realy helpful to me. Thank you.
You’re most welcome, Jina!!
Thanks dude, you the real man 🙂
You’re welcome, Anirudh!!
i am very thankful to you Bro
Thank you, Imran!!
Very…. Very…… Thanks bro, this article is very good. Nice attempt and nice thought bro.
Keep it up.
Thanks for your kind words of appreciation, Arun!!
many many thanks you really helpfull
You’re most welcome, Surya!!
Hello
When accessing phpmyadmin using my domain like mydomain/phpadmin
They are asking authentication.
I can login.
What or which username password should i use?
It would be really helpfull thanku…
Derin,
You can use the db username and password.
I have couple of websites. So can I upload the phpmyadmin folder in a sub folder.
No need. You can access the DB from the PhpMyAdmin in public_html location.
I’ve done it to the exact instruction above but I’m getting the following when I got to http://mydomain.com/phpMyAdmin/
Fatal error: Call to undefined function mb_detect_encoding() in /home/mydomain.com/public_html/phpMyAdmin/libraries/php-gettext/gettext.inc on line 177
Hi Sam,
Please make sure that the PHP extension mbstring is enabled on server.
Thanks!
Where to change in Cpanel
Shah, I’m not sure I understand what you mean exactly.
Thanks Arun.
I am done with it. Its in the PHP version, by selecting PHP version you will see different extensions.
Alright, Shah!!
Thank you for this article, it was really helpful. It worked on one of my servers. But on the other server, I can reach the login screen, but when I login it keeps loading then gives me network or server error, as if it times out and it never works. Have you had such an issue before ? It would be great if you can help with this. Thanks again.
Ali,
Nope, I never faced any issue like this. Is there any details in error log?
Hi,
When I try to login, It redirect back to login screen without any message.
Any reason?
Never noticed that!
The setup doesn’t create a config.inc.php. I copied from a config.sample.inc.php.
It works with or without the config.inc.php. But everything is very slow. I have changed ‘localhost’ to ‘127.0.0.1’. It doesn’t help either. Any idea?
Thank you for the tutorial really helpful.
However I cannot still ave access for a particular user.
I made a new user from Mysql Database utility as you said.
Also gave all the rights on the database but just cannot access it using phpmyadmin.
Why so ? Please help
thanks, its work so well. but how to logout after succesfully login into my phpmyadmin?
Thanks!
Most welcome, Bruno 🙂
Hi Arun,
Thanks a lot for this tutorial.
Most welcome 🙂
Thank you Arun you saved my time, want to ask one thing,
can we directly connect database(which is in mySQL on server) using username and password in my website or application??
You are most welcome, Machindra!
Yeah, you can.
I am getting this error. This page isn’t working domainname.com is currently unable to handle this request. HTTP ERROR 500
Hi Mads,
Sound like some permission issue.
Please check the server error log and see what is happening there.
Hello, I get this error when I try to login in using database details.
{cannot log in to mySQL Server.
mysqli_real_connect(): (HY000/2002): No such file or directory}
Please can you help?
I had downloaded and extracted as instructed, but when i type the url it is showing as 404-page not found error.
You answered nearly 5 years before. Still it’s a best option to access individual mysql user account. cPanel must need to improve themself.
mysqli_real_connect(): (HY000/1045): Access denied for user ‘admin_dev’@’localhost’ (using password: YES)
Im not sure how to specify which DB it should login to?
I have same problem. Can someone help?