quartney Posted November 29, 2006 Share Posted November 29, 2006 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 Quote Link to comment Share on other sites More sharing options...
Caesar Posted November 29, 2006 Share Posted November 29, 2006 [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. Quote Link to comment Share on other sites More sharing options...
quartney Posted November 29, 2006 Author Share Posted November 29, 2006 Thank you, I know how to code HTML in notepad. It's the php stuff that I need Dreamweaver for. I understand what they were telling me; what I need to know is how to make a connection without using dreamweaver then. Quote Link to comment Share on other sites More sharing options...
Caesar Posted November 29, 2006 Share Posted November 29, 2006 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 Quote Link to comment Share on other sites More sharing options...
quartney Posted November 29, 2006 Author Share Posted November 29, 2006 [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. Quote Link to comment Share on other sites More sharing options...
oberwil Posted December 5, 2006 Share Posted December 5, 2006 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 justmake it not possible. Anyhow here is a solution. Log in to your hosting account. Your Hosting Providerprobably 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. Whenyou 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 likeWAMP that do this all for you, but I think doing it manually will give you mroe control and understanding of howeverything is working. And preferably install each part at the Root so that you will haveC:\Apache\Apache2.2\htdocsC:\phpC:\mysqlIn 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 outor you willin be getting errors in dreamweaver.Once you have Apache, MySQL, PHP, and phpmyadmin working. You can login to phpmyadmin. and import the databasethat 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.