I am suddenly faced with a very frustrating problem. I had built a site which I had uploaded using the services of my
webhost. This site contains 5 pages including a gallery page which I had built using php and mysql. The names of the photos were stored in a database. The site had been functioning well.
I also made a blog using wordpress and had the blog in a subfolder.
I then ventured to try and make a wordpress site (not a blog) on my pc using my local server. I had that site too functioning well. This site contained a photogallery which I had created after downloading NextGen.
I tried to upload the locally made wordpress site to a new subfolder of my personal site on the server. I completed the processes like exporting the local database to a text file, then tried uploading the wordpress files. I had painstakingly replaced all the URLs in my database export file containing the local wordpress address to http://www.mysite.com/subfolder.
While I was transferring the files using FTP, I was running into problems. The connection was getting disconnected midway.
I was trying to work out a solution. I first decided to delete whatever files that I had uploaded and start the process all
over again, this time with an entirely new domain and leave my personal site intact. But I just decided to have alook at my blog and to my dismay, found that the blog page on my site did not exist anymore. Also, to my utter dismay, I found that the gallery page on my personal site is suddenly giving an error like this;
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘jppp_pvarier’@‘localhost’ (using password: YES) in
/home/jppp/public_html/config2.inc.php on line 3
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user ‘jppp’@‘localhost’ (using password: NO) in
/home/jppp/public_html/config2.inc.php on line 4
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in
/home/jppp/public_html/config2.inc.php on line 4
Could not select database.
What could have suddenly gone wrong? Could some files have got deleted my mistake?
Thanks.
I went to Filezilla and checked the public_html folder. I find the confic.inc files intact. I then went to the cpanel of my host and do find the database with their categories and tables intact. Then why does this happen?
As for the blog, since I am not very well versed with it and I just got the blog working by a trial and error method by following a tutorial, I think I have to probably do it all over again.
Hi Priya, before moving on from this thread can you try a couple of things for me
Can you connect to the database through cpanel or whatever management system your host uses, this could be phpMyAdmin or something similar.
Also download an SQL manager program like SQLYog (download the free version). Try and connect through that using your username and password.
If you want you can PM me the details and I can try for you.
When I go to phpMyAdmin, I can see the name of my database on the left. When I click on it, I do get to see the names of the tables and on clicking the same, I get to see the different columns.
When I go to my file manager, I am able to view the photos as well.
But when I try to view my gallery site, of course, I get the error as mentioned above.
Mike, thanks for your advice. I got in touch with my host’s support team and got an immediate response from them. My problem has got solved now. I went through a harrowing time last week racking my brain and trying to find out what had gone wrong.
It seems that I had somehow reset the password for the database user that the scripts of my files, config.inc.php and wp-config.php were using. After creating a new username and password and then updating the respective files with them, my gallery and blog have started working.
I never thought of contacting my host earlier as I only thought that I had inadvertently deleted some files.