MySQL DB Upload Problem

3 replies
Hello there,

I'm waiting to hear back from the programmer but I thought I would check for an answer here as well.

Here is what he told me to do with the SQL db they created for a site:

When you login to cpanel then simply click to myphpadmin link and you will be redirected to database server, there you will see various links, just click to your created database link (db_name) at left. Then you will have a new page where you will see top links, click to "import" link and browse you SQL(database) file and then click to "Go" button at bottom right, all data is up now.
I do all that but when I upload the SQL db I get an error message about the db not existing. I created a mysql db from cpanel for the site but I just can't get the tables of the db created by uploading the SQL db. Any suggestions on how I can get this to work from the phpmyadmin import area?

Thanks.
#mysql #problem #upload
  • Profile picture of the author tomm
    I think if you open the SQL db using a text editor, you will see, near the top, something like:

    USE dbname;

    where dbname is the name of your database; try deleting that line and importing again

    if it doesn't work, paste here the error msg you receive
    {{ DiscussionBoard.errors[36585].message }}
    • Profile picture of the author Alan Petersen
      Originally Posted by tomm View Post

      I think if you open the SQL db using a text editor, you will see, near the top, something like:

      USE dbname;

      where dbname is the name of your database; try deleting that line and importing again

      if it doesn't work, paste here the error msg you receive
      That was it. He had a dummy db name in .sql file. Once I replaced it with the db I created it worked. Thanks for your help Janet and Tomm.
      Signature
      {{ DiscussionBoard.errors[40834].message }}
  • Profile picture of the author Janet Sawyer
    Originally Posted by Alan Petersen View Post

    Hello there,

    I'm waiting to hear back from the programmer but I thought I would check for an answer here as well.

    Here is what he told me to do with the SQL db they created for a site:



    I do all that but when I upload the SQL db I get an error message about the db not existing. I created a mysql db from cpanel for the site but I just can't get the tables of the db created by uploading the SQL db. Any suggestions on how I can get this to work from the phpmyadmin import area?

    Thanks.
    Alan,

    Have you created a database and a "USER" to go with that database and "Granted" Permissions for them to use that Database?

    Is there a "config.php" file that needs that information inputting into it? and it's permissions changing to "777" "rwx-rwx-rwx"?

    As Thomm says, are there any error messages being given out?

    Import and export are usually easy with phpmyadmin -

    If you want to pm the database file and the hosting details I'll see if I can take a look see for you.

    Kindest regards,

    Janet Sawyer
    {{ DiscussionBoard.errors[37607].message }}

Trending Topics