XF 1.4 'ALTER TABLE `xf_admin_template_modification`

sbj

Well-known member
Hello,

I hope this is the right section for my problem.

So, I am moving from a cpanel shared hosting to a VPS hosting without cpanel.
I installed phpmyadmin and created a database. So, after this I imported my old database and got this error:

Error

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ALTER TABLE `xf_admin_template_modification` ENABLE KEYS */;
UNLOCK TABLES;

--
' at line 2

What to do here? First time dealing with this kind of problem.
 
I recommend using the command line for the restore:

https://xenforo.com/community/resources/how-to-backup-and-restore-your-forum-linux-windows.359/

Phpmyadmin can work but it is less reliable for backup / restore tasks.

If the command line produces the same MySQL error then we can be fairly certain that there is either a problem with the backup or maybe some incompatibility with your new MySQL server. Try a new backup + restore (using the command line for both). If the error persists then open up the backup file and isolate the specific command that is causing the error. Then try running that command directly using phpmyadmin and troubleshoot from there. Maybe there is some syntax that is not recognized by your new MySQL server.
 
  • Like
Reactions: sbj
1) Restoring the database.

Here is the shell command for restoring your database. You need to replace the CAPITALIZED portions with your own info. It is best to restore to an empty database:

mysql -uUSERNAME -pPASSWORD DBNAME < /PATH/TO/backup.sql

I have a question here. I am a bit confused. How can I restore the database, when I dont tell anywhere from which place to restore?
The database I want to restore, I must upload it via ftp to some place, correct? Which place?
How can I say "grab database from here, then overwrite the old one which is here"
And then this "< /PATH/TO/backup.sql" will be the new place saved in?
 
The required commands are in the resource linked to above, and which you have quoted.

You upload the backup .sql to the server then run the mysql command, entering the file path as necessary.
 
  • Like
Reactions: sbj
You upload the backup .sql to the server then run the mysql command, entering the file path as necessary.
And it doesn't matter where I upload the backup?
Through the command, it will automatically find the backup, overwrite the old one and save this to the path I gave above?
 
Top Bottom