Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Inside Firewall Access To Outside Firewall MySQL Server


I have 2 Suse 9.1 boxes with similar configurations. I'm in the
process of moving some PHP code from one server (192.168.0.100) to
another (192.168.0.102). MySQL is running on each server, and the same
PHP code can access its respective localhost databases and make queries
with no problem.

However, the code on the old server (.100) can access a MySQL server
(12.xx.xx.50) outside the firewall (192.168.0.1), while the code on the
new server cannot.

There is NO firewall rule regarding the two servers -- they are NOT
being accessed from outside the firewall.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Access Mysql From Behind A Firewall
I have a yahoo web-php-mysql account and they place their mysql database
behind a firewall that can only be accessed via PHP code running on their
machine. Does anyone know of a proxy package that can allow you to access
mysql from a PHP script running on another machine, for example? This
scenario is becoming very common in today's webhosts so I imagine others may
have already gone down this path.

Access Mysql From Behind A Firewall
I have a yahoo web-php-mysql account and they place their mysql database
behind a firewall that can only be accessed via PHP code running on their
machine. Does anyone know of a proxy package that can allow you to access
mysql from a PHP script running on another machine, for example? This
scenario is becoming very common in today's webhosts so I imagine others may
have already gone down this path.

Mysql + Firewall
I am running mysql on a windows system, and last night I installed a
firewall. Now I can not access mysql anymore. I get error 2003: cant connect
to mysql server on 'localhost' (10061).

Mysql+firewall
I am running mysql on a windows system, and last night I installed a
firewall. Now I can not access mysql anymore. I get error 2003: cant connect
to mysql server on 'localhost' (10061).

MySQL DB Firewall
My name is Yuli, I am the first time here. I hope I do not break any existing rules while posting here .I ran the GreenSQL project. GreenSQL is an open source tool that protects MySQL database from SQL injection attacks. It works as a database proxy transparently analyzing SQL commands.I would like to get opinion from the respectful web masters.

Mysql-cluster Firewall
I have mysql-cluster with 1 mgm, 3 nodes and 2 apis, and i need to open

some ports on firewall to mysql communicate each other, but the ports
of mysql-clusters
openned is random.

Can i fix this port numbers in mysql-cluster configuration? Or open an
port-range? Some solution?

MySQL And Windows Firewall
I have a small network with a handful of workstations running off one server. (It's an older tower powered currently by Win XP...Upgrading soon to a new server, but until then I have to use what I have)All stations need and have access to MySQL. I use the default Windows Firewall install to help filter traffic to all other ports not needed. I also run our webserver (pages built with php and powered by MySQL) and SSL server from the same tower. So currently the only open 2 ports are 80 and 443.
From both a networking and security standpoint, should I add MySQL to the exceptions list? Connections seem to work fine without it added.

Login: Protocol, Firewall?
MySQL 5.0.33 + RedHat AS 4.0

At the local system, I have two mysql users: User@localhost; User@'%'.
I tried the below three login approaches at local:

A. mysql -uUser -pPasswd
B. mysql -uUser -pPasswd -h127.0.0.1
C. mysql -uUser -pPasswd -hHost // Host is the IP of the system

I have three questions:
1. A is via mysql.scok, why B isn't? B is via TCP.
2. Why the login by B is faster than C? But in my tests, both of B and C were via TCP.
3. I launched iptables, and rejected 3306 port, why B and C still could login normally?

Firewall Causing Complications
I'm new to the world of MySQL and database servers and I'm having a bit of trouble with my connection. When I attempt to connect the server, it tells me that I can't connect to the localhost (10061). I somewhat understand what this means, but I can't get my firewall to let the connection through.

I had the same problem when I had the Norton Firewall, and all I did was tell it to permit the connection. I'm no longer using Norton and I'm just using the Firewall that is part of my router. HOW DO I ALLOW THE PORT TO BE ACCESSES BY MYSQL!!!

Connect From Unix Mysql Server To Ms Access Server
Im wondering is it possible to connect through my mysql db (running on fedora core 4) and access the ms access tables on the ms access server?

I have a connection setup the other way around using an odbc bridge, is it possible to do this the other way around enabling me to view / edit the access tables through mysql.

Remote Access To My Mysql Server
I ran grant all privileges on *.* to 'root'@'%';

I've got two questions... firstly, when I try to get to it from another machine on the local network it tells me access denied...

secondly, I'm on a soho network with a NAT router... what port/ports do I set up to access the mysql server from the outside?

Remote Access To MYSQL Server Host
I am trying to access a mysql database on my old host (I'm doing a CMS migration to something on a different server.) My hosting company doesn't have a CLUE what I'm talking about when I say MYSQL server host (I'm not even sure I do). They keep telling me it's 'localhost'. I can access both dbs through their prospective phpmyadmins.

Is there any way I can find out what the host server is? I would just export the db and then import it into the other one, but all attempts at that have failed.

Access Linux Mysql Server From Windows?
Can I run a Mysql server on a linux box, and access the databases belonging to it over a lan from a machine running windows xp?

How Do I Enable Remote Access To MySQL Database Server
I want to connect to my mysql server which is seperate on an external server but i dont know how to enable remote access to MySQL database. The mysql server is on xp and running mysql 5.

Storing The Image Inside Mysql
i read it affect performance by 1 third or something

but isnt that worth it for lets say a online hardware store?

or is it actually faster maybe?

Running A Script From Inside MySQL
I can run a script from my shell like this

shell> mysql </path/myscript.sql

But how do I run a script from inside mysql?

Calling A Php Funtion Inside A Mysql Query
hi there, im trying to call a php function that i have created inside a query and im getting an error.when i remove the funtion statment the query is successful. i was wondering is it possible to call a php function inside a query, if so how do i go about doing so.

this is my code:

How Can I Execute A PreparedStatement Inside Mysql Function
How can i execute a preparedStatement inside mysql function?

Access Forbidden To Server
i'm trying to test my website and php pages and it comes up with access forbidden to this server? which doesn't make sense to me?

SQL Server Does Not Exist Or Access Denied
When I try to access MySQL Database, I get this message. I think that I have the wrong pipe name for my SQL Server. But I am not sure how I find that out.

How To Backup Database Data Without Direct Server Access
I need to backup a MySQL database (MySQL 4.0). But it is on a
shared-hosting web server and so I don't have direct server access. I
also have no phpMyAdmin installed.

How can I backup the database? I think it is possible with PHP
(version 5.0.2 is installed on the web server) to create a file with
SQL commands which restore the data, but what is the easiest way to do
it?

How Do I Setup The Server On A Network Drive For Client Software To Access?
I'm building a database system for our department at work and have successfully installed the MySQL Server 5.0 to my local machine and developed my user interface to access it read/write/update, etc. just fine through VB6 and the ODBC driver.

My problem now is how do I get the database files and server functions moved/transplanted/installed on a network share drive (Windows 2000) that my peers and I have access to, so that I can deploy me client user interface onto their machines so we can all access the database across the network and I can get the files off my local hard drive?

Remote Access Not Working: Error 1251 Client Does Not Support Authentication Protocol Requested By Server
I'm trying to set up my MySQL database for remote access. I've never been a DB admin so this is all mostly new to me. I am binding to my public IP address, and I have created a new user with the following grant commands run from the mysql command line on the server:

mysql> grant all privileges on prs_data.* to 'username'@'%' identified by 'change';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on prs_data.* to 'username'@'localhost' identified by 'change';
Query OK, 0 rows affected (0.01 sec)

When I try to connect remotely from another host, here's what happens:

The Problem Is About Access Denied For User...how Can I Access The Mysql??
you can find some problems below. the problem is about access denied for user...
how can I access the mysql? ......

Inside IF NULL
I have this table:
------------------
id lang name
1 en name1
1 de NULL
2 en name2
2 de name3

I want to return all (WHERE lang='de') rows but if the (name=NULL) then replace it with name from the same id but lang='en'. Is it possible?

I have this query:

SELECT IFNULL(name, SELECT name FROM table WHERE lang='en' AND id=????) name FROM table WHERE lang='de'

Can you fix it?

How Do I Do A AND With A Bunch Of OR After WHERE Inside A Query?
Ok, I have something like the following:

SELECT dog WHERE ago = 1 AND (fur = brown or fur = black or fur = white)

can I do that? I need to find dog MUST be 1 year old, but their fur can be either brown or black or white.

Looking For Tokens Inside A String
I'm trying to do a weird (?) thing with regexp and MySQL. For example,
i have a column with:

token1|token2|token3

(three tokens separated by pipes)
I'm trying to write an SQL query in order to look for the presence of
one of these tokens, that is "look for a string like 'tokenX' that is
preceded by the beginning of the line OR a pipe, AND that is followed
by the end of the line OR a pipe". I have tried this:

SELECT * FROM ... WHERE (... REGEXP "(^||)tokenX($||)");

but, of course, it doesn't work. So my question is: what's wrong ? My
regular expression, or my idea ?? There is a another way to obtain
what i want, that is to select a token within a string when tokens are
separated by anything but a comma ?

COUNT (*) Inside Select
I am doing something wrong i would like to do a count inside this select for example:

SELECT th.tid, th.tname, th.tmain
(SELECT COUNT(*) as postnumber FROM forumpost AS post WHERE post.ptid=th.tid)  
FROM thread as th WHERE tmain=1

Trying To Avoid Using Query Inside While Loop
I've done a lot of reading on here and I learned from some of Rudy's posts that it's a bad idea to do a query inside a while loop. I don't know why this is but he seems like an expert so I'll listen

What I am trying to do is take the top ten points from a player and display them. First I will post the tables then the code.

CREATE TABLE `tournament` (
`gameid` int(11) unsigned NOT NULL auto_increment,
`gametype` tinyint(2) unsigned NOT NULL default &#390;',
`gamedate` datetime NOT NULL default &#55612;&#57200;-00-00 00:00:00',
`leagueid` int(11) unsigned NOT NULL default &#390;',
`seasonid` int(11) unsigned NOT NULL default &#390;',
`roomid` int(11) NOT NULL default &#390;',
`gamename` varchar(50) NOT NULL default '',
`cost` mediumint(4) NOT NULL default &#390;',
`seats` mediumint(4) NOT NULL default &#390;',
`notes` tinytext NOT NULL,
PRIMARY KEY (`gameid`)
) ;

CREATE TABLE `tournament_results` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`gameid` int(11) unsigned NOT NULL default &#390;',
`memberid` int(11) NOT NULL default &#390;',
`place` smallint(4) NOT NULL default &#390;',
`earnings` smallint(5) default &#390;',
`bounties` float unsigned default &#390;',
`points` float NOT NULL,
PRIMARY KEY (`id`)
);
Now the follow code would be what I would use if I just wanted to add all the points and not limit it

PHP

mysql_query("SELECT
members.firstname,
members.lastname,
SUM(tournament_results.points) AS tpoints,
COUNT(*)as numgames,
AVG(tournament_results.points) AS apoints,
members.memberid AS membersid
FROM
members,
tournament_results,
leaguemembers, tournament
WHERE members.memberid = tournament_results.memberid
AND leaguemembers.memberid = members.memberid
AND leaguemembers.leagueid = '$lid'
AND tournament_results.gameid = tournament.gameid
AND tournament.seasonid = '$sid'
GROUP BY members.memberid
ORDER BY tpoints DESC");

That will total all of their games but I want to limit it their top 10 scores how can I do this without introducing a query inside of the while loop?

Accumulating Values Inside A Query
I only have experience of simple queries, and this one is a bit beyond me. I've done some research, and I think it might be possible to do within a single query, but I'm not sure.

I have a single table. It contains columns (among others): date, number. I want to produce a table of DATE, and new_number_count, where 'new_number_count' is the number of numbers on day with date DATE that do not have rows on previous DATEs.

For example, if this is my table:

Use SQL Code From Table Inside Trigger
I have the WHERE clause that I would like to use in constructing larger statements stored inside a database table as a string. Inside the INSERT Trigger for a different table, I would like to be able to:

<get the tuple with the WHERE clause I want to use>;
SELECT * FROM t WHERE <use code in database>;

Is there a way I can pull out this data and append the data to the second statement and execute it?

Format Text Inside Database
I have a news-type database. I pull the data out with PHP. I was wondering if I could format/bold/ certain words in the database when I enter them. For example:

Today JOHN CAESAR won his first race.

I'd like the name "JOHN CAESAR" to show up bold on my web page.

Is there a way to enter it in the database as bold?

Get Affected Rows Inside Procedure?
is it possible get affected_rows number by a delete statement inside a procedure assigned to a variable? Code:

Execute A Shell Command Inside SQL
I wonder if there is anyway you can run a shell command inside   SQL.
for example "SELECT * FROM table;execute shell command"
I had googled around and didn't find anything.

Finding User Details Inside UDF
i heared that its possible to get user details inside
the UDf by adding the mysql_priv.h header file.

But where will this file be available.
i am using MySql 3.23.52 on linux8.0

when i try to compile it says :"mysql_priv" file not
found.

If i can include this file, i can get the thread
constructor called...

How To Sort Rows Inside The Group
First step:

SELECT ID, Priority, RealID FROM MyTable WHERE ParentID='0' ORDER BY Priority;

The result is

+----------+----------------+--------------+
| ID | Priority | RealID |
+----------+----------------+--------------+
| 1 | 1 | 1 |
| 9 | 1 | 1 |
| 2 | 2 | 2 |
| 11 | 2 | 3 |
| 3 | 3 | 3 |
| 10 | 3 | 2 |
+----------+----------------+--------------+

Then try to obtain the rows grouped by RealID sorted by ID from high to low.
This is very important thing and I'm sticking with this:

Let's say we have

| ID | Priority | RealID |
| 1 | 1 | 1 |
| 9 | 1 | 1 |

I need to obtain second row (the row with max ID in the RealID group).

What I worked out is the following:

SELECT MAX(ID) as ID, RealID FROM MyTable WHERE ParentID='0' GROUP BY RealID ORDER BY Priority;


And Get

+----------+--------------+
| ID | RealID |
+----------+--------------+
| 9 | 1 |
| 10 | 2 |
| 11 | 3 |
+----------+--------------+

But I'm expecting the following order.

+----------+--------------+
| ID | RealID |
+----------+--------------+
| 9 | 1 |
| 11 | 3 |
| 10 | 2 |
+----------+--------------+

1. Can't understand why the rows sorted incorrectly.
2. How to "select" the rows according to my need (I have 10 fields in the MyTable and I think this is not good to select all fields using MAX(...) function). Maybe use subrequests?

Html Links Inside Varchar
I have to put html links inside varchar and text fields. They have to be (somehow) fulltext searchable (of course a substring, %keyword% search, would pick them up - I realize that) and they have to render as clickable links when I output the fields via PHP. How would I do this?

Preventing A Count Query Inside A Loop How?
I have an idea in my head and im pretty sure its possible but I don't have enough mysql knowledge to apply. Basically, I have this:

SELECT user_id FROM ml_group_subscriptions WHERE user_group = $id
then in php I initialise a loop go over the results:
PHP

while ($row = mysql_fetch_array($get_users))
                {
                    $this_user = $row['user_id'];


and then an insert query:

INSERT INTO ml_subscriptions (`user_id`, `campaign_id`) VALUES ($this_user, $add_to_campaign)
while this is all dandy, I don't want duplicate data. My only current method would be
PHP

$get_users = mysql_query("SELECT user_id FROM ml_group_subscriptions WHERE user_group = $id");
                while ($row = mysql_fetch_array($get_users))
                {
                    $this_user = $row['user_id'];
$check = mysql_result(mysql_query("SELECT COUNT(user_id) FROM ml_subscriptions WHERE user_id = $this_user"),0);
if ($check == 0) {
                    $insert_users = mysql_query("INSERT INTO ml_subscriptions (`user_id`, `campaign_id`) VALUES ($this_user, $add_to_campaign)");
}
                }


as you can see this is putting a query inside a loop which could be potentially huge. Can I not adapt the first SELECT query to only accept data that is not about to be duplicated?

Regexp To Return All Number Inside A Field
does this is possible? all i just want to manipulate is the phone number in my database. i want to get the numbers inside this format text (125) 125-1268 or in this format 225.265.4649. how can i accomplish that in the query?

Multiple Prepare Statement Inside The Procedure
I'm trying with the multiple dynamic queries inside the stored procedure means, inside my stored procedure i want to execute Multiple queries (DDL and DML). for that i'm storing query in variable and then executting it by prepare stmt.

It works fine with singal prepare stmt and failes for the multiple prepare stmt.

Is there any solution to execute multiple queries inside the Stored procedures or Functions?

Clearing Values From All Rows Inside A Certain Field
How could I clear all the rows value in a specific field? Here's an example:

How would I clear math and english from field: FAV SUBJECT?

table1

NAME|AGE|CLASSROOM|FAV SUBJECT
John|12|3B|math
Stacy|11|3B|english

Ignoring Content Inside HTML Tags
Is it possible to set MySQL to by default ignore all content contained within HTML tags? For instance, if a database full of HTML pages has the "class" attribute on a lot of the tags and someone searches for "class" expecting information on classes, wouldn't that also return all those documents just because they had a "class" attribute?
It would be great if I could set MySQL to ignore all content between < and >.

How To Apply Php Or User-defined Functions Inside A Query
Instead of applying a php or user-defined function to data after fetching, I want to apply functions inside queries, not sure if this is possible.

This is how it's done with MySQL function:

SELECT
FROM_UNIXTIME(table_articles.article_pubdate, %M %d, %Y)
AS pub_date FROM...
Is it possible to replace FROM_UNIXTIME() with the php function date() ? so it's something like


SELECT
".date("table_articles.article_pubdate", 'F d, Y')."
AS pub_date FROM...
The above is just an example, actually I want to apply another user-defined function, which formats text of the field article_content.

How Can I Pass A String Parameter To A Query Inside A Procedure?
I want create a procedure to drop the table named as the input parameter....

Support For Temporary Tables Inside Stored Procedures?
Does MySQL have support for temporary tables inside stored procedures?

Store Links Inside The Main Text In A Database
we are trying to set up a mySql database while rebuilding a webpage
with lots of content.we actually dont know how to set up the tables for
that and especially how to store links inside the main text?should we
use xml files to store the text with embedded links?

Lost Connection To MySQL Server During Query / Server Has Gone Away
All of a sudden the server stopped working. When trying to execute a simple INSERT both from PHP and Query Browser, the server crashes and I get either "Lost connection to MySQL server during query" or "Server has gone away" errors.

The problem started on 5.0.18, and upgrading to 5.0.41 didn't help. I'm using Windows XP SP2.

I've seen quite a few posts on similar problems, but no real solutions though. Is that a bug?

Get Access Denied Msg..how Can I &quot;reset&quot; Mysql Access
I downloaded the windows installation last night -
mysql-4.0.16-win.zip - unzipped it to c:ms, double clicked on setup.exe and
nothing.... nothing happened at all....

Bad download I though, so tried the same thing with the .zip of
version 3.25.55 I had - the downlaod that I used once before, before my
recent re-format - so I knew that it did work once, but this time, same
problem. The setup.exe just doesn't do anything...

I really want to learn mySQL, but if I can't even install the thing,
it doesn't look good!

MySQL 4.1.22 And SQL Server 2005 On Same Server?
Is anyone running MySQL and SQL Server on the same machine? We are running SQL Server 2005 on a Win2k3 server and need to add an instance of MySQL for a new PHP site.


Copyright © 2005-08 www.BigResource.com, All rights reserved