Current location: Hot Scripts Forums » Other Discussions » Web Servers » Configuring PhPMyAdmin's config.inc.php file


Configuring PhPMyAdmin's config.inc.php file

Reply
  #1 (permalink)  
Old 03-11-09, 01:08 PM
WillUK WillUK is offline
Wannabe Coder
 
Join Date: Jan 2009
Location: Beverley, England
Posts: 130
Thanks: 5
Thanked 2 Times in 1 Post
Configuring PhPMyAdmin's config.inc.php file

Hi,

I've got a database with several tables on my PC and want to FTP everything to an external host. I am not clear on what I should do.

Should I configure the phpMyAdmin config.inc.php file with the new host server name, uername, and password? If so, will it work on my PC with the remote host's settings, in order for me to test?? Or should I retain the localhost settings, and make these config changes AFTER the files have been FTP'd across??

It looks like I'm supposed to change the following original configuration lines:
Code:
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
I think that, according to the info I have, I should be changing these lines to:
Code:
$cfg['Servers'][$i]['port'] = '33064';
$cfg['Servers'][$i]['host'] = 'mysql4.datagate.net.uk';
$cfg['Servers'][$i]['user'] = 'atkinson';
$cfg['Servers'][$i]['password'] = '#####'; (hidden for obvious reasons)
I have run the application using this new configuration but I am getting an error message:

"Could not connect to MySQL: Can't connect to MySQL server on 'mysql4.datagate.net.uk' (10060)"

I am now wondering whether I should revert to the 'localhost' setting for the 'host' configuration.....

Also, do I need to do anything with the following config line?:
Code:
$cfg['Servers'][$i]['verbose'] = 'localhost';
...I don't know what 'verbose' is.....

Also I am unsure about the following line:
Code:
$cfg['Servers'][$i]['connect_type'] = 'tcp';
....Should I be changing the 'connect_type' to 'ftp' instead of 'tcp'??

Finally, does my mysql_connection.php script need to mirror these details?? I presume that it should. Also, I have set up a new user within phpMyAdmin to reflect the changes. I guess that I was right to do this also...

Thanks,
Will

Last edited by digioz; 03-13-09 at 09:25 AM. Reason: Please use CODE tags!
Reply With Quote
  #2 (permalink)  
Old 03-12-09, 04:05 AM
Yeroon's Avatar
Yeroon Yeroon is offline
Code Master
 
Join Date: Aug 2007
Location: Netherlands, Nijmegen
Posts: 850
Thanks: 2
Thanked 20 Times in 20 Posts
Probably you are not allowed to connect to the database on the host from anywhere else then on the host itself.

So locally on your own PC you would use your own local database settings to develop and test. When you ftp everything across, just don't transfer the config file, so you don't have to change it all the time on the server. Just set it once and don't overwrite.
__________________
Feel free to thank people if they help you by clicking thanks at a post.
=================================
Make it idiot proof and someone will make a better idiot.
=================================
Realise the impotence of proof reading everything you publish
Reply With Quote
  #3 (permalink)  
Old 03-12-09, 09:52 AM
WillUK WillUK is offline
Wannabe Coder
 
Join Date: Jan 2009
Location: Beverley, England
Posts: 130
Thanks: 5
Thanked 2 Times in 1 Post
Ok

this is my first project - so I'm sorry if these questions sound 'lame'...but thanks for your help

You said that I wouldn't be able to connect to the host, unless I am on the host itself...

I understand what you mean by that....I guess that it is like not being able to access pop-3 mail boxes away from the 'home' network, because the SMTP details will change from one location to another....

However, with the datagate host ( the one I mentioned in the original thread), I do have FTP client login details....
But when I try to login AWAY from the office (which uses a datagate network), I am denied access...
The error message I receive suggests that I might be getting the login details incorrect....But I am sure that this is not the case (because I used firefox to remember them when I logged on to the neteork at the office).

I don't understand the point in having a login, to give me access to the FTP window, if it doesn't give me access when I am working remotely....

Is it because the login here is only there to give me access to our files/scripts once I am on the datagate network, and is therefore not there to give me remote access to the datagate network itself?

Also, you said that I don't need to transfer the config file over...
This is problematic
I am using Wamp Server - a package that inlcudes PhPMyAdmin (MysQL Interface) and PHP etc
Basically, there are lots of files (the config file being one of them) and folders within the Wamp package....How do I know which ones I am supposed to transfer and which ones I am not??
I am particularly worried that the SQL data will not transfer correctly to the remote server - bearing in mind that it was created using PHPMyAdmin (Do I need to transfer something specific to PHPMyAdmin over too, to enable my database to function correctly?)....

You alse mentioned that I only need to change the config file once i.e. when it is transferred onto the remote server. In other words, I use my local settings for my system at home (for every project that I work on) and then apply the remote settings when the files have been transferred to the remote host.... Am I right in thinking this (just to check that I understood you correctly)?? Or am I completely wrong??

If I am right, I presume that I would have to change the mysql_connect.php script each time I have FTP'd it across with the other files too, in order to reflect the remote server configuration (?).

I was a bit annoyed when the remote server access details were sent to me from datagate, because they supplied me with a pre-conceived database name that I was to use for this project, which differed from the database name that I had already created in MySQL....Not sure why they did this...perhaps we had a previous database with them called that...although we didn't have an SQL back end before I built this, so can't think why it would have been necessary....
To get around this I had to build a duplicate database with the amended name as supplied.....Surely they should have waited for me to tell tham what the new database was going to be called!!

Thanks for your help, and sorry for being so confused!!


Last edited by WillUK; 03-12-09 at 10:04 AM.
Reply With Quote
  #4 (permalink)  
Old 03-12-09, 11:02 AM
Yeroon's Avatar
Yeroon Yeroon is offline
Code Master
 
Join Date: Aug 2007
Location: Netherlands, Nijmegen
Posts: 850
Thanks: 2
Thanked 20 Times in 20 Posts
Quote:
I am using Wamp Server - a package that inlcudes PhPMyAdmin (MysQL Interface) and PHP etc
I am not very familiar with WAMP, but some users here are. Maybe they can shed a light on this? How to exclude certain files when updating. Mainly the phpmyadmin config file.

Quote:
You alse mentioned that I only need to change the config file once i.e. when it is transferred onto the remote server. In other words, I use my local settings for my system at home (for every project that I work on) and then apply the remote settings when the files have been transferred to the remote host.... Am I right in thinking this (just to check that I understood you correctly)?? Or am I completely wrong??
I would suggest that you start with putting your remote details in the local config file. Upload everything, so it works on the remote host. After that you change the local config file back to your local settings. When done developing more stuff, upload all but the config, so the config on the remote host stays the same with the right info. And the local one is just well... the local one

Quote:
If I am right, I presume that I would have to change the mysql_connect.php script each time I have FTP'd it across with the other files too, in order to reflect the remote server configuration (?).
If you do it the way I said above, then no you don;t have to. Just once.

Quote:
and sorry for being so confused!!
Development machine, test machine and remote production machine differences are often a cause for confusion and headaches. Don't worry about it too much. It will come more naturally with time.
__________________
Feel free to thank people if they help you by clicking thanks at a post.
=================================
Make it idiot proof and someone will make a better idiot.
=================================
Realise the impotence of proof reading everything you publish
Reply With Quote
  #5 (permalink)  
Old 03-13-09, 10:44 AM
WillUK WillUK is offline
Wannabe Coder
 
Join Date: Jan 2009
Location: Beverley, England
Posts: 130
Thanks: 5
Thanked 2 Times in 1 Post
Thanks Yeroon....I'll do a bit of research on this....perhaps while I'm doing that someone who has been through this before will post some advice...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
configuring SOCKS proxy exceptions in INI file cocaine_energy_drink Everything Java 0 03-09-09 09:40 AM
Hello all, can you help me? K4ot1K Other Languages 2 01-23-09 05:23 AM
Checking a file exists lee PHP 3 04-23-06 12:44 AM
Error message not getting displayed. sanjeet Windows .NET Programming 0 12-20-05 10:48 AM
Getting the created file (fopen/fwrite) Programme PHP 5 02-14-04 03:09 PM


All times are GMT -5. The time now is 01:28 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.