PDA

View Full Version : I'm getting: mysql error: No database selected


Fungsten
Mon 20th Nov '06, 5:24pm
I've tried switching the DB Names, etc. [When I do switch the names it comes up with "invalid PW .... etc."] Anyways, here's the error.

ImpEx Database errormysql error: Invalid SQL: SHOW TABLES

mysql error: No database selected

mysql error number: 1046

Date: Monday 20th of November 2006 01:12:37 PM
Database: **********
MySQL error: No database selected


Altering tables
ImpEx will now Alter the tables in the vB database to include import id numbers.This is needed during the import process for maintaining refrences between the tables during an import.If you have large tables (i.e. lots of posts) this can take some time.They will also be left after the import if you need to link back to the origional vB userid.
moderator - importmoderatorid Completed
usergroup - importusergroupid Completed
ranks - importrankid Completed
poll - importpollid Completed
forum - importforumid Completed
forum - importcategoryid Completed
user - importuserid Completed
style - importstyleid Completed
thread - importthreadid Completed
post - importthreadid Completed
thread - importforumid Completed
smilie - importsmilieid Completed
pmtext - importpmid Completed
avatar - importavatarid Completed
customavatar - importcustomavatarid Completed
customprofilepic - importcustomprofilepicid Completed
post - importpostid Completed
attachment - importattachmentid Completed
pm - importpmid Completed
usernote - importusernoteid Completed
phrase - importphraseid Completed
subscription - importsubscriptionid Completed
subscriptionlog - importsubscriptionlogid Completed

I am importing from a DB, at the same host, to another site/URL I have for testing - on the same ISP host.

Thanks in advance!

Jerry
Mon 20th Nov '06, 5:30pm
Can you confirm that the database will allow both connections between the different sites.

Fungsten
Mon 20th Nov '06, 5:35pm
Thanks! :confused: :confused:

Can you confirm that the database will allow both connections between the different sites.

On Edit:

I looked in the View php info through the ACP and it says my - home - IP # is allowed for remote.

Edit 2:

The DB I'm trying to import is an older DB I want to work with.

Jerry
Mon 20th Nov '06, 7:45pm
MySQL error: No database selected

This error in an ImpEx scenario usually comes from permissions, i.e. the user is allowed to connect to the database you are trying to use for the source, though isn't allowed to use the actual database within the server.

Fungsten
Mon 20th Nov '06, 7:53pm
from my computer - that I had saved as an .sql file - and have uploaded that file then how would I 'import' that DB? According to the ACP the data is there. Remember, the DB I imported is from another URL to test the DB.

This error in an ImpEx scenario usually comes from permissions, i.e. the user is allowed to connect to the database you are trying to use for the source, though isn't allowed to use the actual database within the server.

Jerry
Mon 20th Nov '06, 8:59pm
from my computer - that I had saved as an .sql file - and have uploaded that file then how would I 'import' that DB? According to the ACP the data is there. Remember, the DB I imported is from another URL to test the DB.

I can't quite follow what you mean there.

Basically, where ever ImpEx is, its needs read access to the source database and read/write to the target database.

If you can, put both databases in the same database, run ImpEx standalone and use the same details for target and source with different table prefixes so you don't get table clashes.

Fungsten
Fri 24th Nov '06, 1:09pm
to put in the values in the ImPexConfig.php



$impexconfig['sourceexists'] = true;

# mysql / mssql
$impexconfig['source']['databasetype'] = 'mysql';
$impexconfig['source']['server'] = 'localhost';
$impexconfig['source']['user'] = 'Username';
$impexconfig['source']['password'] = '************';
$impexconfig['source']['database'] = '[Name of the DB]';
$impexconfig['source']['tableprefix'] = '';



Now, in the $impexconfig['source']['user'] I usually put in the FTP Username. And in the $impexconfig['source']['database'] I put in the name of the DB. Here is the problem!! The Username and the Database name for my system are different! However, in this config file the username should use DB name! The instructions were confusing! The same applies to the Target configuration settings.

Has anyone else had this problem?

On Edit:

Also, it Imports the current Live DB from the other board. Is there a way to import an older DB, say from my desktop?

sunnycher
Sun 24th Dec '06, 3:37am
I'm having the same error, but I'm importing from one server to another.
my old server and I chatted and he set it up where I can access the db but I still get that error.

ImpEx Database errormysql error: Invalid SQL: SHOW TABLES

mysql error: No database selected

mysql error number: 1046

Date: Sunday 24th of December 2006 01:39:54 AM
Database: lgpphoto_forum
MySQL error: No database selected

NolFito
Sun 24th Dec '06, 4:12am
$impexconfig['sourceexists'] = true;

# mysql / mssql
$impexconfig['source']['databasetype'] = 'mysql';
$impexconfig['source']['server'] = 'localhost';
$impexconfig['source']['user'] = 'Username';
$impexconfig['source']['password'] = '************';
$impexconfig['source']['database'] = '[Name of the DB]';
$impexconfig['source']['tableprefix'] = '';

in $impexconfig['source']['user'] = 'Username';

In Username you have to put the username with which you log in to your source database. Database user and FTP user are generaly different . that also affects the password. You have to put the password with which log in into the database and not the FTP password.

You have to know theredatabase name and user are different things, and it doesn'5 have to do with the FTP user/pass at all

you can find i think the information for target database/user/pass/etc in forumpath/includes/config.php