No database selected message

Problems with the Windows version of XAMPP, questions, comments, and anything related.

No database selected message

Postby Fishhead » 16. October 2006 05:42

I am looking for a little help since I am new at this. I am using a PC running windows xp pro, Dreamweaver 8, and XAMPP 1.5.4a. I constucted a webpage that would be a "log in" page to allow certain viewers to an area of our site. I set up a test database with passwords and converted into a slq data file. I can run this page on my PC using XAMPP as the testing server. It works fine. I have FTPed my files to our server and placed them relatively in the same locations as on my PC. These files included a .PHP page with the login boxes, a connection file, and the database files.

When I log on to our site via the web, I can bring the log in page up and type in data, but after submitting, I receive a notice that says "No Database Selected". That notice is not something that I created it is coming from my server. Clearly, the log in request is not finding the database when this is run on the server. Yet the log in works while on my PC.

Is there something more than moving files to the server that I must do? or should the location of the database on the server be different than the location on my PC? Or are there more files that need to be transfered?

Any help would be welcome.
Fishhead
 
Posts: 2
Joined: 16. October 2006 05:23

Postby Izzy » 16. October 2006 06:53

Did you create a database on your server on the web?

If so then you have to import the sql file you created from your test database into that database on your web server.

Export the data from the database on your PC to an sql file.
Import the data from the sql file into your database on your web server.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby Fishhead » 16. October 2006 07:28

Yes, on my PC, using XAMMP I exported my database as a sql file. Using FTP I moved a copy to my server. Then logged on to my server and using phpMyAdmin, I imported the database. I have double checked and it is there with the two tables that it contained. However, I am not sure where it is actually located or for that matter, where it should be located to make this all work. Any further suggestions would be helpful.
Fishhead
 
Posts: 2
Joined: 16. October 2006 05:23

Postby Izzy » 16. October 2006 07:53

Fishhead wrote:Yes, on my PC, using XAMMP I exported my database as a sql file. Using FTP I moved a copy to my server. Then logged on to my server and using phpMyAdmin, I imported the database. I have double checked and it is there with the two tables that it contained. However, I am not sure where it is actually located or for that matter, where it should be located to make this all work. Any further suggestions would be helpful.

XAMPP appears to be doing it's job.

The MySQL version on XAMPP will be the latest but on your hosting account it more than likely will be much older.
Make sure when you export to an sql file tha you are using a compatible dump for your importing server.
Select the SQL compatibilty mode in the Export screen of phpMyAdmin.

What control panel are you using on your hosted site?

Throw the question at your hosting provider and if they are worth their salt they will be more than willing to help you. It's beyond the scope of this forum to assist with your hosting problems.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 157 guests