Results 1 to 10 of 10
  1. #1

    Restore database error

    We are getting the below errors while restoring the sql file.

    [root@srv595 mysql]# mysql -uadmin_user-pw324234f admin_database< admin_data.sql
    ERROR 1064 (42000) at line 1: 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 'Warning: The option '--all' is deprecated and will be removed in a future releas' at line 1
    Please help me fix it

  2. #2
    Join Date
    Jun 2010
    Location
    Connecticut
    Posts
    128
    It sounds like mysqldump printed a warning message when you dumped the admin_data.sql file, and this warning was included into that sql file itself. mysql is now trying to parse this warning as an sql query, which is not going to work. I recommend that you open the file in a text editor with line wrapping disabled, and then remove any warning(s) which were written to the top of the file.
    OLM.net - Web Hosting Solutions @ Your Service
    Multihomed TIER-1 Network | 24/7 On-site Staff
    IPv6 Now Available! | Dedicated, Virtual, and Shared Hosting
    Hosting in Connecticut Since 1996 - 1-800-741-6813

  3. #3
    Hello mydatabase size 1Gb ,I can't edit it

  4. #4
    Join Date
    Jun 2010
    Location
    Connecticut
    Posts
    128
    Please provide the syntax which was used to create the admin_data.sql file.
    OLM.net - Web Hosting Solutions @ Your Service
    Multihomed TIER-1 Network | 24/7 On-site Staff
    IPv6 Now Available! | Dedicated, Virtual, and Shared Hosting
    Hosting in Connecticut Since 1996 - 1-800-741-6813

  5. #5
    Quote Originally Posted by OLM | DavidG View Post
    Please provide the syntax which was used to create the admin_data.sql file.
    Hello This file from directadmin create backup .

    I download backup file from directadmin.But can you talk me about ,I can upload this backup file to anywhere for backup
    (sorry bad EN)

  6. #6
    Join Date
    Jun 2010
    Location
    Connecticut
    Posts
    128
    Directadmin is creating a corrupt sql dump, since it contains the warning message. If you have SSH access on the server with Directadmin, I would advise you to directly take the backup yourself by using the "mysqldump" command.
    OLM.net - Web Hosting Solutions @ Your Service
    Multihomed TIER-1 Network | 24/7 On-site Staff
    IPv6 Now Available! | Dedicated, Virtual, and Shared Hosting
    Hosting in Connecticut Since 1996 - 1-800-741-6813

  7. #7
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    3,262
    Quote Originally Posted by echipvina View Post
    We are getting the below errors while restoring the sql file.


    Please help me fix it
    Can you provide the output of this command:

    Code:
    head -1 admin_data.sql
    Regards
    Joe / UNIXY
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    Server Management - Unlimited Servers. Unlimited Requests. One Plan!
    cPanel Varnish Plugin -- Seamless SSL Caching (Let's Encrypt, AutoSSL, etc)
    Slow Site or Server? Unable to handle traffic? Same day performance fix: joe@unixy

  8. #8
    Join Date
    Mar 2009
    Posts
    2,222
    Quote Originally Posted by echipvina View Post
    Hello mydatabase size 1Gb ,I can't edit it
    Use the tail command to copy all but the first line to a new file; then load the new file:

    tail -n+2 inputfile > outputfile

  9. #9
    Join Date
    Jun 2010
    Location
    India :)
    Posts
    289
    Hi,

    I think you got the command wrong. There should be space between -u and admin_user.
    mysqladmin -u admin_user -pw324234f admin_database< admin_data.sql
    Try the above command. I have modified the command accordingly. It should work.
    Aigen Solutions | http://www.aigensolutions.com
    Guaranteed High Quality Outsourced Support
    24X7 Server Management |Hourly Sysadmin | Hire Individual Techs
    AIM:AigenSales |MSN:aigensolutions |E-Mail: Sales@aigensolutions.com

  10. #10
    Join Date
    Oct 2003
    Location
    Hanoi
    Posts
    4,309
    Quote Originally Posted by Aigen_tech View Post
    I think you got the command wrong. There should be space between -u and admin_user.
    No, his command is just fine. The issue is he ran backup in out-of-dated DirectAdmin server. It can be fixed by running this command first

    replace "Warning: The option" "-- Warning: The option" -- admin_data.sql

Similar Threads

  1. During WHM restore of an account backup get error: "Failed to restore the domain"
    By tnedator in forum Hosting Software and Control Panels
    Replies: 0
    Last Post: 10-20-2007, 12:33 AM
  2. Font error after restore database ! Please help!
    By justbenice in forum Hosting Security and Technology
    Replies: 5
    Last Post: 05-17-2006, 06:23 PM
  3. how to restore database ?
    By mrcancel in forum Hosting Security and Technology
    Replies: 6
    Last Post: 10-04-2005, 09:43 PM
  4. Database restore help
    By galacnet in forum Hosting Security and Technology
    Replies: 3
    Last Post: 05-05-2005, 11:24 PM
  5. restore database ?
    By constantine in forum Programming Discussion
    Replies: 2
    Last Post: 04-21-2005, 04:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •