
13th February 2007, 17:27
|
|
Senior Member
|
|
Join Date: Jul 2005
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
MySQL Dumps
I followed the instuctions for dumping databases and then restoring them but I keep getting
Code:
mysql> gallery_db < /root/gallery_db.sql;
ERROR 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 'gallery_db < /root/gallery_db.sql' at line 1
mysql>
I can't help but think this is a setup issue since from Suse 10.1 to 10.2 it worked but now from Suse 10.1 to Debian Sarge it isn't working.
Am I overlooking something?
|

13th February 2007, 20:23
|
|
Senior Member
|
|
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 16 Times in 15 Posts
|
|
Yep, you're mixing shell and mysql commandlines.
For shell usage:
Code:
mysql -u user -p password gallery_db < /root/gallery_db.sql
For mysql usage:
Code:
# mysql
mysql> use gallery_db;
mysql> source /root/gallery_db.sql;
|

13th February 2007, 20:41
|
|
Senior Member
|
|
Join Date: Jul 2005
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanks for the help! I understand now... I did it from shell and got this error
Code:
server1:~# mysql -u root -psend4help911 gallery_db < /root/db_gallery.sql
ERROR 1064 at line 23: 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 'DEFAULT CHARSET=latin1 COMMENT='Used to store albums'' at line
server1:~#
I followed it to the file and the line but I have no idea what it is telling me is wrong. Since there were 60K plus characters I shortened it up to a couple lines below the line the error describes!
Code:
-- MySQL dump 10.10
--
-- Host: localhost Database: db_gallery
-- ------------------------------------------------------
-- Server version 5.0.18
/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!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' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `albums`
--
DROP TABLE IF EXISTS `albums`;
CREATE TABLE `albums` (
`aid` int(11) NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`description` text NOT NULL,
`visibility` int(11) NOT NULL default '0',
`uploads` enum('YES','NO') NOT NULL default 'NO',
`comments` enum('YES','NO') NOT NULL default 'YES',
`votes` enum('YES','NO') NOT NULL default 'YES',
`pos` int(11) NOT NULL default '0',
`category` int(11) NOT NULL default '0',
`thumb` int(11) NOT NULL default '0',
`keyword` varchar(50) default NULL,
`alb_password` varchar(32) default NULL,
`alb_password_hint` text,
PRIMARY KEY (`aid`),
KEY `alb_category` (`category`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to store albums';
--
-- Dumping data for table `albums`
--
|

13th February 2007, 20:43
|
|
Senior Member
|
|
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 16 Times in 15 Posts
|
|
What's the output of on the system you try to import the data on?
|

13th February 2007, 21:00
|
|
Senior Member
|
|
Join Date: Jul 2005
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ah ha!
Code:
server1:~# mysql -V
mysql Ver 12.22 Distrib 4.0.24, for pc-linux-gnu (i386)
server1:~#
and the system the dump came off of
Code:
server1:~# mysql -V
mysql Ver 14.12 Distrib 5.0.17, for suse-linux (i686) using readline 5.1
server1:~#
Can Debian use mysql5? and if so will
Code:
apt-get dist-upgrade mysql
work?
|

13th February 2007, 21:11
|
|
Senior Member
|
|
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 16 Times in 15 Posts
|
|
It's not that easy
To install MySQL 5 (and perhaps PHP5), you might want to have a look at http://www.debian-administration.org/articles/357. You need backports to get Sarge up to speed. Or wait for the soon to be ready next Debian release, or switch to Ubuntu.
As always: Linux offers a variety of choices.
|

13th February 2007, 21:35
|
|
Senior Member
|
|
Join Date: Jul 2005
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by martinfst
|
lol... it's never easy but I seem to be having a hard enough time already to be taking on another challenge!
Quote:
|
Originally Posted by martinfst
Or wait for the soon to be ready next Debian release, or switch to Ubuntu.
As always: Linux offers a variety of choices.
|
I could never get a bootable iso for Ubuntu. Every time I downloaded, burned, and booted, it would boot to DOS as and while I could switch to the cd drive when I typed in "start" which seemed to be the executable for loading Ubuntu the screen would echo that the program could not be installed from DOS. I used the same box, burner, etc for Debian and Suse which both worked.
How does Ubuntu differ from Debian? I am still dependent on GUI and Debian is dependent on Gnome and having used KDE in Suse I prefer KDE.
|

13th February 2007, 21:47
|
|
Senior Member
|
|
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 16 Times in 15 Posts
|
|
Quote:
I could never get a bootable iso for Ubuntu. Every time I downloaded, burned, and booted, it would boot to DOS as
Code:
[CR DOS]A:
and while I could switch to the cd drive when I typed in "start" which seemed to be the executable for loading Ubuntu the screen would echo that the program could not be installed from DOS. I used the same box, burner, etc for Debian and Suse which both worked.
|
Did you download the images from the Ubuntu site? I never had any problems downloading / burning ISO images for Ubuntu.
Quote:
|
How does Ubuntu differ from Debian? I am still dependent on GUI and Debian is dependent on Gnome and having used KDE in Suse I prefer KDE.
|
A very bold statement would be: Ubuntu is one version ahead of Debian. It uses the testing branch of Debian and the add some specifics from there. If you are a KDE fan, there's Kunbutu http://www.kubuntu.org/index.php
|

14th February 2007, 03:27
|
|
Senior Member
|
|
Join Date: Jul 2005
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by martinfst
Did you download the images from the Ubuntu site? I never had any problems downloading / burning ISO images for Ubuntu.A very bold statement would be: Ubuntu is one version ahead of Debian. It uses the testing branch of Debian and the add some specifics from there. If you are a KDE fan, there's Kunbutu http://www.kubuntu.org/index.php
|
I downloaded the kubuntu image and the same thing happens... when I boot to it it goes into Caldera DOS. I can get to the cd drive and see the files but can't do anything from DOS with them.
|

14th February 2007, 08:20
|
|
Senior Member
|
|
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 16 Times in 15 Posts
|
|
How did you burn the CD? You need to burn it as a bootable iso image. All burning sw (at least the ones I know) have special options to burn these type of iso images.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 23:03.
|
Recent comments
20 hours 39 min ago
1 day 1 hour ago
1 day 3 hours ago
1 day 3 hours ago
1 day 5 hours ago
1 day 10 hours ago
1 day 10 hours ago
1 day 13 hours ago
2 days 2 hours ago
2 days 3 hours ago