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




How Make Mysqld Listen To Only 2 IPs


I have an development/test server on a windows 2000 box running. AFAIK mysql needs 127.0.0.1 to connect to the localhost, if I use it on the db-server's machine. Usually I'd connect via LAN so I need mysqld listen on 2 IPs.

1) 127.0.0.1
2) 192.168.1.42 <-- LAN-IP

This box has a second LAN-Interface and a third which connects to ADSL.
Those 2 are to be considered realm of evel.

I just rather have mysql listening on localhost and one of the
LAN-interfaces. Is this possible at all ?

There is this parameter for mysqld : bind-address
It only works with 1 aeddress. Even when I put 2 such lines in my.cnf it
just takes the second value.

Do I have to let it listen on 0.0.0.0 and let mysqld sort the access
attemts with the grant tables ?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Listen To Modifications
I'm using MySQL databases from version 3.23.15 and up. I would like to monitor changes on some tables. Triggers would do great but they aren't supported in the versions I'm running. How could I monitor changes to specific tables and columns. The same functionality should be ideally working on all versions I'm using.

Set MySQL To Listen From Other Computers
I have a problem connecting to MySQL server! The server is working on the other computer than my scrpit(my web page). The IP of MYSQL computer is 10.0.0.2. and port 3306! When i try to connect like this :

$link=mysql_connect("10.0.0.2.", "user", "password");
$db ="database_name";

... I get the folowing massage:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '10.0.0.2' (10061) in D:InetpubwwwROOT.......

The ip, username, password and database name are all correct! It is said, that it's possible, that the MySQL is set to work on localhost! If this is the problem, where to configure mySQL, to be able to connect from other computer?

How Listen Queue Size Affect MySQL On RedHat
i want to know if the system parameter somaxconn affect the capabalities
of MySQL to maintain more than five thousands of HTTP connections ?

Mysqld-nt
What is mysqld-nt?

My.cnf And Mysqld
I just finished installing mysql on my box. but i don't have my.cnf file or mysqld anywhere. but i'm sure mysql is running already. Code:

Mysqld Max
I am trying to make mysqld max so i can create innodb tables but I am
getting the following error when i run mysqld

No Variable Match for: -0 'innodb_buffer_pool_size = 40M'
../mysqld version 3.23.56 for pc-linux on i686

I am unable to figure out what to do. This shows that it reads the my.cnf file
but how can I get rid off this error??. My computer have just 64MB ram. Do u
think that less ram is causing this error.

DBI With Mysqld
Can I use DBI to interface Perl with mysqld running locally rather than
with a 'true' MySQL server?

Mysqld Don't Log
In /etc/my.cnf I put an entry under [mysqld] section for mysqld.log as
following:

log = /var/log/mysqld.log

However, mysqld actually does not log anything. Can any one out here
help me to make it working.

Mysqld-nt
I am trying to eliminate the password that is associated with the 'root'.
When in start with mysqld-nt --skip-grant-tables, the cursor goes down to
the next line, but never gets to a new prompt.
When I do alt-cntl-del and look at the processes, it shows mysqld-nt is
running, it just sits there and flashes.

Mysqld
This could be a silly question, but I have a web-based MySQL/PHP application that contains sensative data. Now, I realize that MySQL is most secure (over network transfer) using SSL, but would there be a reasonable tradeoff to consider not using SSL if the only host that is allowed to connect to it is the localhost?

I.E> there would be no out/in network traffic, so wouldn't adding SSL only slow things down without gaining much (if anything at all)?

So, basically the only thing that can connect is PHP on the same server?

Mysqld-nt.exe
I run a phpbb2 forum on a winxp pro pc (up to date) with msyql 5.0.18, apache 2.2.0 and php 5.1.2. Every once in a while (maybe once a month or so), mysql unexpectedly and spontaneously terminates. This usually happens when no one is at the server (i.e. when the server is doing nothing other than running phpbb2, apache, msyql and php). The apache logs reveal nothing suspicious.
Anyone know why this might happen? And maybe more to the point, anyone have a suggestion about how I could rig my server to monitor whether mysql is running and automatically restart it if it's not (so that I don't run into the problem where my forum goes down because mysql terminates and I can't do anything about it till I get home to restart mysql)?


Mysqld-max
I have a mysql server with a couple hundred-thousand entires that constantly maxes out our server at peak times to the point where the database locks up. It uses up 99.9% cpu and over a gig of memory on our Dual Core 64 Athlon 2 Gig DDR machine.

Make
i have downloaded the mysql tarball and tried installing in the /usr/local/src but .....
i am unable to install mysql as whenever i try to type the command make && make install it throws me the error:

Make: *** No rule to make target "install" .stop


kindly advise me how to proceed with the installation

Removing Mysqld-net.exe
Recently I removed MySQL 4.0.15 from my pc, but have noticed that a process called 'mysqld-nt.exe' is still running in the task manager. I have tried shutting down and uninstalling the service via the command line, but since the mysql directory no longer exists the system reports there is nothing to remove!

Should I re-install mysql 4.0.15 and try un-installing it again, or does anyone know a quicker way to fix this problem?

Mysqld Logs
I have a DATABASE server running MySQLD 3.23.58.Users vist and sign up
their interest in my website.Now the problem is arising that when a
user signs up first , they get emails of confirmation from my
server.In addition to these emails , the customer also gets some
annoyed e-mails from someone residing/depending totllay on @yahoo.com
email-address maintaining the anonymity.

I did try by sending only e-mails to some my own email address,
whether someone is sniffering through my traffic, but I got no e-mail
except the ones I had sent myself.

After this I added some other email addresses in my DB server but I
sent no email to them at all.This time all email addresses got those
*annoying* e-mails also.

Number Of Mysqld
i want to limit the number of mysqld daemons running on my linux system. despite my best efforts to search/find the configuration option for this i haven't been able to find a single bit of info on this topic, including searching the configuration options for the my.cnf file. right now my server is running twelve copies of mysqld, and i only need 3 at the most. i'm sure this is possible, i just don't know how. can anyone help me?

/var/log/mysqld.log Not Written To
for some reason, the mysql error log is not being written to. If I stop mysqld, rm the mysqld.log, start mysqld, the mysqld.log get's created. However, it doesn't contain anything. It should at least have 'started...' and a few other lines indicating that mysqld was started sucesfully, no?

Here is my my.cnf as it pertains to the logs:

--log-error=/var/log/mysqld.log
--log-slow-queries=/var/log/mysql.slow.log

/var/log/mysql.log is chown mysql.mysql and chmod -rw-r-

Has anyone else experienced this? Any suggestions?

Mysqld Got Signal 11
I run 2 servers in a master-slave configuration (both Solaris 5.8 [64 Bit]
and mysql4.0.14). Mysql (only on master) crashes exactly every 15 Minutes
with the following message:

-----schnipp---------------
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, something is definitely
wrong and this may fail. Code:

Mysqld Startup
I'm using ssh to administer a mysql server, version 3.23.49, which I
just installed.

The problem when starting mysqld: I type "mysqld" at the shell prompt
and hit return, then I get the message "mysqld: ready for
connections". But then it doesn't give me back the shell prompt. I can
type stuff on the screen, but it doesn't do anything. I've tried
Ctrl-C and Ctrl-Z, but that does nothing. Any ideas?

MySQLD Binary Log
We've been using MySQLD for a few years now quite happily. It's amazing
how well it performs. However, I have a minor issue, and I'm not sure how
to deal with it. I've scoured the manual, searched list archives, the
web, etc., and am coming up empty.

Somehow, the server is recording the Binary log in the data directory.
Each of these log files takes up a gigabyte. This would be all well and
good if we were using the server in as a master in a replication setup,
but we are not. It WAS formerly acting as a master in a replication
environment, but we've long since made it the only SQL server on our
network. We've removed (commented) all the lines in my.cnf that deal with
replication, and the log-bin is one of these lines. To clarify: the
log-bin line in the my.cnf file IS commented with a hash-mark (#). The
server has been restarted since this change, and "SHOW MASTER STATUS"
returns an empty set of data (only showing the field names.)

the SQL command RESET MASTER does nothing. It does not delete the
hostname-bin.### files.

the mysqld commandline parameters follow:
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/inferno.pid --skip-locking

We're running version 3.23.41 for pc-linux-gnu on i686, running on SuSE
Linux 7.1, kernel 2.4.18 #2 SMP on a Dual-Processor Pentium II 450MHz
server

So, if any of you can shed some light as to why it would be saving the
binary log against our will, or as to how to stop it, it would be greatly
appreciated.

Handle Use By Mysqld.exe
When I run MySQL, I notice that mysqld.exe uses > 40,000 handles (according to Windows Task Manager).Is this normal? what all these handles are used for?

CAn't Connect Through Mysqld-nt
Here is a summary;
am working on win2k os, downloaded phptriad, mysql4.xx, php5.xxx and installed them all, now when i start apache i can connect to my server (i.e 127.0.0.1) now for mysql.

i noticed in task manager that there is mysql-opt is working, now from phptriad i run mysqlnt -d but i still can't connect to mysql using mysql FrontEnd, reading around, i tried mysqld-nt --console it says that there is another mysqld running on 3306, so changed the port for the mysqld section in my.cnf to 1234, but still can't connect.

Mysqld Stalls
I have two tables, a table of properties, and a table of locations (i.e., zipcodes). The following query takes so long I gave up waiting for it to complete:

SELECT * FROM properties LEFT JOIN locations USING (locationcode, locationtype) WHERE acres < 500 ORDER BY (price / acres) ASC, 'price' ASC LIMIT 100

I'm running debian linux, and:

mysql Ver 14.12 Distrib 5.0.13-rc, for pc-linux-gnu (i486) using readline 5.0

An EXAMINE of the above SELECT reveals:

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE properties ALL NULL NULL NULL NULL 16424 Using where; Using temporary; Using filesort
1 SIMPLE locations ALL NULL NULL NULL NULL 31294

During the query, the mysqld process is using 99% of the cpu. Mysqld continues to use %99 of cpu even when client is killed. I finally gave up waiting and kill -15 mysqld. After a few seconds it gracefully died, and I restarted it.

The problem is 100% reproducible.

Does anyone have any clues? Is my SELECT above got a major flaw that makes the server go swap happy? I have 512mb memory, I'd think that'd be'nuff.

Mysqld Is Not Running
cannot seem to run mysql commands, although queries seem to work well as I can make databases and view tables. Hope that makes sense.

I installed mySQL 5 on Windows XP and tried to stick with the default installation options and paths. I lauch mySQL from this: ""C:Program FilesMySQLMySQL Server 5.0inmysqld", enter a password (but not a username so I'm assuming that's root user), get a mysql> prompt. So far so good.

The following commands do not seem to work though:
mysqladmin version
mysqladmin variables

Typing these commands then clicking the return key brings up the -> prompt. I've checked the processes and "mysql.exe" and "mysqld-nt.exe" are running. From a c: prompt I tried to install mysqld and was told it is already running. What am I missing here? I'm sure it is something very simple...

Ultimately I need to bring in a table from a SQL dump from another system. I've tried using variations of: mysql -h host -u user -p dbname < dumpfile.sql

I'm combing through the docs, but still don't have a clue.

Mysqld Without LinuxThreads
does anyone know if it's possible to compile MySQL under Linux so that
mysqld doesn't rely upon LinuxThreads, but makes direct call to fork()
or clone() system calls instead?

I'm looking for a way to avoid the exploitation of pthreads under
Linux.

Can't Shutdown Mysqld
I installed mysql-4.1.7 on solaris 8. I can start it using
mysqld_safe. But when I tried to shutdown using 'mysqladmin -p
shutdown' and type in the root password, it gave:

mysqladmin -p shutdown
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'oracle'@'localhost' (using password:
YES)'

I started mysqld_safe under Unix account "mysql", why it complains
about 'oracle'?

MySQLD Binary Log
We've been using MySQLD for a few years now quite happily. It's amazing
how well it performs. However, I have a minor issue, and I'm not sure how
to deal with it. I've scoured the manual, searched list archives, the
web, etc., and am coming up empty.

Somehow, the server is recording the Binary log in the data directory.
Each of these log files takes up a gigabyte. This would be all well and
good if we were using the server in as a master in a replication setup,
but we are not. It WAS formerly acting as a master in a replication
environment, but we've long since made it the only SQL server on our
network. We've removed (commented) all the lines in my.cnf that deal with
replication, and the log-bin is one of these lines. To clarify: the
log-bin line in the my.cnf file IS commented with a hash-mark (#). The
server has been restarted since this change, and "SHOW MASTER STATUS"
returns an empty set of data (only showing the field names.)

the SQL command RESET MASTER does nothing. It does not delete the
hostname-bin.### files.

the mysqld commandline parameters follow:
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/inferno.pid --skip-locking

We're running version 3.23.41 for pc-linux-gnu on i686, running on SuSE
Linux 7.1, kernel 2.4.18 #2 SMP on a Dual-Processor Pentium II 450MHz
server.

Mysqld Logs
I have a DATABASE server running MySQLD 3.23.58.Users vist and sign up
their interest in my website.Now the problem is arising that when a
user signs up first , they get emails of confirmation from my
server.In addition to these emails , the customer also gets some
annoyed e-mails from someone residing/depending totllay on @yahoo.com
email-address maintaining the anonymity.

I did try by sending only e-mails to some my own email address,
whether someone is sniffering through my traffic, but I got no e-mail
except the ones I had sent myself.

After this I added some other email addresses in my DB server but I
sent no email to them at all.This time all email addresses got those
*annoying* e-mails also.
I am really fed up with this issue, getting no clue how to come to
know about this.

Mysqld Restarts Itself
One of my servers uptime is about 12 days... Last night I went to bed with everything running and ok. The next day around lunch time, I checked phpmyadmin and it seemed the database said "Uptime 10 hours" ?? And my memory (HEAP) rows were gone...

Does mysqld restart itself after days of uptime? If so, how can i stop it ?

Mysqld.sock (11)
I get the following error:
PHP Warning: mysql_connect() Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11)

The server setup is: Ubuntu, PHP 5.0, MySQL 4.0.24, and lighttpd
This error seems to be appears when the load on the server increases. I've looked online and searched the devshed forums but still didn’t find a solution.

Normal Mysqld
I'm on a dedicated server that isn't live and I'm the only person that's on it.
I haven't done much on the box, yet when I check my processes with top, I see 11 mysqld processes lying there each taken up about 12 megs of memory.

Env: /etc/init.d/mysqld
when i start/stop my mysql this was the result..

[root@SM70192 /]# service mysqld start
env: /etc/init.d/mysqld: No such file or directory

Set Mysqld.log Size
I'm experiencing some problems due to big '/var/log/mysqld.log' size
(199 Mbytes), and I'd like to know if there's any method to set this
file's maximum size.

Can't Make The Right SQL Statement - Please, Help
I am trying to pull out the data from teh server with the dvd's names that start from 0 or 2 (both numbers):

SELECT * FROM dvd_product WHERE product_publish = 'Y' and product_parent_id = 0 and product_name like &#392;%' or like &#390;%'

and it DOES NOT WORK..

please, help me out it here..

thanks!

P.S. basically i need to pull out all the dvd's, which titles start from NUMBERS..

How To Make A Unique Key 1 Again?
I want to make a unique number 1 again.

How To Make A Database?
i have installed the MySQL thing, but i wanna know how to make a database.

How To Make A Backup
I am hosting a website at a hosting company. I have Mysql database, using phpMyAdmin 2.5.1. How can I make a back up of my database?

How Can I Make 1 Table Out Of 3
I have 3 tables that I want to take information from each and make a 4th table.  Each record in the individual tables has a id number that links the information For example:

table A:

id
Name
phone
Fax Email

Table B:
id
address
city
state
zip

table C:
id
salesman
other phone



Make A Loop
i got this table with different numbers, and i have to compare each of them to a value stored in a variable. when i get match, some statements run; however, i dont know how to get one value at a time! heres what the pseudo code looks like

@fixedvalue=5

repeat
if @fixedvalue = value i from rates then
do some statements;
i = i + 1;
until @counter = count (*) from rates;
do some more statements;

i havent found the way to identify rows! thought triggers repeated on each row, but they dont, and indexes are not actually indexes as in 1,2,3....2700.

Make An Sql Backup
i have a phpmyadmin backup of an sql database but when I try to upload it now, I get errors because of the following reason:
The insert quotes are with single quotes (by this I mean : ‘ ). The problem is this : if there is a ‘ in the insert query, it gives me an error. FOR EXAMPLE:

Insert into(‘xxx’,’xxx’,’xxx’,’xxx’)
Works fine, but when you have:
Insert into(‘xxx’,’xxx’,’I’ll type some message here’,’xxx’)
You get an error because of the ‘ in I’ll type
Anyway to fix this problem?

Make This INSERT
table 1

productID int(10) auto_increment primerkey
fk_type int(11)
price double

table 2

typeId int(11) Nej auto_increment primerkey
name varchar(60)
information text

I wonder how do I write the insert question to insert values to the two tables

Make A Contact
How would I make a contact form that uses sql?Also, how would I make it so I could delete the submissions that are recorded by using a button on the .txt file they are sent to?

Mysqld.exe Using 33,638 Handles For 3 Databases
Running MySQL 5.0.37-community-nt on Server 2003 x64 SP2. We have 230 databases created, only 4 of which are in use according to MySQL Administrator. Currently mysqld.exe is using 33,638 handles the moment the service starts. In other deployments we generally only see about 4k handles for many more active databases. Can anyone shed some light as to why there are so many handles in use?

[MySQLD]
port=3306
basedir=C:Program Files (x86)SWsoftPleskDatabasesMySQL
datadir=C:Program Files (x86)SWsoftPleskDatabasesMySQLData
default-character-set=latin1
default-storage-engine=INNODB
read_buffer_size=1M
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_additional_mem_pool_size=2M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1M
innodb_buffer_pool_size=16M
innodb_log_file_size=10M
innodb_thread_concurrency=8
max_connections=400
old_passwords=1
max_user_connections=30
thread_cache_size=4
thread_stack=196608
binlog_cache_size=32768
net_read_timeout=30
net_retry_count=10
net_write_timeout=30
thread_concurrency=10
open_files_limit=0
[client]
port=3306

Mysqld Error On Startup
I should probably have left well alone, but I wanted to move
the installed location of mySQL. This all seemed to go OK, but when I moved
from something like:

/home/rob/mySQL/mysql-max-3.23.55-pc-linux-i686/bin

to /mysql

The when I try to startup the daemon I get an error

Can't find message file /usr/local/mysql/share/english/errmsg.sys

Now as far as I know I've never had this directory, or this problem. I can
start using ./bin/safe_mysqld & and everything seems to work OK. To further
complicate matters I also downloaded and installed 4.1 and the same happens
(it wan't an attempt to fix the problem, just something I needed to do)

When I try to find the settings file, (since I'd also like to change the
data directory location) which I thought was called my.cnf, then I can't
find one. Any idea what's happening

99.9% Mysqld Utilization Problem
i have seen a couple of postings on the following issues which i have
encountered and have struuggled with for a couple of days now.
i apologize in advance if someone has already posted the resolution and i
missed it.

Problem Description:
on a Dual i386 Architecture with RH9, MySQL 3.23.54a-11 (or its .56 upgrade)
under heavy loads the mysqld process reaches 99.9% CPU Utilization (as
viewed using top)
and a second daemon is never forked and the database hangs.
some people have indicated they need to kill -9 mysqld (although i do not
have that problem).

specifically my rig has:
- two P3/866
- 1GB RAM
- have successfully upgraded to MySQL 3.23.56 using the RPMs
- have sucessfully copied my-large.cnf settings to /etc/my.cnf
- am using Mantis Bug Tracker (PHP) to connect
- have Apache 2 that comes with RH9
- have 600 global users reporting problems but heavy load is about 10-20
concurrent

this is my first Dual-RH server.
previously, i have used all single processor P2, P3, & P4.

can anyone shed some light on possible next steps.
i would hate to have to pull production back to a Single Proc after having
built a Dual and really do NOT want to even think about Win32 option.

Mysqld Startup Errors
I get the following message when I try to startup mysqld in the /usr/local/mysql/bin directory.

./mysqld: /usr/lib/libstdc++.so.5: version `GLIBCPP_3.2' not found (required by ./mysqld)
./mysqld: /usr/lib/libstdc++.so.5: version `CXXABI_1.2' not found (required by ./mysqld)

I'm running Fedora core3.

Cannot Start Mysqld After Rsync
I rsynced my /var/lib/mysql directory last night to my new server, and I not cannot start mysql on the old server. I typically use/etc/init.d/mysqld startbut get
Timeout error occurred trying to start MySQL Daemon.

Starting MySQL: [FAILED]

when trying to do so. /var/lib/mysqld/mysql.sock exists after the attempt, but has size of 0. Running mysqld_safe returns

Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
070524 15:36:36 mysqld ended

Does anyone have any suggestions as to how to proceed?

Starting Mysql With Mysqld
i'm trying to change the mysql data path. to do this, i have to shoot down mysql and restart it. i tryed to restart mysql with the program mysqld (i'm using windows xp, mysql server 5.0), but it doesn't work. why? is there any different way to start mysql? there was no error message or something like this. if i start it with mysqld --standalone, it works, but the command window doesn't replay anymore.

Mysqld Command Not Found
I followed all the instructions in the tutorial section of the manual, but typing mysql -u root I get Error 2002 Cannot connect thru socket. From what I gather, this is because mysqld is not started (since mysql.sock does in fact exist.) Well, if I try to start mysqld, redhat tells me Command not found. So, I thought I'd try mysqld_safe. Well that gave me some feedback:

Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
050413 [timestamp] mysqld ended


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