chosendesigns Posted April 25, 2008 Share Posted April 25, 2008 I recently completed a simple project using PHP and a MySQL database for login/registration. I was doing it all as a test on my computer using phpMyAdmin to create the database and table i needed. The problem im having now is using phpMyAdmin with an online database.. wen i say online i mean a database held on a webhost. Im using heartinternet and ive managed to get an SQL database setup which I can connect to fine using my php scripts. My only question comes with using phpMyAdmin to administer the database and add tables etc. Im wondering how I can setup phpMyAdmin to connect to the newly formed database on the web server rather than loading up the databases in my www localhost folder on my computer so I can easily edit without having to send SQL Querys through PHP to create tables etc. Link to comment https://forums.phpfreaks.com/topic/102826-connecting-to-web-database-using-phpmyadmin/ Share on other sites More sharing options...
trq Posted April 25, 2008 Share Posted April 25, 2008 Either setup phpmyadmin on the server and use it from there or change the hostname setting in phpmyadmin to connect to the remote database. Most databases hosted by webhosts will not allow a remote connection by default, so you'll also need to make sure you have permissions to connect remotely. eg: GRANT ALL PRIVILEGES ON database_name TO 'your_username'@'your_ip_address' IDENTIFIED BY 'your_pass' WITH GRANT OPTION; Link to comment https://forums.phpfreaks.com/topic/102826-connecting-to-web-database-using-phpmyadmin/#findComment-526730 Share on other sites More sharing options...
chosendesigns Posted April 25, 2008 Author Share Posted April 25, 2008 If I setup phpmyadmin on the server wont that mean that all the pass and user info will automatically be saved in the config.ini file and therefore whenever anyone went to www.mydomain.com/phpmyadmin they would automatically have full access to my databases or am i setting it up/accessing it on the server in the wrong way? I dont think I can connect remotely with heartinternet but if I do where shall I enter the code below? Should I write a php script that connects to my database and send that SQL Query to it once? Link to comment https://forums.phpfreaks.com/topic/102826-connecting-to-web-database-using-phpmyadmin/#findComment-526733 Share on other sites More sharing options...
AndyB Posted April 25, 2008 Share Posted April 25, 2008 It's hard to imagine a web host that would provide MySQL and wouldn't already have some secure method in place to edit the database(s). Are you sure you don't already have a web host database manipulator in place? Link to comment https://forums.phpfreaks.com/topic/102826-connecting-to-web-database-using-phpmyadmin/#findComment-526747 Share on other sites More sharing options...
chosendesigns Posted April 25, 2008 Author Share Posted April 25, 2008 I dont know currently. My friend has one of those re-seller accounts with heartinternet and im hosting my site with him for free. Im waiting for a reply back on what database editing tools he was given but in the mean-time trying to work out if I can do it for myself. Ive configured phpMyAdmin now so that I can access it and edit it through my registration forms HOWEVER it is completely un-secure... at the moment anyone can access it through www.mydomain.com/phpMyAdmin and delete, add, edit, steal all the information if they wanted. Is there anyway of securing the webpage with a login/password so only I or people ive given the password to can access it? Link to comment https://forums.phpfreaks.com/topic/102826-connecting-to-web-database-using-phpmyadmin/#findComment-526964 Share on other sites More sharing options...
chosendesigns Posted April 25, 2008 Author Share Posted April 25, 2008 BUMP... I need this solved before someone accesses my databases.. otherwise ill have to take phpMyAdmin off the server but I would really like to use it as its what ive learnt. Im sure it must be possible to secure it somehow with a login system?? Link to comment https://forums.phpfreaks.com/topic/102826-connecting-to-web-database-using-phpmyadmin/#findComment-527218 Share on other sites More sharing options...
DarkWater Posted April 25, 2008 Share Posted April 25, 2008 cd /web/root/path mv -f phpMyAdmin myphpadmin61273 Do something like that if you can SSH into the system. If not, just do it over FTP. Rename the PHP My Admin directory so it's harder to find, and read the documentation about the login system...I know there is one but I forgot how to enable it. Link to comment https://forums.phpfreaks.com/topic/102826-connecting-to-web-database-using-phpmyadmin/#findComment-527234 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.