1046 no database selected joomla hosting

Je suis un programmeur Montréalais à Berlin. J'ai travaillé pour Nokia et IBM, et j'ai aidé plusieurs petites entreprises à voir grand sur le web.

Fixing the " #1046: No database selected " error

Here is the simple, quick fix to the "#1046: No database selected" error when importing a .sql file from a Wamp installation in phpMyAdmin.

In phpMyAdmin, click the Export tab situated under Home instead of the one when you are viewing the database to export. This will allow you to export entire databases and not only the tables contained in it. This might not work for users of hosting sites such as Hostmonster or Hostgator, since they pick the database names for you.

1046 no database selected joomla hosting voir grand sur le web

Alternative fix:

  1. Create the database on your server and note down the name.
  2. Open your .sql file with a text editor. You might want to use something other than Notepad since it doesn't recognize the line breaks.
  3. Insert the following line before your first CREATE TABLE command in your .sql file:
Be careful to write in the right database name. Hostmonster users, for example, will have their username in front of their database name. Therefore, the products database is in fact named username_products .
  • Save your .sql file and import it using the import tab in phpMyAdmin.
  • Gareth a dit (8 juin. 2010):

    Thanks, this error was really bugging me!

    willyzl a dit (28 oct. 2011):

    Very Good solution. It is what I try looking for days. Thank you for your cool solutions. DD

    Austin a dit (1 nov. 2011):

    you are a godsend, sir.

    LJ a dit (7 jan. 2012):

    I still cant do it. After i followed the steps I get and erro 1044. Could you post a video on how to do it? That would be really helpful.
    My whole website is ready and this is the final step and I am stuck here. I am not a web developer infact and not sure how to resolve it.

    Dennis Guerra a dit (17 jan. 2012):

    Thank you so much.
    Was desperate

    Shruti a dit (12 fév. 2012):

    Wow! Works like a charm!
    I got 1050 error after that. So deleted the existing tables in that database..
    Thanks a lot!

    Grazzer a dit (19 fév. 2012):

    Was struggling to do this. Used your instructions. All done and dusted. Many thanks …

    Simen a dit (12 mar. 2012):

    Watch this video!

    Related articles

    Location database joomla hostingSo you want to move your move a joomla 2.5 site to a new server. Confused with all the half finished or techno babble guides? Well don't worry, our 'Migrate your Joomla! Site to a new server...
    Prefix database joomla hostingThere are few methods to determine your database prefix. The recommended method is to view the Global Configuration Database Settings Group from the administrator view of your Joomla! website....
    Infomaniak joomla hosting serverTransferring a website from one web host to another/Changing Hosts/Joining Infomaniak This guide explains step by step: how to transfer a domain name to Infomaniak, how to move a website to...
    Get current module id joomla hostingSiteGround is proud to be a special partner of the Joomla project! We provide the hosting infrastructure for thousands of Joomla websites as we are the official host of Joomla.com and the...
    Page caching joomla hostingSiteGround is proud to be a special partner of the Joomla project! We provide the hosting infrastructure for thousands of Joomla websites as we are the official host of Joomla.com and the...