MySQL database import error

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

MySQL database import error

Postby manitamang » 19. January 2018 06:14

Hello,

I just formatted my computer and installed Windows 7 as same as before formatting my computer. And installed XAMPP Control Panel v3.2.2
After installing Xampp I tried to import MySQL database (which was export before formatting computer) I am getting this error.

SQL query:

--
-- Database: `adventuresolu`
--

-- --------------------------------------------------------

--
-- Table structure for table `as_apmm_custom_theme`
--

CREATE TABLE `as_apmm_custom_theme` (
`theme_id` int(11) NOT NULL,
`title` text,
`slug` text,
`theme_settings` longtext,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4


MySQL said: Documentation
#1046 - No database selected

Can anybody help me please?

Thank you.
manitamang
 
Posts: 2
Joined: 19. January 2018 06:09
XAMPP version: 3.2.2
Operating System: Windows 7

Re: MySQL database import error

Postby Nobbie » 19. January 2018 11:56

You did not select a database (as the error says). Select any database before you start you import. If there is no database, create one.
Nobbie
 
Posts: 10289
Joined: 09. March 2008 13:04

Re: MySQL database import error

Postby manitamang » 21. January 2018 11:57

Hello Nobbie,

Thank you for your reply. But I have tried many times to import after selecting database.

The XAMPP was working before formatting my computer. But it is getting after reinstalling windows & Xampp. Can you help me why this error is getting?

Thank you.
manitamang
 
Posts: 2
Joined: 19. January 2018 06:09
XAMPP version: 3.2.2
Operating System: Windows 7

Re: MySQL database import error

Postby Nobbie » 21. January 2018 16:54

manitamang wrote:Can you help me why this error is getting?


Because you did not specify the database in your export file, when you created it. There are tons of options for the export, and it is up to you which one to use. Obviously, you exported the database 'adventuresolu', but you did not include the corresponding code for the export file, in order to create that database automatically, it it does not exist. You only exported all tables and tablenames, including the code for automatically creating tables, if they do not exist. Therefore you have to create manually that database and choose it as target database, before you start to import your data. Thats all.
Nobbie
 
Posts: 10289
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 44 guests