Question:
Import sql database into Joomla?
Martin
2010-08-05 16:23:12 UTC
I made a website in joomla on a remote server on my computer (xamp). Everything works. Now I have my own place on the net so I uploaded everything. I changed the necessary things in configuration.php and exported the database in a sql file.

Now I try to upload this file, but I get an error:

SQL-query:

-- -- Database: `joomla` -- -- -------------------------------------------------------- -- -- Tabelstructuur voor tabel `bak_banner` -- CREATE TABLE IF NOT EXISTS `bak_banner` ( `bid` int(11) NOT NULL AUTO_INCREMENT, `cid` int(11) NOT NULL DEFAULT '0', `type` varchar(30) NOT NULL DEFAULT 'banner', `name` varchar(255) NOT NULL DEFAULT '', `alias` varchar(255) NOT NULL DEFAULT '', `imptotal` int(11) NOT NULL DEFAULT '0', `impmade` int(11) NOT NULL DEFAULT '0', `clicks` int(11) NOT NULL DEFAULT '0', `imageurl` varchar(100) NOT NULL DEFAULT '', `clickurl` varchar(200) NOT NULL DEFAULT '', `date` datetime DEFAULT NULL, `showBanner` tinyint(1) NOT NULL DEFAULT '0', `checked_out` tinyint(1) NOT NULL DEFAULT '0', `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `editor` varchar(50) DEFAULT NULL, `custombannercode` text, `catid` int(10) unsigned NOT NULL DEFAULT '0', `description` text NOT NULL, `sticky` tinyint(1) unsigned NOT NULL [...]

MySQL retourneerde:

#1046 - No database selected

Who can help me solve this problem.
Three answers:
JustMe
2010-08-05 19:27:52 UTC
To move your Joomla site from one hosting (or local install) to another you should use Akeeba backup extension. It's free and very powerful. You back up your site and it will product a single archive file which will contain all needed files including all 3rd party extensions and custom templates AND database backup. When you restore it on a new hosting it will automatically re-map all directory paths and restore your database. It is literally a 5-10 min job to migrate hosting for your site. It eliminates a lot of headaches.

Good luck
Unca Alby
2010-08-05 18:36:58 UTC
Are you SURE you changed everything that needed to be changed? Coz it seems to me that SOMETHING is obviously missing.



Take a look in the configuration tables to see what database it's accessing. Make sure it's correct. See if you can access that database remotely using the "mysql" command-line interface. If you can, well obviously use those parameters.



In the configuration.php file, take note of:



$host = 'localhost' -- might or might not work -- contact the Administrator

$user = 'joomla' -- you sure this user exists? and password of course

-- and that user has permission to access --

$db = 'database' -- whatever database you set up?



Here's something to try:



Follow the directions for creating a brand new Joomla installation, except do it on the remote site. Make sure that's working. THEN import all of the files and database tables.
?
2016-11-01 05:38:45 UTC
You log in to mysql from a console and create the databases and tables. enter archives and then get admission to and manage it from very own domicile page pages. some sites will assist you repeat the information to their database region. Others you're able to desire to run the create from scratch, so use scripts to create them.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...