473,811 Members | 3,298 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Which mysql server am I on?

I do my development on a local machine with "localhost" as my mysql server.
And, of course, I have different server when in production. So that I don't
have to modify my code when I promote, I first connect to my production
server. If that fails, I connect to my local server. Is this the best way,
or is there a better way? Is there a way to detect which MySQL server is
currently available to me?

Thanks...

Sep 26 '05 #1
4 1440
Bruce A. Julseth wrote:
I do my development on a local machine with "localhost" as my mysql server.
And, of course, I have different server when in production. So that I don't
have to modify my code when I promote, I first connect to my production
server. If that fails, I connect to my local server. Is this the best way,
or is there a better way? Is there a way to detect which MySQL server is
currently available to me?

Thanks...



I just keep a configuration file in a directory below Apache root
directory so it can't be accessed from the web. The file contains
things like system names, user id's and passwords. I just include this
file to access the info.

The file is different on different systems, but it resides in the same
location relative to $_SERVER['DOCUMENT_ROOT'].

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Sep 26 '05 #2

"Jerry Stuckle" <js*******@attg lobal.net> wrote in message
news:8e******** ************@co mcast.com...
Bruce A. Julseth wrote:
I do my development on a local machine with "localhost" as my mysql
server. And, of course, I have different server when in production. So
that I don't have to modify my code when I promote, I first connect to my
production server. If that fails, I connect to my local server. Is this
the best way, or is there a better way? Is there a way to detect which
MySQL server is currently available to me?

Thanks...



I just keep a configuration file in a directory below Apache root
directory so it can't be accessed from the web. The file contains things
like system names, user id's and passwords. I just include this file to
access the info.

The file is different on different systems, but it resides in the same
location relative to $_SERVER['DOCUMENT_ROOT'].

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===


My production server is on GoDaddy. I haven't checked yet, but I doubt
GoDaddy will allow me to go outside of my "Paid" space. I know I cannot
create a table via PHP. I have to use their "manual" interface. Of course, I
can load the table with data using PHP.

If my guess is correct, anybody have any other suggestions?

Thanks..

Bruce
Sep 27 '05 #3
Bruce A. Julseth (br***********@ attglobal.net) wrote:

: "Jerry Stuckle" <js*******@attg lobal.net> wrote in message
: news:8e******** ************@co mcast.com...
: > Bruce A. Julseth wrote:
: >> I do my development on a local machine with "localhost" as my mysql
: >> server. And, of course, I have different server when in production. So
: >> that I don't have to modify my code when I promote, I first connect to my
: >> production server. If that fails, I connect to my local server. Is this
: >> the best way, or is there a better way? Is there a way to detect which
: >> MySQL server is currently available to me?
: >>
: >> Thanks...
: >>
: >>
: >>
: >>
: >>
: >
: > I just keep a configuration file in a directory below Apache root
: > directory so it can't be accessed from the web. The file contains things
: > like system names, user id's and passwords. I just include this file to
: > access the info.
: >
: > The file is different on different systems, but it resides in the same
: > location relative to $_SERVER['DOCUMENT_ROOT'].
: >
: > --
: > =============== ===
: > Remove the "x" from my email address
: > Jerry Stuckle
: > JDS Computer Training Corp.
: > js*******@attgl obal.net
: > =============== ===

: My production server is on GoDaddy. I haven't checked yet, but I doubt
: GoDaddy will allow me to go outside of my "Paid" space. I know I cannot
: create a table via PHP. I have to use their "manual" interface. Of course, I
: can load the table with data using PHP.

But that doesn't stop you from having a config file as part of the
application.

: If my guess is correct, anybody have any other suggestions?

: Thanks..

: Bruce

--

This programmer available for rent.
Sep 27 '05 #4
Bruce A. Julseth wrote:


My production server is on GoDaddy. I haven't checked yet, but I doubt
GoDaddy will allow me to go outside of my "Paid" space. I know I cannot
create a table via PHP. I have to use their "manual" interface. Of course, I
can load the table with data using PHP.

If my guess is correct, anybody have any other suggestions?

Thanks..

Bruce


I don't know about GoDaddy, but are you sure? I've seen several hosting
companies where I can access the directory immediately below the
document root.

But if you can't, just place the config file in a directory protected by
..htaccess. I just prefer having it outside the document root to ensure
no one else can get to it.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Sep 27 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2119
by: Douglas | last post by:
Dumb question on the mysql mailing list but what database should I learn, for education and interest? Free and with the possibility of making me more employable would be my only criteria. Douglas
0
4061
by: mikey | last post by:
Hi all, I'm having great problems trying to install the latest MySQl RPM package onto my Red Hat Linux OS. There is already MySQL v 3.0 pre-installed with the RH Linux distribution disk but I can not seem to get any of the functions working on it. So I have now dopwnloaded the latest version hoping that this will fix the error. I have managed to install the MySQL-shared-compat-4.0.1-0.i386.rpm but
0
2837
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to Mandrake 9.2 and am reinstalling everything. This thing is kicking my ass and I can't seem to get past it. I could really use some help if anybody has any. Just for reference, this was my primary source for information on installation and...
0
5843
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to Mandrake 9.2 and am reinstalling everything. This thing is kicking my ass and I can't seem to get past it. I could really use some help if anybody has any. Just for reference, this was my primary source for information on installation and...
1
121540
by: jiing | last post by:
Now let me describe what I have done and my purpose: Originally, I want to user ports to install phpBB But I found that phpBB doesn't support mysql 5.x (but the ports installed mySQL 5.0.0 alpha) so I deinstall mysql5-server and mysql5-client And then I install mysql41-server and mysql41-client on FreeBSD 5.3 by ports but now , mysql is not workable
3
7012
by: Nick | last post by:
hi, all I have a red hat 9 and looks like it had mysql 3.2.54 installed before, but, actually not, i can not find the install folder and I can not uninstall it. So I am trying to install/upgrade to 4.1, but, still can not get it work. Here is what I did: # rpm -Uvh MySQL-server-standard-4.1.14-0.rhel4.i386.rpm warning: MySQL-server-standard-4.1.14-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
9
1785
by: Luke Vogel | last post by:
Hi all. This is a bit of a newbie type question. I am trying to figure out what is the best way to connect to a database; ado.net, odic others? I've found a couple of examples that show you how to connect to the "Northwind" database, using oledb??
2
2908
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on the site, I made : rpm -i MySQL-server-5.0.18-0.i386.rpm then i have errors that relate to many conflicts. I cannot figure out why -and- cannot upgrade. Please Help !
1
3229
by: manish deshpande | last post by:
Hi, When i'm installing MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm by the following command: rpm -i MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm the following error is being shown: warning: MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 file /etc/my.cnf from install of MySQL-server-standard-5.0.24a-0.rhel3 conflicts with file from package mysql-3.23.58-1 file...
0
9727
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10647
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10133
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.