I now transfer the site to another hosting and need to transfer the database. I export the database to the old one, but it is not imported on the new one, because it is written to create the same database, and there are all sorts of tablets, etc. And I do not need to create any databases. Only insert tables ..

  • Where is "there" spelled? In the .sql file? - abibock_un
  • Yes, in the backup file - inferusvv
  • Export via phpmyadmin? - abibock_un
  • Yes, through him - inferusvv
  • And what is the error when importing? - abibock_un

2 answers 2

In order to export not the entire database, but only its tables, first select the target table in PMA, then do the export (you will need to select the necessary tables for export).

On the new server, also, first go to the desired database, and there already do the import.

Sabo it goes without saying that the new server will first need to delete (or rename) the tables whose names match the tables on the test.

Good luck.

    Most likely your user does not have the right to create multiple databases on the server. those. You need to import into an existing database. You need to: 1. Log in to your local machine in phpmyadmin. 2. Select the required database 3. do export and get the file of the form

    -- phpMyAdmin SQL Dump -- version 3.4.11.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 08, 2013 at 01:50 PM -- Server version: 5.5.29 -- PHP Version: 5.4.6-1ubuntu1.1 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `barada` -- -- -------------------------------------------------------- -- -- Table structure for table `storeactions` -- CREATE TABLE IF NOT EXISTS `storeactions` ( `aid` varchar(255) NOT NULL DEFAULT '0' COMMENT 'Primary Key: Unique actions ID.', `type` varchar(32) NOT NULL DEFAULT '' COMMENT 'The object that that action acts on (node, user, comment, system or custom types.)', `callback` varchar(255) NOT NULL DEFAULT '' COMMENT 'The callback function that executes when the action runs.', `parameters` longblob NOT NULL COMMENT 'Parameters to be passed to the callback function.', `label` varchar(255) NOT NULL DEFAULT '0' COMMENT 'Label of the action.', PRIMARY KEY (`aid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores action information.'; -- -- Dumping data for table `storeactions` -- 

    Then, on the hosting, enter the already existing database and import the previously created file, everything should work.

    PS If the base is from Drupal, then you need to clean all the tables with the cache, otherwise there will be problems with the import.