Binary size problem

2004-03-22 Thread Admin-Stress
I compiles a C application which uses mysql library on two RedHat 9.0 machines.

Both machines are using the same GCC and the same MySQL 4.0.16 :

MySQL-client-4.0.16-0
MySQL-server-4.0.16-0
MySQL-devel-4.0.16-0
MySQL-shared-compat-4.0.16-0
gcc-3.2.2-5
gcc-c++-3.2.2-5
libgcc-3.2.2-5

In the MACHINE_1, the resulting binary size is about 20 KB, and in the MACHINE_2, the 
resulting
binary is about 180 KB. 

Anyone can explain why in the MACHINE_2, the binary size is very big ?

Here is my compile script :

#!/bin/sh
echo building $1
gcc -o $1 $1.c -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient -lz

If I do strings to the binary from MACHINE_2 (180 KB), I saw (see below, not all).
Is it possible that all the mysql libraries are statically linked ?

Please help me,

Thanks.

/lib/ld-linux.so.2
libz.so.1
uncompress
_DYNAMIC
_init
_fini
_GLOBAL_OFFSET_TABLE_
_Jv_RegisterClasses
__gmon_start__
libc.so.6
strcpy
bcmp
stdout
vsprintf
getlogin
connect
readdir64
fdopen
geteuid
memmove
getenv
__strtol_internal
qsort
fgets
memcpy
readlink
malloc
endpwent
socket
select
fflush
bzero
strrchr
write
fprintf
strcat
inet_addr
__stpcpy
chdir
setsockopt
memchr
strstr
signal
read
getrusage
realloc
strtok
sscanf
__xstat64
symlink
localtime
inet_ntoa
opendir
poll
strcmp
shutdown
getpwuid
getcwd
gethostbyname
getpwnam
getservbyname
__mempcpy
fclose
getpeername
gethostbyname_r
stderr
error
__lxstat64
fputc
strftime
htons
__errno_location
exit
atoi
fileno
_IO_stdin_used
__libc_start_main
strlen
strchr
fputs
realpath
closedir
fcntl
__fxstat64
strpbrk
free
fopen64
_edata
__bss_start
_end
GLIBC_2.3
GLIBC_2.1.2
GLIBC_2.1
GLIBC_2.2
GLIBC_2.0
PTRh0w
8t+B8tB8t!B
8t+B8tB8t!B
RSWV
root
 lik
,WVS
j0j0
F [^_
j0h
PjnSW
[EMAIL PROTECTED](@80t#@
@@+E @
[EMAIL PROTECTED](@80t#@
@@+E
[EMAIL PROTECTED](@80t#@
[EMAIL PROTECTED](@80t#@
8([EMAIL PROTECTED](t(@8(t#@
PRQSV
A@;As
j0jP
z'tF
tP
n\t*
'tL




USER
LOGNAME
LOGIN
UNKNOWN_USER
 like '
max-allowed-packet
ssl-cipher
repl-parse-query
enable-reads-from-master
replication-probe
disable-local-infile
local-infile
connect-timeout
interactive-timeout
default-character-set
character-sets-dir
ssl-capath
ssl-ca
ssl-cert
ssl-key
return-found-rows
debug
database
host
init-command
user
timeout
pipe
password
compress
socket
port
options
client
d:t:o,/tmp/client.trace
SHOW SLAVE HOSTS
SHOW SLAVE STATUS
mysql
MYSQL_TCP_PORT
/var/lib/mysql/mysql.sock
MYSQL_UNIX_PORT
MYSQL_PWD
localhost
unknown
show databases
show tables
4.0.16
%08lx%08lx
[EMAIL PROTECTED] packet
SSL connection error
Error connecting to master:
Error connecting to slave:
Error on SHOW SLAVE HOSTS:
Error on SHOW SLAVE STATUS:
Embedded server
Got packet bigger than 'max_allowed_packet'
Can't initialize character set %-.32s (path: %-.100s)
Can't set state of named pipe to host: %-.64s  pipe: %-.32s (%lu)
Can't open named pipe to host: %-.64s  pipe: %-.32s (%lu)
Can't wait for named pipe to host: %-.64s  pipe: %-.32s (%lu)
.
..

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL log files

2003-11-28 Thread Admin-Stress
Hello,

How can I enable MySQL 4.0.16 log ? 

I just compiled and installed it in my RedHat 9.0 system, but I cant see any log 
files. I use
default /etc/my.cnf from my-large.cnf.

Sorry, if this question is too newbie, but I cant understand clearly reading MySQL 
manual.

Thanks for helping me :)



__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



After installing MySQL 4.0.16 (rpm), it did not create /etc/my.cnf ?

2003-11-11 Thread Admin-Stress
Hi,

My server is using RedHat 9.0.

I just CHANGED the mysql from 3.23.58 (rpm) to 4.0.16 (rpm).

What I did :

  # rpm -e all mysql 3.23.58 rpm
  # rm -rf /var/lib/mysql
  
  then install the 4.0.16 (rpm)

  # rpm -i MySQL-server  MySQL-client ... MySQL-devel ... MySQL-shared-compat

After this,

I can start the server.
I can change the root password using mysqladmin.
I can create database.

But I cant find /etc/my.cnf

is this normal ?

I verified by issuing: rpm -ql MySQL-server ...
But again, I did not see /etc/my.cnf

Anyone know what is the 'standard' my.cnf for MySQL 4.0.16 ?

Thanks,

__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: After installing MySQL 4.0.16 (rpm), it did not create /etc/my.cnf ?

2003-11-11 Thread Admin-Stress
After I copied /usr/share/mysql/my-large.cnf it to /etc/my.cnf

Then I restart mysql, and executed ps -ax 

I got this :

32175 pts/3S  0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql
--pid-file=/var/lib/mysql/myserver.pid
32200 pts/3S  0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql 
--user=mysql
--pid-file=/var/lib/mysql/myserver.pid --skip-locking --port=3306

Why there is no reference to /etc/my.cnf there ?

Because if I see in other 3.23.58 (rpm), it's like this :

 2653 ?S  0:00 /bin/sh /usr/bin/safe_mysqld --defaults-file=/etc/my.cnf
 2678 ?S  0:02 /usr/libexec/mysqld --defaults-file=/etc/my.cnf 
--basedir=/usr
--datadir=/var/lib/mysql --user=mysql --pid-file=/var/run

Something wrong with my 4.0.16 (rpm) installation ?

Or should I edit something in the /etc/my.cnf ? it just straight copy from
/usr/share/mysql/my-large.cnf

Please help,

Thanks

--- Dathan Vance Pattishall [EMAIL PROTECTED] wrote:
 Create one.
 
 Look in your base directory under support-files
 Look for my-small.cnf
 
 
 - Dathan Vance Pattishall
   - Sr. Programmer and mySQL DBA for FriendFinder Inc.
   - http://friendfinder.com/go/p40688
 
 
 ---Original Message-
 --From: Admin-Stress [mailto:[EMAIL PROTECTED]
 --Sent: Tuesday, November 11, 2003 11:44 AM
 --To: [EMAIL PROTECTED]
 --Subject: After installing MySQL 4.0.16 (rpm), it did not create
 --/etc/my.cnf ?
 --
 --Hi,
 --
 --My server is using RedHat 9.0.
 --
 --I just CHANGED the mysql from 3.23.58 (rpm) to 4.0.16 (rpm).
 --
 --What I did :
 --
 --  # rpm -e all mysql 3.23.58 rpm
 --  # rm -rf /var/lib/mysql
 --
 --  then install the 4.0.16 (rpm)
 --
 --  # rpm -i MySQL-server  MySQL-client ... MySQL-devel ... MySQL-
 --shared-compat
 --
 --After this,
 --
 --I can start the server.
 --I can change the root password using mysqladmin.
 --I can create database.
 --
 --But I cant find /etc/my.cnf
 --
 --is this normal ?
 --
 --I verified by issuing: rpm -ql MySQL-server ...
 --But again, I did not see /etc/my.cnf
 --
 --Anyone know what is the 'standard' my.cnf for MySQL 4.0.16 ?
 --
 --Thanks,
 --
 --__
 --Do you Yahoo!?
 --Protect your identity with Yahoo! Mail AddressGuard
 --http://antispam.yahoo.com/whatsnewfree
 --
 
 --MySQL General Mailing List
 --For list archives: http://lists.mysql.com/mysql
 --To unsubscribe:
 --http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 


__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



help on my query statement

2003-11-09 Thread Admin-Stress
I have a table called TRANSACTION, it has some fields :

REGDATE - date of the transaction
WHAT - a string (NOT UNIQUE)
CUSTOMER - customer code

I want to query all WHAT that the date of the transaction was 15 days before.

So, my sql query is :

SELECT WHAT FROM TRANSACTION WHERE REGDATE  Now() -INTERVAL 15 DAY

But, because of WHAT is not unique, then I could receive some duplicates (customer can 
send some
WHAT in the same REGDATE).

How can I query only the unique WHAT ? I need to list all WHAT (uniquely) that the date
transaction was 15 days before.

Please help,

Thanks



__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Simple question about updating a table field

2003-11-06 Thread Admin-Stress
I have a numeric table field, named CREDIT.
How can I add a number (+50) to that field for all the table record ?

is this correct?

   UPDATE ThisTable SET CREDIT=CREDIT+50

Please help,

Thanks

__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



help with sql query : DATETIME function

2003-02-26 Thread Admin-Stress
I have a table with this structure :

  username VARCHAR(32)
  address  VARCHAR(128)
  datereg  DATETIME  // date of registration
  classINT

How is the sql query for username who are their datereg was 30 days ago and class = 1? 

thanks

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



updating some records in a table

2003-01-15 Thread Admin-Stress
Hi,

I am new to mySQL, so I need some help. 
I have a table, which has record structure like this:

- customer
- name
- register_date
- expired

Every day, I add some records, new customers. The field 'expired' is just a flag, 
either '1' or
'0'. 
If register_date is 3 months ago then expired = 1.

The format of register_date is unixtime, or Epoch. 

How can I update the entire database, for setting the expired field ? 

  now = current_unixtime();
  threemonths = 3 * 30 * 24 * 60 * 60;

  select * from table_name where register_date + threemonths  now

How to construct the proper select statement ? I use VARCHAR for register_date.

  select 
  for i = 0 to number_of_rows do
  update table_name set expired = 1;

I just could not think how to implement this. 

I need some example code how to update some records in table like in my situation. 

I use C ... or Perl 

Thanks. 

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




closing database (mysql C API)

2002-12-07 Thread Admin-Stress
Hi,

I wrote an application using mysql C API.

If I exit my application without closing database, will it be closed automatically?

void error(int code) {
  printf(error: %d\n, code);
  exit(0);
}

int main() {
 ...
 error(-255);
 ...
}

How to pass the mysql database connector to a function? is this correct? :

void error(int code, MYSQL db) {
  mysql_close(db);
  printf(error: %d\n, code);
  exit(0);
}

Because I am not sure this will be correct ... should not it using pointer? 

Thanks.


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




updating a field more than once

2002-12-05 Thread Admin-Stress
Hi,

I wrote a simple CGI application using mysql. What it does is really simple :

   connect to mysql database
   ... do something ...
   update a field
   ... do something again ...
   close mysql

The update is like TOTAL = TOTAL + AMOUNT.

If let say, 1000 users accessing my CGI in the same time, will it be OK ? will the 
update process
be corrupted? should I implement LOCKING?

I am new to mysql.

Thanks,
kapot

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




restricting mysql

2002-11-15 Thread Admin-Stress
Hi,

After I installed mysql, I noticed there is an open port now, port 3306.
Can I restrict this so only from localhost can connect? I meant to close port 3306.
But without using firewall :( I dont have knowledge about this.

If there is no way to do this without firewall, then I will learn it.

I tried --skip-networking, but then mysqld could not be started. I got this from 
google.com. Is it
the correct way?

Thanks.
kapot

__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




newbie: SQL question

2002-11-04 Thread Admin-Stress
Hi,

I am just a starter. Anyone can suggest me good web resources for learning SQL command 
that I can
use (compatible) with mySQL ?

I read from www.mysql.com documentation, but it's not complete ...

Well, if you have collection for beginner, please :)

Thanks,

kapot

__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




newbie: creating database error

2002-11-04 Thread Admin-Stress
After playing around with 'test' database, then I would like to create my own database.

I logged in into mysql using root account and created a database.

But, when I logged in using regular user, I got his error :

ERROR 1044: Access denied for user: '@localhost' to database 'card'

What necessary to do to create database?

I tried to create a database using regular user, still got same error.

I did change create_priv='Y' in user table from mysql database for this regular user.

Anyone know how the basic steps to create database? or any documentation/website 
resource would be
appreciated.

Thanks.

kapot

__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php