Need help with database error- free blog sites for the help!

12 replies
Hi WF gurus,

I am getting an error message when trying to upload a database and was wondering if someone that knows php and sql could help me. The error message is:

SQL query:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="icon" href="./favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" /> <title>phpMyAdmin</title> <link rel="stylesheet" type="text/css" href="phpmyadmin.css.php?token=74fed19e63d99aad603 f18d7c8fb82a7&amp;js_frame=right&amp;nocache=37836 01106" /> <link rel="stylesheet" type="text/css" href="print.css" media="print" /> <meta name="robots" content="noindex,nofollow" /> <script type="text/javascript"> try { // can't access this if on a different domain var topdomain = top.document.domain; // double-check just for sure if (topdomain != self.document.domain) { alert("Redirecting..."); top.location[...]

MySQL said:
#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 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w' at line 1


If anyone can help me I'd greatly appreciate it and would be willing to give you a few blogs from my site Niche Blogs – premade custom niche blogs for sale*|*

Thank you!

Mark
#blog #database #error #free #sites
  • Profile picture of the author Terry Crim
    What you posted is NOT SQL. Can you post the code so I can take a look at it?

    Are you using PhpMyAdmin or a php script to connect to your database and upload?

    Did you create the database and associate a username to it yet? I do not know your level of technical know how so forgive me if this is a basic question for you.

    Thanks.
    {{ DiscussionBoard.errors[5246806].message }}
    • Profile picture of the author markspeeding
      Hi Terry,

      Thanks for the reply. Which part of the code? It's an SQL file that I am uploading and then getting the listed error message. I'm not too technical at all with SQL. I am using phpmyadmin to upload the database. There is a username created when I install the wordpress theme using fantastico.

      I'm not sure how to send you the code?

      Thanks for the help!

      Mark

      Originally Posted by Terry Crim View Post

      What you posted is NOT SQL. Can you post the code so I can take a look at it?

      Are you using PhpMyAdmin or a php script to connect to your database and upload?

      Did you create the database and associate a username to it yet? I do not know your level of technical know how so forgive me if this is a basic question for you.

      Thanks.
      {{ DiscussionBoard.errors[5270012].message }}
  • Profile picture of the author kokopelli
    The database file you're trying to upload contains HTML, that's why you're getting the error. It should just contain the database queries, not any extra HTML code.
    Signature
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {{ DiscussionBoard.errors[5247423].message }}
    • Profile picture of the author markspeeding
      Hi,

      The HTML code you are seeing is the output result of the error message that I am getting.

      Any ideas? I can give you a login to see the admin area and see the sql files if that would help.

      Thanks for the help!

      Mark

      Originally Posted by kokopelli View Post

      The database file you're trying to upload contains HTML, that's why you're getting the error. It should just contain the database queries, not any extra HTML code.
      {{ DiscussionBoard.errors[5270024].message }}
      • Profile picture of the author KirkMcD
        Originally Posted by markspeeding View Post

        The HTML code you are seeing is the output result of the error message that I am getting.
        No. It's not.

        Since the error message shows the same thing as the "query", you must be posting the actual query that you are submitting to it.
        Just because a file ends in .sql doesn't mean that it is a SQL file.
        Try opening it in a text editor.
        {{ DiscussionBoard.errors[5272960].message }}
        • Profile picture of the author markspeeding
          Hi Kirk,

          Could I email you the sqp file? Not sure how to copy and paste the code from the sql file.

          Thanks again for the help!

          Mark

          Originally Posted by KirkMcD View Post

          No. It's not.

          Since the error message shows the same thing as the "query", you must be posting the actual query that you are submitting to it.
          Just because a file ends in .sql doesn't mean that it is a SQL file.
          Try opening it in a text editor.
          {{ DiscussionBoard.errors[5274481].message }}
  • Profile picture of the author ussher
    need to see what you pasted into phpmyadmin that caused that output.

    The output has no useful info in it to help diagnose what the cause of the problem is.
    Signature

    "Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."

    - jamroom.net
    Download Jamroom free: Download
    {{ DiscussionBoard.errors[5270076].message }}
    • Profile picture of the author markspeeding
      Hi Usher,

      Could I email you the sqp file? Not sure how to copy and paste the code from the sql file.

      Thanks again for the help!

      Mark

      Originally Posted by ussher View Post

      need to see what you pasted into phpmyadmin that caused that output.

      The output has no useful info in it to help diagnose what the cause of the problem is.
      {{ DiscussionBoard.errors[5274486].message }}
      • Profile picture of the author bryanhee
        do you have answer or solution to solve the problems mentioned! I'm facing same problem!

        Thank you
        Signature
        COPY AND PASTE INCOME 'Autonomous' Income system http://MyFunnelEmpire.net
        {{ DiscussionBoard.errors[8794442].message }}
  • Profile picture of the author mywebwork
    As the others have pointed out the error is being caused because what you are addressing the database with is NOT SQL. It looks very much like you are posing an actual HTML page instead, which of course will never work.

    If what you are trying to "upload" is the actual code to construct the database then it should consist of a bunch of "CREATE TABLE" statements, perhaps followed by a number of "INSERT INTO" statements.

    Maybe you can post a link to or an excerpt from the actual .sql file - I'm sure the answer to your problem will be pretty obvious if we could just see its contents.

    Bill
    {{ DiscussionBoard.errors[5273888].message }}
    • Profile picture of the author markspeeding
      Hi,

      Could I email you the sqp file? Not sure how to copy and paste the code from the sql file.

      Thanks again for the help!

      Mark

      Originally Posted by mywebwork View Post

      As the others have pointed out the error is being caused because what you are addressing the database with is NOT SQL. It looks very much like you are posing an actual HTML page instead, which of course will never work.

      If what you are trying to "upload" is the actual code to construct the database then it should consist of a bunch of "CREATE TABLE" statements, perhaps followed by a number of "INSERT INTO" statements.

      Maybe you can post a link to or an excerpt from the actual .sql file - I'm sure the answer to your problem will be pretty obvious if we could just see its contents.

      Bill
      {{ DiscussionBoard.errors[5274484].message }}
  • Profile picture of the author wordpressguru
    Hello.
    From my point of view, you have exported the database in a wrong way. Meaning, the database you have exported took longer to complete the exportation than your php session timeout is set up. Therefore, at the end of the .sql file, phpmyadmin has added that piece of html code.
    Now, this is what I suggest you to do:
    1. Download and install MySQL Dumper from MySQLDumper - Backup your MySQL-Database (e.g. forum, guestbooks and online shops) . This software allows you to export large databases (thing that phpmyadmin cannot perform).
    2. Export your database through MySQL Dumper.
    3. Download that database to your computer.
    4. Download SQL Dump Splitter from SQL Dump Splitter - Split Large SQL Database Dump - Free Download
    5. Split the database in pieces (you can check your server's maximum upload size by creating a phpinfo file). Those splitted parts MUST be smaller than maximum upload size.
    6. Upload all .sql files from the folder where splitted database was saved. READ the ReadMe.txt file BEFORE STARTING TO UPLOAD ALL FILES.
    7. Come back and give us a beer.

    If you need more help, just send me a message.
    {{ DiscussionBoard.errors[8795301].message }}

Trending Topics