View Full Version : Execute SQL
Madbatty
01-24-2009, 01:19 PM
After moving our forum from one host to another, we have upload all files to the server. Run the SQL BackUp by using MySQL without any problems. But now we have a lil problem to Execute the SQL. There are three option to do that.
1. Enter an SQL command to execute on database
2. Select an SQL commands file to execute on database
This can also be used to restore a MySQL backup, which is just a file of SQL commands.
3. Select a text data file to import into MySQL database
This file must contain one database record per line, with the fields in either tab separated or CSV format.
We have try almost everything to Execute the BackUp, but does not work, so if anyone may know how to do that or have the correct command for it, please let me know.
Marco van Herwaarden
01-24-2009, 02:36 PM
The only reliable method of backing up and restoring a database is with shell access via telnet or ssh. This is because backing up with a PHP script like that in the Admin CP or phpMyAdmin can result in PHP timeouts errors and an incomplete backup file. Please see the instructions here:
Backup:
http://www.vbulletin.com/docs/html/maintenance_ssh_backup
Restore:
http://www.vbulletin.com/docs/html/maintenance_ssh_restore
P.S. If you don't have shell access, some people have also reported success with these scripts:
MySQLDumper:
http://www.mysqldumper.de/en/index.php
MySQLHotxcopy:
http://www.vbulletin.com/forum/showthread.php?t=134821&highlight=mysqlhotcopy
Bigdump:
http://www.ozerov.de/bigdump.php
Madbatty
01-24-2009, 03:39 PM
Thanks Marco :)
but all charts and tables are already recreated ( without any problems or errors ) and only when I click on execute the SQL I need a special command or a special TXT file ( I guess based on the Host Webmin CP we are using ) to execute it, the rest is already done and works fine. So in case someone know about what I?m talking or know the execute command to do that please help.
Here are two screenshots to explain the problem a little bit better, as you can see on the drop down menu
all needed charts are there again without that I receive a error message:
-http://i40.tinypic.com/34zhhe1.jpg
only for this last thing I?m not sure about what to do:
-http://i43.tinypic.com/5vzn9l.jpg
Lynne
01-24-2009, 04:18 PM
I don't understand what you are trying to do. Are you trying to create a backup of your database or are you trying to import a database?
Do you have shell access to your site?
Madbatty
01-24-2009, 04:27 PM
I (we) only try to recreate (import) the Database etc. thats all. The SQL charts and tables are all recreated but the threads does not show on the forum again, and yes I (we) have shell access. After the BackUp was installed I got asked to execute the SQL to finish the BackUp. Maybe I´m wrong about something but as far as I can see all charts and tables are back and running, also the Database size is the same.
Lynne
01-24-2009, 05:13 PM
So what you're saying is you've been asked to run one last mysql command for some reason (what is it supposed to do?) and you aren't sure where to input this command? You can enter a mysql command in that box in your second image or in the Admin CP > Maintenance > Execute SQL Query
Madbatty
01-24-2009, 05:17 PM
Yes I know Lynne but I don?t know this command for example that is my problem. I also google it up but found nothing for that case. So if you may know this command PLEASE let me know :) but I will try now your second tip thx so far.
Edit: Okay I try that but receive "You are not authorized to execute SQL queries" and I am Root Admin and No.1 in the config oO^^
Lynne
01-24-2009, 05:20 PM
I don't understand what command you want. Marco posted links to pages that give the commands to import a backup. If that isn't the command you want, then I'm not sure what you want. If your backup is from a different version than what your files are for, then you will need to run the upgrade script to upgrade the database to the current version of vb you are running.
Madbatty
01-24-2009, 05:25 PM
We did upgrade to 3.8 maybe 2 weeks ago and the BackUp I try to use is only 2 days old and the new forum that is running is also 3.8 would be kewl if you may could tell me what I need to do to have permission to run Execute SQL Query like you mention before. I will now check all links again Marco posted and see if I may find a command that helps. Thanks !
Lynne
01-24-2009, 05:29 PM
In order to execute a sql query in the admin cp area, you need to add your userid into the space in the config.php file that allows users to run queries:
// ****** USERS WITH QUERY RUNNING PERMISSIONS ******
// The users specified here will be allowed to run queries from the control panel.
// See the above entries for more information on the format.
// Please note that the ability to run queries is quite powerful. You may wish
// to remove all user IDs from this list for security reasons.
$config['SpecialUsers']['canrunqueries'] = '';
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.