Jump to content

super newbie question


quartney

Recommended Posts

Hi--I did read the posting guidelines and I can't even find the Newbie Help board  ???  I think my brain is fried from messing around with php and mysql.

Here is my problem.  I learned how to set up a database and make queries through Dreamweaver using the procedures in a book.  Now, the place that is hosting the remote files told me "Please don't use Dreamweaver for any mysql connection. You are only authorized from "localhost". Access your database stuff from the phpMyAdmin page, please." [it's phpMyAdmin 2.6.1-pl3]

So, how in the world do I make a database connection through phpMyAdmin?  I'm sorry for this really stupid question.  I don't pretend to understand what I'm doing and I hope some kind soul takes pity on me  :)

I do have Apache and MySQL running locally (XAMPP) and everything works fine when I preview the pages.  The problems start when I upload my files remotely.

thanks a bunch,
Courtney
Link to comment
Share on other sites

[quote author=quartney link=topic=116761.msg475905#msg475905 date=1164836258]
"Please don't use Dreamweaver for any mysql connection. You are only authorized from "localhost". " [/quote]

What they're basically telling you, is to please stop connecting to the MySQL database on their server remotely, from your desktop...using Dreamweaver. BY "localhost", they mean, from your site online...on the same server.

Also...as soon as you can, ditch Dreamweaver. You will develope bad habbits using that. Learn the basics of HTML...and use something like UltraEdit...stuff that does not generate code for you...but let's you edit it properly.
Link to comment
Share on other sites

That's the thing....they don't want you connecting to the database remotely regardless of what you use. As long as you connect from within the server, you'll be fine. If the default server/host is "localhost" then make sure your connection string reflects that. You shouldn't be testing queries from your machine anyway, unless you have a local MySQL running for testing pruposes.

They should just disable remote connections to the MySQL server instead of asking their users to not do it. They are just as much at fault. :-P
Link to comment
Share on other sites

[quote]That's the thing....they don't want you connecting to the database remotely regardless of what you use. As long as you connect from within the server, you'll be fine.[/quote]

Yeah, that's exactly what I don't know how to do.



[quote]If the default server/host is "localhost" then make sure your connection string reflects that.[/quote]

Well, you've given me something to google, at least.  Thanks.
Link to comment
Share on other sites

I have a client whose Hosting Provider doesn't allow remote connections.
Yeah their at fault and shouldn't ask you not to connect. They can just
make it not possible.

Anyhow here is a solution. Log in to your hosting account. Your Hosting Provider
probably has a GUI so that you can install and setup apps on for you hosting package.
Look for phpmyadmin. You should be able to login to it then create your databases. When
you are done export the database to your local machine.

Here is where it gets a little more tricky. Install Apache Web Server, MYSQL, and PHP, and phpmyadmin on your machine.
And hopefully it's an XP machine because Win98 doesn't work that well for this. There are bundles like
WAMP that do this all for you, but I think doing it manually will give you mroe control and understanding of how
everything is working. And preferably install each part at the Root so that you will have
C:\Apache\Apache2.2\htdocs
C:\php
C:\mysql
In path in Apache is the default directory structure if you install at C:\  \htdocs will then be your htt://localhost.
Read slowly the configuration files. You will probably need to read these a few times to make sure you have
everything set up correctly. They are httpd.conf for apache, php.ini, my.ini for mysql, and config.inc.php for phpmyadmin. One last thing. On PHP5.2 the default settings have
register_globals and register_arrays set to off. change these to on. It took me a while to find figure this out
or you willin be getting errors in dreamweaver.

Once you have Apache, MySQL, PHP, and phpmyadmin working. You can login to phpmyadmin. and import the database
that you exported. Now connect to your local database through Dreamweaver. Now when you upload your files they will work without having to change anything because your database on your providers site is also localhost. And the database is has the same structure as your local one. The only thing is now when you need to make changes to your database, you need to make sure that their structures are the same. So just export the db from your host account to your local machine, and append or write over the db.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.