dbTalk Databases Forums  

strange files in data directory

comp.databases.mysql comp.databases.mysql


Discuss strange files in data directory in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
css-discuss.org
 
Posts: n/a

Default strange files in data directory - 10-04-2011 , 12:52 PM






I tried to log in to MySQL admin at the command line and got this
error:

/usr/local/mysql/bin/mysqladmin: Error starting slave: The server is
not configured as slave; fix in config file or with CHANGE MASTER TO

This is my.cnf
[mysqld]
user= root
pid-file = /var/run/mysqld.pid
port = 3306
#bind-address=
tmpdir = /tmp
basedir=/usr/local/mysql
datadir=/usr/local/mysql-5.0.77-osx10.4-powerpc/data
sort_buffer_size=2M
default-storage-engine=myisam


[client]
socket=/tmp/mysql.sock

Does it think replication is turned ? How can I fix it so I can start
mysqladmin. This was my command to start mysqladmin:

/usr/local/mysql/bin/mysqladmin --user=root -p start

In my data directory there are some strange files:

master.info
mysql
mysqld-relay-bin.000001
mysqld-relay-bin.index
pharm_cart_order
relay-log.info
test
world

I looked in the master.info and the relay-log.info and it looked like
garbage. Could it be a hacker?

Reply With Quote
  #2  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: strange files in data directory - 10-04-2011 , 03:43 PM






"css-discuss.org" <janis.rough (AT) gmail (DOT) com> wrote:

Quote:
I tried to log in to MySQL admin at the command line and got this
error:

/usr/local/mysql/bin/mysqladmin: Error starting slave: The server is
not configured as slave; fix in config file or with CHANGE MASTER TO

This was my command to start mysqladmin:

/usr/local/mysql/bin/mysqladmin --user=root -p start
Why do you think mysqladmin could be "started" or used to "login"
to MySQL? mysqladmin is an administrative tool to manage the MySQL
server. It knows several commands (which can be abbreviated):

$mysqladmin --help
....
Administration program for the mysqld daemon.
Usage: mysqladmin [OPTIONS] command command....
....
Where command is a one or more of: (Commands may be shortened)
create databasename Create a new database
debug Instruct server to write debug information to log
....
status Gives a short status message from the server
start-slave Start slave
start-slave Start slave stop-slave Stop slave
variables Prints variables available
version Get version info from server

So indeed you asked the MySQL server to start a replication slave.
This failed because you never configured it for that.

Quote:
In my data directory there are some strange files:

master.info
mysqld-relay-bin.000001
mysqld-relay-bin.index
relay-log.info
Those files are related to replication and if you had configured it,
then there would be usable information in there. RTFM for details.
You can safely delete those if you don't intend to make this MySQL
instance a replication slave.

Quote:
mysql
pharm_cart_order
test
world
Those are directories and correspond to databases.

Quote:
Could it be a hacker?
Nope.

What did you try to achive by running mysqladmin? If you expected a
point-and-click adventure^W management tool, then I must disappoint
you. Check out http://www.mysql.com/downloads/workbench/


XL

Reply With Quote
  #3  
Old   
css-discuss.org
 
Posts: n/a

Default Re: strange files in data directory - 10-04-2011 , 03:46 PM



On Oct 4, 10:52*am, "css-discuss.org" <janis.ro... (AT) gmail (DOT) com> wrote:
Quote:
I tried to log in to MySQL admin at the command line and got this
error:

/usr/local/mysql/bin/mysqladmin: Error starting slave: The server is
not configured as slave; fix in config file or with CHANGE MASTER TO

This is my.cnf
[mysqld]
user= root
pid-file = /var/run/mysqld.pid
port = 3306
#bind-address=
tmpdir = /tmp
basedir=/usr/local/mysql
datadir=/usr/local/mysql-5.0.77-osx10.4-powerpc/data
sort_buffer_size=2M
default-storage-engine=myisam

[client]
socket=/tmp/mysql.sock

Does it think replication is turned ? *How can I fix it so I can start
mysqladmin. *This was my command to start mysqladmin:

/usr/local/mysql/bin/mysqladmin --user=root -p start

In my data directory there are some strange files:

master.info
mysql
mysqld-relay-bin.000001
mysqld-relay-bin.index
pharm_cart_order
relay-log.info
test
world

I looked in the master.info and the relay-log.info and it looked like
garbage. * Could it be a hacker?
I think the problem might be I am running two MySQL servers. One on
my laptop another on a desktop computer. One is Zend the other is a
test server. I will try to use the command
CHANGE MASTER TO MASTER_HOST = "XX.XXX.XX.XX' I am not using
replication so do I make the MASTER_HOST the one with my gateway IP
address? I have the gateway IP address as an outside IP for testing.
Thanks, The laptop computer with Zend on it can be localhost. I
would like to be able to use mysqladmin client on the laptop to
connect with the desktop computer via the command line. Thanks,

Reply With Quote
  #4  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: strange files in data directory - 10-05-2011 , 01:39 AM



"css-discuss.org" <janis.rough (AT) gmail (DOT) com> wrote:

Quote:
I think the problem might be I am running two MySQL servers. One on
my laptop another on a desktop computer. One is Zend the other is a
test server. I will try to use the command
CHANGE MASTER TO MASTER_HOST = "XX.XXX.XX.XX' I am not using
replication so do I make the MASTER_HOST the one with my gateway IP
address?
No. This completely makes no sense. Have you read my answer to
your first post?

Quote:
I would like to be able to use mysqladmin client on the laptop to
connect with the desktop computer via the command line.
Almost all MySQL client tools know a -h (or --host) command line
option to specify which server they should connect. The default
host is localhost, but you can either give this option on the
command line or put it in .my.cnf

Still I don't see the point to run "mysqladmin start" and I think
there is a misunderstanding on your side. So what are you trying
to do?


XL

Reply With Quote
  #5  
Old   
css-discuss.org
 
Posts: n/a

Default Re: strange files in data directory - 10-06-2011 , 11:07 AM



On Oct 4, 1:43*pm, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote:
Quote:
"css-discuss.org" <janis.ro... (AT) gmail (DOT) com> wrote:
I tried to log in to MySQL admin at the command line and got this
error:

/usr/local/mysql/bin/mysqladmin: Error starting slave: The server is
not configured as slave; fix in config file or with CHANGE MASTER TO

This was my command to start mysqladmin:

/usr/local/mysql/bin/mysqladmin --user=root -p start

Why do you think mysqladmin could be "started" or used to "login"
to MySQL? mysqladmin is an administrative tool to manage the MySQL
server. It knows several commands (which can be abbreviated):

$mysqladmin --help
...
Administration program for the mysqld daemon.
Usage: mysqladmin [OPTIONS] command command....
...
Where command is a one or more of: (Commands may be shortened)
* create databasename * Create a new database
* debug * * * * * * * * Instruct server to write debug information to log
...
* status * * * * * * * *Gives a short status message from the server
* start-slave * * * * * Start slave
* start-slave * * * * * Start slave *stop-slave * * ** * *Stop slave
* variables * * * * * * Prints variables available
* version * * * * * * * Get version info from server

So indeed you asked the MySQL server to start a replication slave.
This failed because you never configured it for that.

In my data directory there are some strange files:

master.info
mysqld-relay-bin.000001
mysqld-relay-bin.index
relay-log.info

Those files are related to replication and if you had configured it,
then there would be usable information in there. RTFM for details.
You can safely delete those if you don't intend to make this MySQL
instance a replication slave.

mysql
pharm_cart_order
test
world

Those are directories and correspond to databases.

Could it be a hacker?

Nope.

What did you try to achive by running mysqladmin? If you expected a
point-and-click adventure^W management tool, then I must disappoint
you. Check outhttp://www.mysql.com/downloads/workbench/

XL
thanks, it is useful to know how to check the status at the command
line. I have used workbench. What I was trying to do was get the
MySQL prompt at the command line and was mistaking it for the
mysqladmin commands. I wanted the > shell to mysql.

Reply With Quote
  #6  
Old   
css-discuss.org
 
Posts: n/a

Default Re: strange files in data directory - 10-06-2011 , 12:23 PM



On Oct 4, 4:02*pm, gordonb.ir... (AT) burditt (DOT) org (Gordon Burditt) wrote:
Quote:
I think the problem might be I am running two MySQL servers. *One on
my laptop another on a desktop computer. *One is Zend the other is a

Zend is not a database. *It can act as a database client. *Do you
perhaps mean you are running two *WEB* servers? *Or two *PHP*
servers? *Or one *WEB/PHP* server and one *MySQL* server?

I have Zend Framework and Server installed on localhost on laptop. I
am only learning Zend MVC so I have that on the laptop for when I have
some need for a framework otherwise I use the MySQL server on the
remote desktop. The web server is on the desktop. The router is
attached to the desktop. It has Apache/MySQL/and PHP running. The
laptop has the Zend framework with Apache/MySQL/and PHP running on
localhost. The desktop is running on my dyndns loopback fake IP
address. I like to be able to access it from anywhere.

Quote:
test server. *I will try to use the command
CHANGE MASTER TO MASTER_HOST = "XX.XXX.XX.XX' * I am not using

If you are not using replication there is absolutely no reason to
use "CHANGE MASTER TO ..." or "mysqladmin start-slave" or "mysqladmin
start" (which means the same as "mysqladmin start-slave".

replication so do I make the MASTER_HOST the one with my gateway IP

If you are not using replication there is no reason to have a
MASTER_HOST. *If you are not using replication and it's got the
word "master" in it, look at a different section of the documentation
for what you're trying to do.

address? *I have the gateway IP address as an outside IP for testing.
Thanks, *The laptop computer with Zend on it can be localhost. *I
would like to be able to use mysqladmin client on the laptop to
connect with the desktop computer via the command line. *Thanks,

If you want to use a remote MySQL server as the default server for
the 'mysql' command-line client (and related things like mysqladmin)
clients, create a $HOME/.my.cnf file (owned by the user using it,
read/write for the owner only) on the system you are using it *FROM*
(e.g. the laptop) for the user involved containing:

[client]
host=ip.or.host.name.of.mysql.server.porn

[mysql]
prompt="\u@\h/\d> "
I am now trying this configuration using my dydns loopback hostname.
I don't know if it will work without a static IP but I entered my
hostname. What I was doing before was just SSH to the remote Server
and accessing it separately like that, running the commands from the
shell with the SSH connection. I am sure this is more secure.


Quote:
The part with the prompt is optional but it shows you what MySQL
server you are connected to if you use the "mysql" command-line
utility.

You use the (external) IP address of the MySQL server, not the IP
address of the gateway (which is likely that of a router) unless
they happen to be the same.
I didn't mean the gateway IP sorry, I meant the world facing desktop
computer.
Quote:
If you want to use a remote MySQL as the default server
for *PHP*, those settings go in php.ini (which on my system is
in /usr/local/etc), with such values as:

mysql.default_host = ip.or.host.name.of.mysql.server.org
mysql.default_user = default_mysql_user_name
I don't quite understand this but PHP on my laptop goes with Zend
Framework so I think I don't for now but it might be useful someday.


Quote:
and if you change php.ini, you probably need to restart the web
server.

Note that the server you want to be accessed remotely needs to be
set up for it. *In particular, do not set bind-address to 127.0.0.1
(on the server), which some default setups put in the server my.cnf
file. *You probably want it not set to anything if you are allowing
external access. *Also, do not use --skip-networking.
Thanks for your input, I looked in the my.cnf on the desktop
computer. It doesn't have any binding to a IP just sets the tmp
directory, the port, data directory and socket.

Reply With Quote
  #7  
Old   
Álvaro G. Vicario
 
Posts: n/a

Default Re: strange files in data directory - 10-07-2011 , 02:44 AM



El 06/10/2011 18:07, css-discuss.org escribió/wrote:
Quote:
What did you try to achive by running mysqladmin? If you expected a
point-and-click adventure^W management tool, then I must disappoint
you. Check outhttp://www.mysql.com/downloads/workbench/

XL
thanks, it is useful to know how to check the status at the command
line. I have used workbench. What I was trying to do was get the
MySQL prompt at the command line and was mistaking it for the
mysqladmin commands. I wanted the> shell to mysql.
The different tools are explained here:

http://dev.mysql.com/doc/refman/5.5/...ms-client.html


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.