Classicamiga Forum Retro Edition
1 2 3 4
Thread: SQL problems
Harrison 15:35 17th September 2007
Site database is about 5MB and forum database is about 33MB.
[Reply]
Stephen Coates 11:34 18th September 2007
Got another error which I'm not sure about now. I'm begining to wonder if this database will ever work.

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 'd90c350459', '', 'What are you laughing at? There are many ways to do it, and Ap' at line 1

database:
INSERT INTO `phpbb_posts_text` VALUES (19936, 'd90c350459', '', 'What are you laughing at? There are many ways to do it, and Apple has done far harder before. \r\n\r\nApple used to make MacOS install CDs that would only install on Macintosh Performa models, the same MacOS that would run any 68k, but would not install on anything other than the machine Apple had designed that particular CD from.

Any ideas?
[Reply]
Harrison 11:42 18th September 2007
Umm... not sure about this one. About the only thing I noticed is the , '', part. I'm assuming that is the subject line text and as it is a reply within a thread that the post has no subject. Maybe try placing a space in there and see if that fixes it, so it would look like:

'd90c350459', ' ', 'What are you lau

The only other thing in that part that could cause any problems is the question mark, but that is unlikely.

BTW, what settings do you have ticked when you export your DB from PHPMyAdmin? Just want to see if you had anything selected that has caused you all of these problems.
[Reply]
Stephen Coates 14:14 18th September 2007
It is a reply to a topic, and that is a subject line. There are lots of posts like it.

I just tried to connect using SSH and it said that SSH access is not enabled on the account, so it is possible that I might be able to get access. I will try and do that.

I think I left all the phpMyAdmin at all the default settings. I seem to remember chaning some settings when I did it last year, but i couldn;t remember what.
http://www.emaculation.com/steve/export.jpg
[Reply]
Harrison 14:26 18th September 2007
The settings look fine from that screenshot.

Are you using the backups to restore a database to a new database (ie no data in the database before you restore it), or are you importing the backup into an existing database that has data already in it?
[Reply]
Stephen Coates 15:05 18th September 2007
There is no data in the database when I restore it. If I try and restore it into a database that already has data I get an error saying that it is trying to restore things that already exist.

I now have SSH access. I got the address after I saw something about SSH in CPanel, and the video tutorial for it showed how to connect using a built in java client, that wasn't avaliable, so using the address I found, i tried to connect to it in PuTTY and it said that SSH is not enabled. The hosts help page said that I needed to email them with the server IP address and user name and they would enable it. So I did and 10 minutes later, I got SSH access.

Now I just need to know how to go about restoring the database using SSH. A quick bit of googling found the required command, but I'm not sure whether the database needs to be on my computer or not. The original database without any of the fixes that I did is already on the server at http://www.emaculation.com/dump/dump.sql, and the dump.sql which had all the backslashes added to it is on my desktop.
[Reply]
Harrison 15:34 18th September 2007
The sql backup file needs to be on the same server as you wish to restore the database too.

To restore the database you just need to run a mysql command in the shell

Code:
mysql -h[database server] -u[username] -p[password] databasename < backupfile.sql
So if your database server is called db01.domain.co.uk, the database is called db1001, username is fred, password is cheese, and the database backup is called backup.sql, then the command would be:

Code:
mysql -hdb01.domain.co.uk -ufred -pcheese db1001 < backup.sql

[Reply]
Stephen Coates 16:56 18th September 2007
Done that. Now I get this error:

mysql -hlocalhost -uclockwis_phpBB -p******** clockwis_phpBB < public_html/dump/dump.sql

ERROR 1045 (28000) at line 82321: Access denied for user 'clockwis_phpBB'@'gaius.asmallorange.com' (using password: YES)

Any ideas as to what that means?
[Reply]
Harrison 17:29 18th September 2007
Are you sure you have the right username and password? Normally that error is because you have the root username or password wrong. It isn't always identical to the ftp access details.
[Reply]
Stephen Coates 17:48 18th September 2007
I don't know anything about root user names.

All I know is that the database name is clockwis_phpBB, the username for that database is clockwis_phpBB and that the password is ********. It does restore some of the database before the error appears.
[Reply]
Tags:Array
1 2 3 4
Up