Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   MySQL DB Upload Problem (https://www.warriorforum.com/programming/4278-mysql-db-upload-problem.html)

Alan Petersen 18th August 2008 06:39 AM

MySQL DB Upload Problem
 
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:

Quote:

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.

tomm 18th August 2008 12:45 PM

Re: MySQL DB Upload Problem
 
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

Janet Sawyer 18th August 2008 05:15 PM

Re: MySQL DB Upload Problem
 
Quote:

Originally Posted by Alan Petersen (Post 35407)
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

Alan Petersen 19th August 2008 08:28 PM

Re: MySQL DB Upload Problem
 
Quote:

Originally Posted by tomm (Post 36585)
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.


All times are GMT -6. The time now is 03:23 AM.