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




Command SHOW SLAVE STATUS G, Shows That SLAVE_IO_RUNNING


I am trying to set up a master/slave replication.. I followed the instructions in the mysql manual.. I am using mysql 4.0.12 installed in windows xp... I have found out that the replication is not working ...

when i make the command SHOW SLAVE STATUS G, it shows that SLAVE_IO_RUNNING : No.
How can I make this run? What could have I done wrong?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
What Privileges Need A User To Run "SHOW SLAVE STATUS" ?
i use mysql 4.1.22
i need to create an user who must have rights to run only "SHOW SLAVE STATUS" query.
from online documentation i wasn't able to find what privilege i must grant to this user to be able to do only this query.

Show Table Status
I need to place the date a MySQL table was last updated into a PHP variable.
SHOW TABLE STATUS provides lots of information, including update_time, for
all of my tables. But how do I assign the value of update_time for my
"members" table into the variable $dateLastUpdated?

Show Table Status
I need to place the date a MySQL table was last updated into a PHP variable.
SHOW TABLE STATUS provides lots of information, including update_time, for
all of my tables. But how do I assign the value of update_time for my
"members" table into the variable $dateLastUpdated?

Show Grant Status
How can I see what GRANT permissions the current user has across the current database and across all databases?

Show Table Status
I used "show table status " to get the database size, but how come the number of rows it shows changes each time? There's no change to the db at all. However the data length and index length remain unchanged. Why?

Show Status Data
I'm developing a net-snmp module that executes a 'show status' command
on a MySQL server and advertises the values. My choices seem to be

super concrete: one server, one set of results, the variables don't
change, ever.
moderatly concrete: multiple possible servers, one set of results each,
the variables don't change, ever.
abstract: multiple servers returning a table of some results. Things are
what they are when they are.

The problem with the obvious choice is that it's a table of tables of
values, and if you've used SNMP much you know where that leads, and try
programing for it.

So the question is, are the values that it returns likely to be added
to/removed from the show status command likely to change much, or can I
just write a long but easy to code for MIB with each of the values.

'Show Table Status' Speed
if anyone knows which is faster..

"SHOW TABLE STATUS LIKE '[tablename]';"

vs.

"SELECT COUNT(*) FROM [tablename];"

I'm trying to pick between these two queries (in order to get the size of the table), but want the faster of the two.i expect the table to be very large (millions of rows).

SHOW TABLE STATUS FROM DB_NAME
SHOW TABLE STATUS FROM db_name LIKE 'tbl_name';
**The command above is to show all the properties under tbl_name.

My question is, how can I get the properties in certain condition. Let's said under tbl_name contain a column name call type and it differential with A and B.
So how can I get those properties where the type='A'?

Java Mysql Show Table Status
I am using java to retrieve a resultset with "show table status" mysql
command. I am having problem reading the [name] and [engine] column.
In the metadata object it is showing as VARCHAR but when I do
getString() it is returning me the object string (e.g. "[B@1e3e7d2")and
not the actual database value. I am using Mysql 4.1 and jdbc driver
3.1. I tried getB/Clob, getBytes, getCharacterStream() and none of
them is working.

Flood Of Mystery SHOW STATUS Commands/
I've got MySQL v4.1.5 running on Debian Linux (woody) with Apache 1.3 and PHP 4.1.2, and something somewhere is doing around 10 "SHOW STATUS" commands per second! Network connections to the MySQL server are disabled, and I can't find any web scripts on my server that should be doing this.

SHOW TABLE STATUS & The Nested SELECT Statement
The "SHOW TABLE STATUS" command seems to return a result set, just
like "SELECT * FROM SomeTable".

Therefore, since the following is valid:

SELECT * FROM (SELECT * FROM SomeTable)

I inferred that this functionality would extend to the SHOW statement:

SELECT * FROM (SHOW TABLE STATUS FROM SomeDataBase)

But such a command gives an invalid syntax error.

I want to query the data_length from a few tables, place those values
into temp variables and then run a second SQL command using those
values. Is what I'm trying to do possible?

SHOW TABLE STATUS & The Nested SELECT Statement
The "SHOW TABLE STATUS" command seems to return a result set, just
like "SELECT * FROM SomeTable".

Therefore, since the following is valid:

SELECT * FROM (SELECT * FROM SomeTable)

I inferred that this functionality would extend to the SHOW statement:

SELECT * FROM (SHOW TABLE STATUS FROM SomeDataBase)

But such a command gives an invalid syntax error.

I want to query the data_length from a few tables, place those values
into temp variables and then run a second SQL command using those
values. Is what I'm trying to do possible?

Limiting Fields In "show Table Status"
show table status like "products";

Sometimes this is too much information and I was looking for a way in MySQL to select only the columns you wanted to see like you could do with a select.

I know I can use PHP or Perl to parse this and output only what you want but wanted to see if there was a fairly easy
way to do so in MySQL. For example if I wanted to see the
Name, Rows, and Auto_increment fields only.

SHOW DATABASES Or Similar Command
Is there a query that will show me the database that I have connected to?

Command "Show Column"
I know that "Show Column" query shows the name of all variables with their characteristics.

I want to know if there is a command that ONLY shows the name of the varibales of a column (without characteristics).

MyOLEDB Doesn't Support Commands Like SHOW FIELDS, SHOW TABLES
My code is shown below, I can select * from employees but I cannot get any data back from SHOW FIELDS, I do not receive an error, in fact, something is returned but I'm not sure what. I can execute the command:

SHOW FIELDS FROM test.employees

in the Control Center just fine, even cmd.ExecuteReader will enter reader.Read() once, something is returned but what does it look like? ......

7e2 Shows Up As 7.00E+02
I have value that I'm adding to a table via an insert statement. The value is "7e2", but for some reason is being converted to scientific notation on the insert "7.00E+02". I have quotes around the field as well. If you look at the insert statement below, it's "question" field. Anyone know of a way to force it to be a string?


$sql = "INSERT INTO ICI_ANSWERS (session_id, scale_id, question, answer, date_stamp) VALUES ('" . $piece . $data[0] . "', " . $data[1] . ", '" . $data[2] . "', '" . $data[3] . "', '" . $data[4] . "')";

Opened_tables Always Shows Zero
When I log into any of our db servers, go into mysql on the command line, and do a 'show status', the value of Opened_tables is always showing 0.

However, when I log into mysql via the MySQL Administrator and look under Health-->Status Variables it shows a value.

Any idea why it's always showing zero when I do it from within mysql on the command line? It's happening on multiple servers.

MySQL Only Shows Homepage
I have a problem concerning MySQL and Apache. I host a Fedora server with Apache, MySQL and PHP installed. A customer has a webpage that uses MySQL but for some reason I can't get any other pages than the homepage up when I click on other links, I just come back to the homepage. The URL displays the other link but it still stays the same. Code:

'datetime' Shows Only '0000-00-00 00:00:00'
I currently have a form set up on a site to send data entered into a database.
Now, the form submits correctly, the data is stored in the database correctly,
but the 'datetime' shows up as '0000-00-00 00:00:00' in each record.

I set the datetime variable to 'not null' and when I update the table, it sets the
default value to '0000-00-00 00:00:00'. Am I forgetting to set something or
where and how does the form get that date and time info?

Querying Only Shows 3 Columns
I have a mysql database set up with 20 columns but when querying the database only get 3 columns listed. The code i am using is as follows.
// connect to server, database, table.
include ("db_connect.inc");
SQL-query:
$sql = 'SELECT * FROM `signups` ORDER BY `title` ASC LIMIT 0, 30';

Is there a problem with my coding or the database itself? and what are the fixes for this problem?

Error Shows The E-mail @ Sign..?
I am gettin an error msg when trying to enter my newsletter registration details to the database.

function process_nl($id) {
$name=$_POST['txtname'];
$email=$_POST['txtemail'];
$SQL = "INSERT INTO nletter (name, email) VALUES ($name, $email)";
if(mysql_query($SQL,$id)) {
return true;
exit;
}
else
return false;
}

error:
You have an error in your SQL syntax near '@yahoo.com)' at line 1

Phpmyadmin Shows ???? Of Korean Data
My machine is windows xp sp2 with Apache HTTPD 2.2.0, MySQL 5.0.18, PHP 4.4.1 pl1 phpMyAdmin 2.7.0-pl1.

And the settings of apm is;

1) httpd.conf
DefaultLanguage ko

2) php.ini
default_mimetype = "text/html"
;default_charset = "iso-8859-1"
;default_charset ="utf-8"
;efault_charset = "euc-kr"

3) my.inf
[mysqld]
character-set-server = utf8
collation-server = utf8_general_ci

On my test site, I can see right Korean data.
But on phpmyadmin I can see only ???? for Korean data.

Musql Dump Shows Error
I am trying to backing up a databse .

I open the command promt form start > run;
i wrote the command "mysqldump --opt kimberly > backup.sql"
kimberly = database name;

the error comes out :

mysqldump: Got error: 1045: Access denied for user 'ODBC'@'localhost' (using password: NO) when trying to connect

Arabic Character Encoding Problem (shows Just ????????)
i have a problem and i did not found a solution untill now and i hope i found it here.
when i try to enter the arabic characters throw the browser to the mysql DB using phpmyadmin it does not enter the arabic characters but strange characters
but when i fetch the data to the browsers it shows the characters in arabic.
(the is the first problem)

the other problem is ...
when i write directly to the phpmyadmin in arabic it shows me the arabic characters inside phpmyadmin and when i fetch dhe data to the browsers it shows to me only question marks ??????????????????.
#########################
inserting throw browsers = displaying ok in browsers but not ok in phpmyadmin
inserting throw phpmyadmin = displaying ok in phpmyadmin but ???????? in browsers
##########################


Query Log Shows 12+ Attempts To Connect Every Minute
I have mysql-4.0.20a-nt running on windows 2000. I had trouble connecting from a different computer in my home network so I set the following in my.ini:

set-variable=log=mysql.log

At startup I get the mysql.log file in the data directory. Upon inspection it shows a lot of connect commands, at least 12 every minute, with some 10 seconds in between, they come in pairs, first as ODBC@localhost with no password, and second as user@localhost with a password set. Access seems to be denied every time. Here's a snippet from the file:

MySql, Version: 4.0.20a-nt-log, started with:
TCP Port: 3306, Named Pipe: MySQL
Time Id Command Argument
050320 20:38:08 1 Connect Access denied for user: 'user@localhost' (Using password: YES) ....

Date Field In Database Shows 0000-00-00 00:00:00
i have the following in my list of variables (partial list):

$id = $_POST['id'];
$name = $_POST['name'];
$date = date("D, d M yyyy, h:ia T");

and my connection includes:
$sqlquery = "INSERT INTO $table VALUES('$id','$name','$date')";

all other values are posting except the date.

in the mysql database, the date field is set up as follows:

Field Type Null Default
date timestamp Yes CURRENT_TIMESTAMP

my objective is simply to add a date field with the current date and time. i want mysql to insert the date for me in the format resulting in this type of output:

Fri, 19 Aug 2005, 10:23am CST. i just wasn't sure whether i was supposed to
include the date variable or not.

MYSQL Date Entry Shows 0000-00-00
i want the user to type in the date. Everything works fine and the form submits. When i open the database and query the results, the date field shows only 0000-00-00. It doesn't show the date entered (ex 05/23/07). What am i doing wrong?

I'm thinking it has to do something with converting the string to a date? If so, how do i do that in PHP.

Mysqld Shows High Cpu Usage Over Extended Time, Restart = Normal
Occasionally in checking one of the servers, I noticed that mysql shows 85% + of
cpu usage essentially leaving the server at 0% idle. After monitoring it for a
few hours, the status did not change. After a stop and start of mysql, things
progessed normally. Checking back a few days later I noticed it was once again
sitting up there at 95% (or thereabouts) and doing nothing of value from what i
could tell.

Have restarted MySQL during peak usage times for that server and its database,
and it has showed normal loads and CPU usage (approx 20% CPU with .1 to .3
load). Is there a known issue (running on FreeBSD 4.8, MySQL 3.23.55 MyISAM)?
Is there something I should check when next I notice the high CPU usage?

NOW() At Replication Slave
We have 3 MySQL servers in replication, 1 master and 2 slaves. One slave server is 300 seconds behind the master due to heavy SELECT statements.

If I run INSERT query (containing NOW()) on master at 10:00 AM, what time will be saved in the slave server which is 300 seconds behind? The query is

MySQL Code:

INSERT INTO users (username, password, signup_date_time) VALUES ('user1', 'pass1', NOW())

Can't Set-up Slave In Replication
I'm trying to set-up replication following a book and on-line guide. This
is over SSH with a tunnel (not sure if the tunnel's required).

The master appears to be set-up OK (easy enough).
The slave however isn't behaving.

I've got a my.cnf with the following:

[mysqld]
master-host=127.0.0.1
master-port=APORT
master-user=AUSER
master-password=APASSWORD
server-id=2

When I start the slave up and do show slave status - I get 0's and
blank entries back.

I've tried setting it up using:

CHANGE MASTER TO
MASTER_HOST='localhost',
MASTER_USER='AUSER',
MASTER_PORT=APORT,
MASTER_PASSWORD='APASSWORD',
MASTER_LOG_FILE='AFILE-bin.001',
MASTER_CONNECT_RETRY=10;

This sets up the slave bits and show slave status looks much better,
however,

SLAVE START;

returns...

The server is not configured as slave, fix in config file or with CHANGE
MASTER TO

I can only seem to find this message in pages that have a list of all Mysql
errors.

MySQL Slave
We are having problems where at least once a day our MySQL slave server gets about 1700 seconds behind the master.Any ideas what is causing this? I looked in .err logs and it says nothing.A simple stop/start brings it back to to 0.

Slave Servers
i have do replication with 1 master server to 3 slave servers.
And i want to grant the 3 slave servers only select option for all user;

Reconnect Slave
Is it possible to re-connect the slave db to a master after it has been out of sync for 2 days?I can't seem to figure it out and it is a pain to have to redump all the data and re-import all the data as I have over 20 different databases.

Master/Slave Restoration.
I have 2 servers (A and B) setup as Master and Slave respectively.
Upon A's failure, all client's request will be directed to B.

How can I set A to become master again after its been restored from
its failure? In chapter 4.10 of mysql docs, it mentioned (vaguely)
that A will become B's slave to sync all operations that had happened
after the failure. Finally, upon full sync switch A to become Master
again and B to slave.

How can I setup A to be a slave of B? The problem I faced is that I
can't find out what the bin log and position is from B since "show
master status" is always empty. I guess B still thinks its a slave.

Flushing Writes On Slave Db
i need to make a slave database "READ" only.ie, it must not not respond to data manipulation commands. i want only "select * from table_name" command to work on the tables in the replicated db on the slave. How must i go about it?

Replication - START SLAVE
When I try to start the slave for replication

I get a sytax error:

START SLAVE;

not much should be able to go wrong when you're typing in two words.

MySQL Master/Slave
In the case of 2 3.23.X series mysql databases in a master/slave
replication setup (myiasm tables), if a FLUSH TABLES WITH READ LOCK is
put on the slave, does the master effectively lock too because it is
waiting for the binlog update(s) to be confirmed from the slave, or
does the master merrily carry on not caring in the least that the
slave tables are locked?

Replication: 2 Masters And 1 Slave
I need to replicate 2 databases (each one resides in a different
server) to a single slave server. Reading the documentation I have
running the master/slave replication, but i need to replicate the
other database too, the problem is: I need replicate the other
database and that database exists in the other server, so how I
configure the other master server/datatabase in the slave?

Master/Slave Restoration.
I have 2 servers (A and B) setup as Master and Slave respectively.
Upon A's failure, all client's request will be directed to B.

How can I set A to become master again after its been restored from
its failure? In chapter 4.10 of mysql docs, it mentioned (vaguely)
that A will become B's slave to sync all operations that had happened
after the failure. Finally, upon full sync switch A to become Master
again and B to slave.

How can I setup A to be a slave of B? The problem I faced is that I
can't find out what the bin log and position is from B since "show
master status" is always empty. I guess B still thinks its a slave.

Ps -fax Show 1 Thread, Others Show 5
Where do I configure "spare servers"???

Ps -fax Show 1 Thread, Others Show 5
Where do I configure "spare servers"???

Show/not Show Option
I have a php page that displays pictures. The pictures comes from a mysql database. The way I am creating the recordset to dislpay is "Select * from tblehouse" . Now what I want to do is instead of selecting every picture from the database maybe create a new field that will take in the option of being checked or unchecked. Then have the query select only the "checked" to display. So my question to you guys is how would create a field that takes in a check box and what would be the sql statement to query just the checked records.

Getting Table Status
Is there a really fast way to see if a table is marked as crashed? It
seems check table and myisamchk are too slow large MyISAM tables (>
38GB) for such an operation.

Old E_Fail Status
I know I have seen this question hundreds of times but the circumstances and control of this error are within my reach.
I have a database which contains a decimal field.
This database is linked to a data aware component - a DB grid in Delphi. If the value in the field goes to two digits (>=10 that is) then the error occurs. I have tinkered with the width in the console but with no improvements. I have tried all setting on the grid to overcome this. I can use an SQL to retrieve data without a problem and it will happily show those values over 9.9999. But the visual component causes it to topple each time.

STATUS Table
I have a STATUS table consisting of a uid and description, that looks
like this:

1 Accept
2 Accept with corrections
3 Reject


I have a CHOICE table which referrs to the uid of the STATUS table, in
one of it's columns.Would it be better to just have these values appear in an enumerated
value in the CHOICE table, instead of referring to the STATUS table

Replication Database On Slave Is Not Updated
We are using mysql v4.0.24 on Linux machines.

I'm trying to set up replication with a master and only one slave
database.

The syncronization seems to work well, the relay file on slave is wrote
correctly (Read_Master_Log_Pos and Relay_Log_Pos are updated) but the
information on slave database is not updated.

Master and slave are sincronyzed as shown below but for some reason I
don't understand. I have to say thay sometimes the replication worked but sometimes
setting up a new slave or changing a slave to master it does not. Code:

Master/slave Setup To Do Replication
using mysql 4.1.7, have a master/slave setup to do replication.

Is there anyway to prevent the slavedb from accepting inserts other than the replication inserts?

If rows do get inserted directly into the slave, there is an error because the two databases no longer match. Is there anyway to recover from this?

Masters Replicating To A Single Slave
I have two big databases in two different servers, each database
it's different too and I need to replicate each one to a single
mysql slave server.

I need this:

MasterA ---> SlaveC <-- MasterB

So, I need dbA and dbB replicated on the slave server C.


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