hailam Posted April 12, 2009 Share Posted April 12, 2009 I am trying to run a free filehosting script, my problem is I cannot import the .sql file into the database. this is the error I get: Error SQL query: -- phpMyAdmin SQL Dump -- version 2.9.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 12, 2007 at 05:16 PM -- Server version: 5.0.27 -- PHP Version: 5.2.1 -- -- Database: `filehost` -- -- -------------------------------------------------------- -- -- Table structure for table `bannedips` -- DROP TABLE IF EXISTS `bannedips` ; MySQL said: #1046 - No database selected and there is one other problem: the images on the script also cannot preview, check from this link: http://www.eyn.comli.com/dhishare/ please help me. thank you Quote Link to comment https://forums.phpfreaks.com/topic/153748-need-help-with-phpmyadmin/ Share on other sites More sharing options...
herghost Posted April 12, 2009 Share Posted April 12, 2009 do you have a databse called filehost in your mysql? if not you need to create it first Quote Link to comment https://forums.phpfreaks.com/topic/153748-need-help-with-phpmyadmin/#findComment-807997 Share on other sites More sharing options...
premiso Posted April 12, 2009 Share Posted April 12, 2009 The new database does not "have" to be file host. But the problem is the same, you need a database to enter all that SQL into, and as such you do not have a database created/selected to use. In phpMyAdmin you should have a list of database on the left hand side, if you created one for this project select it then click on the import tab on the right and it should use that database. Quote Link to comment https://forums.phpfreaks.com/topic/153748-need-help-with-phpmyadmin/#findComment-808002 Share on other sites More sharing options...
hailam Posted April 12, 2009 Author Share Posted April 12, 2009 yes I have a database called "filehost" but the problem is i cannot see any option to select the "filehost" database so i can import the .sql file into my database Quote Link to comment https://forums.phpfreaks.com/topic/153748-need-help-with-phpmyadmin/#findComment-808075 Share on other sites More sharing options...
jackpf Posted April 12, 2009 Share Posted April 12, 2009 Click on the database, then click the sql tab on the menu thing at the top, and then copy and paste all your sql into there and click submit or go or whatever. Should do the trick. Quote Link to comment https://forums.phpfreaks.com/topic/153748-need-help-with-phpmyadmin/#findComment-808081 Share on other sites More sharing options...
Philip Posted April 12, 2009 Share Posted April 12, 2009 Or, if the sql file is too big to copy paste, place this under the comments in your sql file and above your first DROP IF...: USE `filehost`; That'll tell it to import into the database name filehost. Quote Link to comment https://forums.phpfreaks.com/topic/153748-need-help-with-phpmyadmin/#findComment-808086 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.