
Richard Ainz
|
| Posted: 05/06/2003, 3:41 AM |
|
As many others I have access through "PHPMyadmin" to add tables in a remote MySql database. I CAN NOT create another database, nor can I remotely connect to it, as far as I know. I can only create tables.
As with some Forums, it might be possible to import the relavant tables to database at server, but HOW?
How should I configure CodeCharge in order to be able to use that databases tables (working locally) and then "move" them to database on server?
Please ask me for more info, instead of just ignoring a stupid question.
I know html, I know forms, I am VERY new to PHP and MySQL, that is why I use CodeCharge!!
Thanks
|
|
|
 |
Casper
|
| Posted: 05/06/2003, 5:54 AM |
|
Hi Richard,
What hosting package you have and control panel? Example, cpanel has "manage mysql or db" that's the option to create another database (ask your hosting admin on how many databases are you allow to create).
In PHPMyadmin (after you select the database)on the right tabs with the following "Structure, SQL, Export, Search and Query".
To take a dump of your database on the host with content - firstly select "Export" tab than Click on "structure and data" than click "GO".
This will dump a sql file (text format) and allow you to download it.
To create the table and data on your host,
1. click on the database (or create a database than click on the database)
2. Click on the "SQL" tab
3. Where "Run SQL query/queries on database:" form - paste your SQL than GO. Or Location of textfile > this will ask you to upload your SQL file than click go.
Same goes in reverse on your local pc.
Regs.
Joe
|
|
|
 |
rclayh
|
| Posted: 05/06/2003, 6:01 AM |
|
Set up a database on your local machine that has the same name as your remote machine database. Then create a user that matches your remote user (usually your hosting login) with the same password with all privileges on the local database.
Don't rule out remote access, some hosts can set you up with remote access to your database. OLM told me all they needed was originating IP in order to provide remote access to mine.
To swap tables back and forth just use the data dump facility of PHPMyAdmin.
Some final tips..
Your host may have an old version of PHPMyAdmin running. If you want a newer version you can install it on your remote website yourself. Be sure to protect the directory to keep just anyone from accessing your data.
When creating tables for MySQL it's a good idea to add a unique prefix to the table names. For example nfb_contacts instead of contacts. If you want to install pre-made scripts you'll want to make sure you don't have two scripts wanting to create a contacts table in the same database.
Finally, when granting privileges on the local machine you may have to grant them to myusername@localhost instead of just myusername. This will keep your database connection (mostly in Dreamweaver) consistent with the remote.
|
|
|
 |
Richard Ainz
|
| Posted: 05/07/2003, 12:34 AM |
|
Hi pals,
Thanks for replying.
the Server is www.b-one.dk and I admin through PHPMyAdmin 2.3.2 and MySQL 3.23.54
It seems I can "run" an sql text to import the lot
I will give it a shot.
Thanks again
|
|
|
 |
|

|