Can't upload mysql database through phpmyadmin

lifelink

New Member
Messages
5
Reaction score
0
Points
0
I managed to upload my .php files. Then i exported my mysql database from my local phpmyadmin but i wasn't able to import my mysql database using x10hosting's phpmyadmin. It showed me this :

 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Does the DB already exist? If so, try deleting it first.

OR, go back to your phpMyadmin and export the tables/data, not the database.
 

lifelink

New Member
Messages
5
Reaction score
0
Points
0
Does the DB already exist? If so, try deleting it first.

OR, go back to your phpMyadmin and export the tables/data, not the database.


Currently there's no db. So do I export only the table and import it through phpmyadmin directly? sorry i'm a newbie in this, still learning.:(
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
1. cPanel --> MYSQL Databases , create your database. create a user (write the password down) and add the user to the db with ALL PRIVILEGES

2. Export just data/tables from your current DB. use phpMyAdmin. Go to your database (should show all your tables). Click export, etc.

3. Use that file to import into your DB here via phpMyAdmin.
 

lifelink

New Member
Messages
5
Reaction score
0
Points
0
1. cPanel --> MYSQL Databases , create your database. create a user (write the password down) and add the user to the db with ALL PRIVILEGES

2. Export just data/tables from your current DB. use phpMyAdmin. Go to your database (should show all your tables). Click export, etc.

3. Use that file to import into your DB here via phpMyAdmin.



Ok. I created a database 'lifelink_hccwebform' , user 'lifelink_louis' , set all privileges and a user password [password]. i tried to upload the table 'memberships' instead of the db but it showed me #1046 - No database selected .

I did changed this part:
$con = new mysqli('localhost', 'lifelink_louis', '[password]', 'lifelink_hccwebform');
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
1. when in phpMyAdmin, select the DB, then import

2. Why are you bothering with PHP when you haven't even imported the DB?
 
Last edited:

lifelink

New Member
Messages
5
Reaction score
0
Points
0
Thank you descalzo !!


I managed to make it work. It wouldn't let me import my table so i tried to manually run sql query to build the table. It worked. Thank you for the help.:wink:
 
Top