PDA

View Full Version : mysqlAdmin backup into a phpmyadmin console


nikos101
10-18-2009, 02:49 PM
Is it possible to import a mysqlAdmin backup into a phpmyadmin console? I get errors on lines like

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW IF EXISTS `vwactivationstuff`' at line 1

abduraooft
10-18-2009, 04:59 PM
Is it possible to import a mysqlAdmin backup into a phpmyadmin console? I get errors on lines like

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW IF EXISTS `vwactivationstuff`' at line 1How about posting some relevant parts of your query?

nikos101
10-18-2009, 08:05 PM
I didn't think of posting the query as i thought ms sql would output the correct syntac to import into phpmyadmin

nikos101
10-19-2009, 11:51 AM
-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.27-community-log


/*!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 */;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


--
-- Create schema audio
--

CREATE DATABASE IF NOT EXISTS audio;
USE audio;

--
-- Temporary table structure for view `vwactivationstuff`
--
DROP TABLE IF EXISTS `vwactivationstuff`;
DROP VIEW IF EXISTS `vwactivationstuff`;
CREATE TABLE `vwactivationstuff` (
`activated` tinyint(1),
`activationKey` varchar(50),
`forgotPassExpiry` timestamp,
`forgotPassKey` varchar(50),
`activationExpiry` timestamp,
`id` int(10) unsigned
);

--
-- Definition of table `tbaudio`
--

DROP TABLE IF EXISTS `tbaudio`;
CREATE TABLE `tbaudio` (
`id` int(10) unsigned NOT NULL auto_increment,
`filename` varchar(45) NOT NULL,
`downloadCount` int(10) unsigned default NULL,
`title` varchar(45) NOT NULL,
`author` varchar(45) default NULL,
`dateRecorded` datetime NOT NULL,
`series` varchar(45) default NULL,
`listenCount` int(10) unsigned NOT NULL,
PRIMARY KEY USING BTREE (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;


etc..

abduraooft
10-19-2009, 12:34 PM
You may need to remove all lines containing the characters /*! .... */;

nikos101
10-19-2009, 01:23 PM
thats a pain :(

nikos101
10-19-2009, 01:24 PM
I wonder if hostgater allows remote access of mysql databases so I don't need to use online phpMyAdmin?

abduraooft
10-19-2009, 01:27 PM
thats a pain :(Can't you use a simple search and replace option with a regexp?

nikos101
10-19-2009, 01:30 PM
Guess so but still a pain :)

I tried an export with local phpMyAdmin and then ran the sql on the remote one but get

MySQL said: https://cp.freehostia.com/pma/themes/original/img/b_help.png (http://www.mysql.com/doc/en/Error-returns.html)
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `audio' at line 1

I think this is the problem:



CREATE ALGORITHM = UNDEFINEDDEFINER = `root` @ `localhost` SQL SECURITY DEFINER VIEW `audio`.`vwactivationstuff` AS SELECT `t`.`activated` AS `activated` , `t`.`activationKey` AS `activationKey` , `t`.`forgotPassExpiry` AS `forgotPassExpiry` , `t`.`forgotPassKey` AS `forgotPassKey` , `t`.`activationExpiry` AS `activationExpiry` , `t`.`id` AS `id`
FROM `audio`.`tbusers` `t`

nikos101
10-19-2009, 01:36 PM
You would think that phpmyadmin(pma) would have compatible dumps.