How do i access phpMyAdmin using sub domain via separate URL?
Linux dedicated servers and reseller hosting comes with cPanel/whm where the clients can perform various kind of operation according to their requirements. cPanel provides phpmyadmin using that we can drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields, and export data into various formats.
Kindly follow the below procedure to access phpmyadmin using sub domain,
Installing PHP MY ADMIN
1.Download the phpMyAdmin at https://files.phpmyadmin.net/phpMyAdmin/4.0.10.20/phpMyAdmin-4.0.10.20-english.tar.gz according to your phpmyadmin version
NOTE: Download the release phpMyAdmin-4.0.10.20-english.tar.gz
2.Upload the downloaded tar file ( ex: phpMyAdmin-4.0.10.20-english.tar.gz ) into public_html folder of your domain and then extract it. IMPORTANT : Rename the folder phpMyAdmin-4.0.10.20 so that you can call the phpmyadmin control panel with that name. Rename phpMyAdmin-4.0.10.20 with a different folder name like “care3d”
3.Now go to the folder where php my admin is uploaded [ for example “care3d” ] and rename the file config.sample.inc.php as config.inc.php
4.Open the file in config.inc.php in file manager and look for the line below line
$cfg[‘blowfish_secret’] = ‘a8b7c6d’; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
In this line instead of ‘a8b7c6d’ give a strong secret like ‘ru476%$yfu8%&fugiw93jfi’ and save the file
5.Now you can access your php my admin at http://yourdomain.com/phpmyadminfoldername [ for example : http://www.yourdomain.com/care3d ] Now you can login using cpanel user name and password or using your database user name and password
6.To secure your php my admin folder, go to the folder where php my admin is installed [ example : care3d ]. Create a .htaccess file using file manager. Open .htaccess in file manager and place the following lines in it and save it. In the place of ip address, put your internet ip address. You can get it from www.getmyip.co.inOptions -Indexesdeny from allallow from 78.34.5.6 [ Put your ip address here ]
Once you have done this you can access your phpmyadmin only from ips that are allowed in this .htaccess file.
WARNING ! : Once you have completed your work in your database and feel that php my admin will not be used in future, please remove the folder for security reasons. We do not advise you to use outdated versions