Where is the Import command???

How to use phpmyadmin.... phpmyadmin related arguments. Even phpMyAdmin issues

Moderators: egami, macek, gesf

Post Reply
Dave 5

Sat May 08, 2004 2:32 pm

I'm new to MySQL, phpMyAdmin, etc. I was told that I need to create a database on both my computer and online (through my C-Panel), then use phpMyAdmin to import MySQL tables from my computer.

So I created a MySQL database through my C-Panel and accessed C-Panel - but I can't find any reference to "Import," though there is an Export function.

And if I can tack on another question or two, do the databses and tables on your computer and online have to have the exact same names, usernames, passwords, etc.?

Below is the code from a MySQL table I inserted on a web page with Dreamweaver:

$db = mysql_connect("localhost", "root");
$result = mysql_query("SELECT * FROM employees",$db);
if ($myrow = mysql_fetch_array($result)) {
echo "<table border=1>\n";
echo "<tr><td>Name</td><td>Position</td></tr>\n";
do {
printf("<tr><td>%s %s</td><td>%s</tr>\n", $myrow["first"], $myrow["last"], $myrow["address"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
} else {
echo "Sorry, no records were found!";

If I publish this page online, and I already have a copy of my MySQL database/table online, then I assume this code...

$db = mysql_connect("localhost", "root");

won't work unless the values "localhost" and "root" are the same online. Plus, I assume I also have to plug in my username and password somehow.

So I guess I answered my own question, but I just wanted to make sure. I'm assuming everything online has to be a carbon copy of everything on my computer - same web page, same database and table, same usernames and passwords, same Dreamweaver database connections.

Is this correct?


User avatar
php-forum Super User
php-forum Super User
Posts: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Sun May 09, 2004 8:10 pm

check the SQL tab...

there you can find a place where in you can upload your .sql files and execute on the sql server....

Post Reply