mysqladmin segfaults on Solaris 8

2002-06-13 Thread Markus Lervik


Hello list!

While monkeying around with my testserver I noticedm
that giving goofy parameters to mysqladmin causes it
to segfault and dump core :

(haven't got mail configured on the server, so I
just snatched the info I thought was of importance)

bash-2.03# uname -a
SunOS simon 5.8 Generic_108529-11 i86pc i386 i86pc

bash-2.03# uptime
 12:57pm  up 119 day(s), 20 min(s),  2 users,  load average: 0.02, 0.03,
0.02

bash-2.03# perl -v
This is perl, version 5.005_03 built for i86pc-solaris

bash-2.03# mysqladmin -V
mysqladmin  Ver 8.23 Distrib 4.0.1-alpha, for pc-solaris2.8 on i386

bbash-2.03# mysqladmin version 
mysqladmin  Ver 8.23 Distrib 4.0.1-alpha, for pc-solaris2.8 on i386
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  4.0.1-alpha-log
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 3 min 11 sec

Threads: 1  Questions: 140  Slow queries: 0  Opens: 42  Flush tables: 1 
Open tables: 36  Queries per second avg: 0.733

bash-2.03# mysqladmin -E -i 2 extended-status
Segmentation Fault (core dumped)


MySQL was compiled from source and has been working flawlessly for the
past 118 days.

I realize that -E and extended-status is kind of... well, goofy, but it
illustrates my point.


Cheers,
Markus

-- 
Markus Lervik
Linux-administrator
Vaasa City Library - Regional Library
+358-6-325 3589 / +358-40-832 6709


-
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




Re: GRANTs and %

2002-06-11 Thread Markus Lervik

On Tuesday 11 Jun 2002 11:04 am, Kaan Oglakci wrote:
 Thanks Dan And Okan for replying to my email but I have tried what you have
 said but I still get the same problem.

 GRANT ALL ON newstesting.* 'clients'@'%' IDENTIFIED BY '123';
 ERROR 1064: You have an error in your SQL syntax near ''clients'@'%'
 IDENTIFIED
 BY '123'' at line 1

GRANT ALL PRIVILEGES ON newstesting.* TO 'clients'@'%' IDENTIFIED BY '123';

You're missing the 'TO'.

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator
Vaasa City Library - Regional Library, Finland
[EMAIL PROTECTED]
+358-6-325 3589/+358-40-832 6709

-
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




InnoDB foreign key constraints

2002-06-10 Thread Markus Lervik


Hello list!

I'm having a bit of trouble getting foreign key constraints to work.
I'm running MySQL 2.23.50-Max.

Here's what I got:

mysql SHOW CREATE TABLE conn\G
*** 1. row ***
   Table: conn
Create Table: CREATE TABLE `conn` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `wall_nr` int(10) unsigned NOT NULL default '0',
  `hub_switch` varchar(20) NOT NULL default '',
  `comp_name` varchar(80) NOT NULL default '',
  `name_id` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name_id` (`name_id`),
  UNIQUE KEY `comp_name` (`comp_name`),
  KEY `conn_idx` (`name_id`)
) TYPE=InnoDB
1 row in set (0.00 sec)

mysql SHOW CREATE TABLE ip_name_tbl\G
*** 1. row ***
   Table: ip_name_tbl
Create Table: CREATE TABLE `ip_name_tbl` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `comp_loc` smallint(5) unsigned NOT NULL default '0',
  `comp_sub_loc` smallint(5) unsigned NOT NULL default '0',
  `ip_stat_dyn` enum('DHCP','STATIC') NOT NULL default 'DHCP',
  `IP` varchar(15) default NULL,
  `MAC` varchar(17) NOT NULL default '',
  `network` enum('Hallinto','Asiakas') NOT NULL default 'Hallinto',
  `name_id` int(11) NOT NULL default '0',
  `comments` text,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name_id` (`name_id`),
  KEY `ip_idx` (`name_id`)
) TYPE=InnoDB
1 row in set (0.00 sec)

Here's what I get:

mysql ALTER TABLE ip_name_tbl
- ADD CONSTRAINT FOREIGN KEY (name_id)
- REFERENCES conn(name_id)
- ON DELETE CASCADE;
ERROR 1005: Can't create table './koneet/#sql-355_4.frm' (errno: 150)

I know error 1005 with an errno 150 means the foreign key would be incorrectly
formed, but I can't just figure out what's wrong. 
I've been reading TFM, and the sentence there must be an index where the 
foreign key and the referenced key are listed as the first columns seems to 
have something to do with my problem, I just find the above a bit... well... 
cryptic. If anyone could lend me a hand, I'd be more than happy.

Thank's in advance!

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator
Vaasa City Library - Regional Library, Finland
[EMAIL PROTECTED]
+358-6-325 3589/+358-40-832 6709

-
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




Re: InnoDB foreign key constraints

2002-06-10 Thread Markus Lervik

On Monday 10 Jun 2002 11:17 am, you wrote:
 First of all the referenced key must be on PRIMARY KEY.

...which means my 'id' -field can't be a primary key, right?

 But I've seen in your table definition a quite strange thing. You have a
 UNIQUE and an ORDINARY key definition on the same field.
 Here:

UNIQUE KEY `name_id` (`name_id`), - THIS IS THE FIRST DEFINITION
UNIQUE KEY `comp_name` (`comp_name`),
KEY `conn_idx` (`name_id`) - AND THIS IS THE SECOND ONE

I've probably messed something up while fooling around with indexes and trying 
to get it to work. Now, I took the advices I got, but I still can't get it to 
work. I altered the table to make the 'id' -field an ordinary index, and 
changed the name_id -field to a primary key, without luck. So now my
SHOW CREATE TABLE gives:

mysql show create table ip_name_tbl\G
*** 1. row ***
   Table: ip_name_tbl
Create Table: CREATE TABLE `ip_name_tbl` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `comp_loc` smallint(5) unsigned NOT NULL default '0',
  `comp_sub_loc` smallint(5) unsigned NOT NULL default '0',
  `ip_stat_dyn` enum('DHCP','STATIC') NOT NULL default 'DHCP',
  `IP` varchar(15) default NULL,
  `MAC` varchar(17) NOT NULL default '',
  `network` enum('Hallinto','Asiakas') NOT NULL default 'Hallinto',
  `name_id` int(11) NOT NULL default '0',
  `comments` text,
  PRIMARY KEY  (`name_id`),
  KEY `id` (`id`)
) TYPE=InnoDB

...and

mysql show create table conn\G
*** 1. row ***
   Table: conn
Create Table: CREATE TABLE `conn` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `wall_nr` int(6) unsigned NOT NULL default '0',
  `hub_switch` varchar(20) NOT NULL default '',
  `comp_name` varchar(50) NOT NULL default '',
  `name_id` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`name_id`),
  KEY `id` (`id`)
) TYPE=InnoDB


and, again:

mysql ALTER TABLE ip_name_tbl
- ADD CONSTRAINT FOREIGN KEY (name_id)
- REFERENCES conn (name_id)
- ON DELETE CASCADE;
ERROR 1005: Can't create table './koneet/#sql-355_4.frm' (errno: 150)

*sigh*

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator
Vaasa City Library - Regional Library, Finland
[EMAIL PROTECTED]
+358-6-325 3589/+358-40-832 6709

-
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




Re: InnoDB foreign key constraints

2002-06-10 Thread Markus Lervik

On Monday 10 Jun 2002 11:44 am, Markus Lervik wrote:

 mysql show create table ip_name_tbl\G
 *** 1. row ***
Table: ip_name_tbl
 Create Table: CREATE TABLE `ip_name_tbl` (
[snip]
   `name_id` int(11) NOT NULL default '0',
[snip]

 mysql show create table conn\G
 *** 1. row ***
Table: conn
 Create Table: CREATE TABLE `conn` (
[snip]
   `name_id` int(10) unsigned NOT NULL default '0',
[snip]

Ok, thank's to Jocelyn the problem is solved and can be seen above.
Kinda makes sence that both fields should be the same. : )
Slipped my attention ; )


Cheers,
Markus

-- 
Markus Lervik
Linux-administrator
Vaasa City Library - Regional Library, Finland
[EMAIL PROTECTED]
+358-6-325 3589/+358-40-832 6709

-
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




Re: mysql not supporting php.

2002-06-03 Thread Markus Lervik

On Monday 03 Jun 2002 9:50 am, David Grant wrote:
 mysql support is not available to php on this server

 This is the error I receive. MySQL is working fine, but I need to know
 how get php working with sql.

PHP isn't compiled with MySQL support. Recompile php and add
--with-mysql to the configure script.

 Also, does anyone know the command to list all the db's? thanks.

SHOW DATABASES;

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator
Vaasa City Library - Regional Library, Finland
[EMAIL PROTECTED]
+358-6-325 3589/+358-40-832 6709

-
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




Re: INSERT IF NOT EXISTS?

2002-05-28 Thread Markus Lervik

(feed the hungry filters: sql, query)

On Monday 27 May 2002 2:14 pm, Victoria Reznichenko wrote:

 ML Is there a simple way to do something like INSERT IF NOT EXISTS,
 ML other than first doing a SELECT and checking if it returns any rows?
 ML If not, that would be pretty high up on my whish-list : )

 You can use IGNORE keyword in INSERT statement, but it's not quite the
 same as INSERT IF NOT EXIST. If you specify IGNORE, any rows that
 duplicate an existing PRIMARY or UNIQUE key in the table
 will be ignored in INSERT:

Yes, I was aware of the INSERT IGNORE statement, but I've only got one
primary/unique key, which happens to be the id.

Perhaps I should elaborate further.

I've got three tables; ip_name_tbl, loc_tbl and conn_tbl.

ip_name_tbl has got fields id, comp_loc, ip_stat_dyn, ip,
mac, network, name and comments.

loc_tbl has got fileds id, comp_loc and loc_name and

conn has got fileds id, wall_nr, hub_switch_nr, comp_id.

ip_name_tbl.comp_loc points to loc_tbl.comp_loc=20
conn.comp_id points to ip_name_tbl.id.

I want to be sure that while inserting values, say
NULL (since id is AUTO_INCREMENT), 1 and Administration, 
administration isn't already in the table.
Rob's idea is of course a solution, but that sort of brings me back to
my original question : is there a -SIMPLE- way? ; )
INSERT IGNORE wouldn't, if I understood the manual correctly,
help me here, since the other rows in the table aren't UNIQUE, no?

Cheers,
Markus
-- 
Markus Lervik
Linux-administrator
Vaasa City Library - Regional Library, Finland
[EMAIL PROTECTED]
+358-6-325 3589/+358-40-832 6709

-
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




INSERT IF NOT EXISTS?

2002-05-27 Thread Markus Lervik


(filter fodder: sql, query)

Hello group!


Quick question:

Is there a simple way to do something like INSERT IF NOT EXISTS,
other than first doing a SELECT and checking if it returns any rows?
If not, that would be pretty high up on my whish-list : )


Cheers,
Markus

-- 
Markus Lervik
Linux-administrator
Vaasa City Library - Regional Library, Finland
[EMAIL PROTECTED]
+358-6-325 3589/+358-40-832 6709

-
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




mysqladmin hanging on Solaris 8/Intel

2002-05-21 Thread markus lervik


Hello!

I have a strange problem with mysqladmin on Solaris 8.

I can't seem to shut down the server via mysqladmin -uroot -p shutdown. It
just... well... sits there. Hitting ctrl-c gives 

bash-2.03$ mysqladmin shutdown
^CWarning;  Aborted waiting on pid file: '/opt/db/simon.pid' after 121 seconds
bash-2.03$

The Pidfile says 7962. ps -ef says mysqld is running with PID 7962.

Connecting to the mysql server after running mysqladmin and terminating it 
works, but the uptime has been reset.

I really wouldn't want to get rough with it, so how do I take it down 
gracefully with minimum danger of losing data?


Cheers, 
Markus

-- 
Markus Lervik
Linux-administrator
Vaasa City Library - Regional Library
+358-6-325 3589 / +358-40-832 6709

-
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




SELECT/JOIN problems

2002-04-29 Thread Markus Lervik

Hello, list!

(filter-fodder: sql,query)


I've got a problem that's been bothering me for quite some time:

If I've got two tables, where I list people who's paid their
membership fee, year, etc., and another table with the names

tbl_membernames : name_id, firstname, lastname
tbl_paid: name_id, year

how do I get the members who hasn't paid a particular years
fee?

So I'd somehow need to do something like

SELECT m.firstname,m.lastname
FROM tbl_membernames AS m, tbl_paid AS p
WHERE (m.name_id=p.name_id AND m.name_id isn't in tbl_paid when
tbp_paid.year=2000)

I've tried just about anything I can think about, but nada.
I'd assume that if it's at all possible it'd be some join-trickery,
but I just can't figure it out.

(yes, I know it'd be easier db-wise to have a 'paid ENUM(y,n)'
-field, but this is just a curiosity. I want to know. ;)


Cheers,
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709


-
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




A bit OT: ColdFusion can't connect to MySQL via ODBC (newbie)

2002-03-13 Thread Markus Lervik

Hello, list!


I'm not quite sure that this is the right place to ask, but
I'm having problems getting MySQL and ColdFusion Server 5 to
work together.

I have a ColdFusion server that connects to MySQL via ODBC.
I've configured the Merant MySQL ODBC driver via the ColdFusion 
administrator, and it is able to connect to my MySQL database
(at least it claims that the connection was successful when
clicking verify in the CF admin). The datasource name is hpTest.

However, trying to connect to the database in an CFM doesn't
seem to work at all. My error message is 

ODBC Error Code = 08003 (Connection not open)

[MERANT][ODBC lib] Connection not open

The error occurred while processing an element with a general
identifier of (CFQUERY), occupying document position (2:1) to (2:114).

and the code goes like this:

cfquery
name=Test
dbtype=ODBC
dbname=hpTest
datasource=hpTest
SELECT * FROM hpTest
/cfquery

cfoutput query=hpTest#FieldName1#, #FieldName2#br/cfoutput

I've been reading TFM, browsing TFW, reading TFML and I've even been
to (*ghasp*) Microsofts ODBC-pages looking for an answer (and you know
it's -bad- when that happens!g).
Reading the manual I got the impression that coldfusion would open the
connection when using a cfquery-tag.


Any help is greatly appreciated.


Cheers,
Markus, tearing big lumps of hair out.

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709


-
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




Re: mysqld cannot find host.frm even though it is in data/mysql

2002-03-04 Thread Markus Lervik

On Sun, 2002-03-03 at 08:39, root wrote:
 Description:
   Down loaded bin/mysqld  Ver 3.23.49-max for pc-linux-gnu on i686 from U of 
Wisc 
 site gunzipped and untarred in /usr/local ran mysql_install_db then ran 
./bin/safe_mysqld  
 from install directory kept coming up with error 020303  5:20:41  
 /usr/local/mysql/bin/mysqld: Can't find file: './mysql/host.frm
 ' (errno: 13). 

Did you read the README file?

[mle@hal9000 rip]$ perror 13
Error code  13:  Permission denied

chown -R mysql.mysql mysql/ ought to sort it out.


-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709


-
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




Re: mysql error

2002-02-22 Thread Markus Lervik

On Sat, 2002-02-23 at 01:52, theOtherOne wrote:
 Hi,
 
 I've got this problem when i try to connect to a mysql server with a PHP
 code
 
 Warning: MySQL Connection Failed: Can't connect to local MySQL server
 through socket '/tmp/mysql.sock' (111)

[mle@hal9000 data]$ perror 111
Error code 111:  Connection refused

That would indicate that you haven't got a mysql-server running.
If it is running, check that /tmp/ actually is where the socket-file
is, and check your my.cnf-file in case the [mysqld] section contains
skip-networking. If it does, remove it (naturally).

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709


-
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




Re: for You

2002-01-30 Thread Markus Lervik

On Wednesday 30 January 2002 13:02, Marjolein Katsma wrote:
 At 01:13 2002-01-30, Engr Duke Paul [EMAIL PROTECTED] wrote:
 NIGERIAN NATIONAL PETROLEUM CORPORATION
 (DEPARTMENT OF PETROLEUM RESOURCES)

 And he subscribed to this list, right?
 Grrr: database,sql,query,table

Stop griping. I'm annoyed about it too, but every mail complaining
about spam becomes quite quickly spam itself.

You've got three options as I see it  (and this goes for all of you 
anti-spam-spammers, too):

a) Ignore the spam. It's about two-three mails per day. It's not that big a deal.
Just hit the delete-button, and it's been taken care of.

b) Set up mail-filtering. A filter that directs mails containing NIGERIAN PETROLEUM 
CORPORATION
straight to the waste bin. A few days, a few spam-mails and you'll have a working
anti-spam-filter right at home. (See? If you'd have that, you wouldn't even get this 
mail.)

c) Unsubscribe from the list if it bothers you that much. We've (unfortunately) seen 
at least one 
individual unsubscribing, not too long ago, because of the spam.


Cheers,
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709

-
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




Re: Porting from MS SQL to MySQL

2002-01-22 Thread Markus Lervik

On Monday 21 January 2002 17:13, you wrote:

 I have to agree with the below.  Clearly they want to get you into mssql
 and keep you there.  There's really no point in switching databases, so
 (I know, this is too neutral) if you like these guys for some reason
 (good haircuts or whatnot), then go with mssql.  If you can find people
 with good haircuts who will do it for mysql, all the better (and
 sometimes even cheaper).  Regardless, don't migrate to a different
 database unless there's some huge reason to do so.

Particulary as I want to get rid of our only Windows 2000 server : )
As I stated before, in our request for offers on the database (whatever
the correct term might be), we specifically said that we wanted MySQL
or PostgreSQL, which makes even more stupid to offer us MS SQL,
because they (ought to) know that we won't take them in that case.

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709

-
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




MySQL server not listening on port?

2002-01-22 Thread Markus Lervik


Hi!

For some strange reason MySQL doesn't listen for incoming
connections on port 3306. I have four servers, two of which are
4.0.1 and two are 3.23.47. I can connect between three of them freely,
but one, shodan (yes. *g*) doesn't allow it.  localhost logins are 
apparently ok, but not from another machine.

[mle@hal9000 mle]$ mysql -uroot -p -hshodan
Enter password:
ERROR 2003: Can't connect to MySQL server on 'shodan' (111)

perror says the following : Error code 111:  Connection refused.

Checking netstat on shodan gives the following :

mle@shodan:/$ sudo netstat --ip -p -a
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State 
  PID/Program name
tcp0  0 localhost:ldap  localhost:1081  
ESTABLISHED 649/stunnel

[snip away truckloads of stunnels and other stuff]

I just can't figure out why mysql doesn't show up.  Here's
the netstat --ip -a output on hal9000 :

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address   Foreign Address State
tcp0  0 *:mysql *:* LISTEN
tcp0  0 *:ssh   *:* LISTEN
[snip]

and if I throw in a -p, too, we clearly see that MySQL is listening. 

tcp0  0 *:mysql *:* LISTEN
  3079/mysqld-max

Summa summarum : For one reason or the other, the MySQL server on shodan
doesn't accept incoming connections. hal9000 accepts them, xerxes accepts them
and skynet accepts them, but not shodan. Shodan and skynet are identical
machines, with debian 2.2 apt-get dist-upgraded once and I just plainly
apt-got (*g*) mysql from a mirror. The configurationfiles are just about
identical on the two machines.

Ideas?

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709

-
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




Re: MySQL server not listening on port?

2002-01-22 Thread Markus Lervik

On Tuesday 22 January 2002 14:32, Markus Lervik wrote:
 Hi!

 For some strange reason MySQL doesn't listen for incoming
 connections on port 3306. I have four servers, two of which are
 4.0.1 and two are 3.23.47. I can connect between three of them freely,
 but one, shodan (yes. *g*) doesn't allow it.  localhost logins are
 apparently ok, but not from another machine.

 mle@shodan:/$ sudo netstat --ip -p -a
 Active Internet connections (w/o servers)

Sorry, that's actually supposed to be

mle@shodan:~$ sudo netstat --ip -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address   Foreign Address State
tcp0  0 *:ldap  *:* LISTEN
[snip again, no mysql nor port 3306 anywhere to be seen]

I might add that everything else works fine, ssh, ldap, nfs, you name it, and
shodan is on the same physical network as the rest of the computers, so 
there's no firewall between them, nor do I have iptables/ipchains enabled on 
the machine.

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709

-
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




Re: Porting from MS SQL to MySQL

2002-01-20 Thread Markus Lervik

On Friday 18 January 2002 17:30, you wrote:

  We've requested a database from different companies, and specifically
  said we wanted MySQL or PostgreSQL because of the open source angle
  and we're a library.
  One company offered MS SQL as the platform and said that they can later
  on port it to MySQL. For this they wanted 18 000 euro. Now, what I want
  to know is, how easy is it to port a (fairly complicated) database from
  MS SQL to MySQL? It can't be work worth 18 000 euro, now can it?

 2) If you want MySQL or PostgreSQL, why exactly would you want to install
 MSSQL, and then upgrade later? Both PostgreSQL and MySQL will run on
 Windows (although again, I'm not sure why you would want to do that if you
 have a choice).

That's the point. I have no idea whatsoever as to why this company wants
to FIRST do the database on MS SQL and THEN port it to MySQL. Unless they've
got an ready made database that they think will fit our needs and then after
a while port that to MySQL. But concidering the number of planning and
workhours they put in to the offer, it really can't be true, because other
companies had the same amount (or less) work hours for making it directly
MySQL.

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709

-
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




Re: Porting from MS SQL to MySQL

2002-01-20 Thread Markus Lervik


(food for ill-working-anti-spam-filters : database,sql,query,table)

Just wanted to thank everyone who got involved in this
(at times rather heated) discussion. You've given me
quite a few pointers to think about and stuff to concider
and take up with our project manager.

Cheers mates!
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709

-
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




Fwd: Re: compiling and/or running 64-bit MySQL on Solaris 8/sparc?

2002-01-18 Thread Markus Lervik


Forgot to CC to the list. Here it goes, in case anyone else has these
problems:

--  Forwarded Message  --

Subject: Re: compiling and/or running 64-bit MySQL on Solaris 8/sparc?
Date: Fri, 18 Jan 2002 15:06:57 +0200
From: Markus Lervik [EMAIL PROTECTED]
To: Hatton Steven [EMAIL PROTECTED]

On Friday 18 January 2002 13:57, you wrote:

[BIG snip]

 checking return type of sprintf... configure: error: can not run test
 program while cross compiling
 bash-2.03#

[/snip]

Try adding export LDFLAGS='-R/usr/local/lib' or
export LDFLAGS='-R/opt/sfw/lib' before ./configure.


Cheers,
Markus

--
Markus Lervik
UNIX-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709



-
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




Porting from MS SQL to MySQL

2002-01-18 Thread Markus Lervik


Hello all!

We've requested a database from different companies, and specifically
said we wanted MySQL or PostgreSQL because of the open source angle
and we're a library. 
One company offered MS SQL as the platform and said that they can later on 
port it to MySQL. For this they wanted 18 000 euro. Now, what I want to know 
is, how easy is it to port a (fairly complicated) database from MS SQL to 
MySQL? It can't be work worth 18 000 euro, now can it? 

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709

-
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




Re: Porting from MS SQL to MySQL

2002-01-18 Thread Markus Lervik

On Friday 18 January 2002 15:58, you wrote:

 On Fri, Jan 18, 2002 at 03:16:15PM +0200, Markus Lervik wrote:

  We've requested a database from different companies, and
  specifically said we wanted MySQL or PostgreSQL because of the open
  source angle and we're a library.
 
  One company offered MS SQL as the platform and said that they can
  later on port it to MySQL. For this they wanted 18 000 euro. Now,
  what I want to know is, how easy is it to port a (fairly
  complicated) database from MS SQL to MySQL? It can't be work worth
  18 000 euro, now can it?

 That's a bit strange.

 If the app is built with MySQL in mind, porting it should be very,
 very easy.  But if they're going to build the app with MySQL in mind
 anyway, it doesn't make much sense to do so on a platform other than
 MySQL, does it?

One wouldn't think it does. It raises a few questions. Mainly one of trying 
to rip us off. 
The main reason we want the database on MySQL or PostgreSQL (apart from 
the speed issue) is that our Win2K server is going to be buried and
a nice, shiney Linux-server is taking it's place next to the one we already
got.

Being involved in this project, one becomes amazed with the amout of
eye-pissing companies really can get away with. And respected companies 
too. (I won't mention any names, I don't want any lawsuits : ) For instance,
one offered to come and sit down and discuss our needs with us (they
calculated that it'd take about 40h for us to repeat what we've already said) 
and wanted 28 000 euro for it.


Cheers, 
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709

-
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




SELECT ... INTO

2001-12-17 Thread markus|lervik

I have been assigned the fun little job of porting a (very badly
designed) database from Access97 to MySQL so that we'd finally get
rid of that pesky Win2000-server.

The database contains a list of magazines currently in our basement
waiting for someone to borrow them. There are, at the moment, just
over 4500 records in the database, but when someone starts inserting
magazines, it'll be a tad over 100 000 records. Now, the problem is 
that I'd somehow like to get all the magazine names into another table,
and references to that table in the first table without having to
change all the records by hand.

I have gotten the names of the magazines into a table with an 
auto_incremented primary id field, but how could I get all the
same names away from both tables and only leave unique names?


-- 

Markus Lervik
Linux administrator with a kungfoo grip
Vasa City Library - Regional Library


-
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




Re: quote marks

2001-12-15 Thread markus|lervik

On Fri, 2001-12-14 at 04:14, Peter Lovatt wrote:
 Hi
 
 I am retrieving data from a mysql table and displaying the contents in a
 text box for editing.
 
 Some of the data contains double quotes eg '15 screen'. Using php4 the data
 is backslashed and stores without any problem, but when it is displayed in
 the text box it stops at the , because that closes the value area of the
 input, and then when it is reinserted after updating it gets truncated at
 the .
 
 Is there a way round this?

You'd have to quote the backslash too. I had the same problem with
the CONCAT_WS function, and it turned out to be an escaping inferno.
Store the 15 screen using '15\\\ screen' in PHP, and it should work. 
 
Cheers,
Markus

-- 

Markus Lervik
Linux administrator with a kungfoo grip
Vasa City Library - Regional Library


-
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




Re: [PHP] Performance

2001-12-13 Thread markus|lervik

On Thu, 2001-12-13 at 19:18, Prottoss wrote:

 Actually unless this has been changed, when your php script terminates php 
 automatically closes any mysql connections opened with mysql_connect(). 

I've noticed that, and up 'till now I haven't had a clue as to where
the problem was. Thanks for that bit of information, but it raises
another question, at least for me, namely:

How would one go about doing, for instance,
FORM ACTION=?php echo $PHP_SELF? METHOD=POST-tags in that case?
Using echo bypasses the PHP-preprocessor and just simply prints out 
the FORM tag. I really wouldn't want to use FORM ACTION=blah.php,
as I have this FORM tag in a nifty function that is called from a bunch
of scripts.


Cheers,
Markus

--
Markus Lervik
Linux administrator with a kungfoo grip
Vasa City Library - Public Library



-
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




RE: [PHP] Performance

2001-12-13 Thread markus|lervik

On Thu, 2001-12-13 at 22:16, Ron Jamison wrote:
 I'm fairly sure there's no difference in performance when using PHP
tags
 mixed with HTML blocks as you are doing.
 
 Think of it as PHP knowing that it should send everything not in ? ?
tags
 directly to the browser.  Like an echo or a print, but without needing
to
 specify calls to those functions.
 
 HTML
 ? echo $PHP_SELF ?
 /HTML
 
 HTML
 ?=$PHP_SELF?
 /HTML

I'm not -that- worried about performance loss for switching between,
php and html, what annoys me (and would probably slow down performance
quite a bit), is that every time I have to do a database query, I have
to use mysql_connect again, because as Prottoss pointed out, PHP drops
the connection every time a PHP-block ends.

Not that it is that a big issue for my particular application, but
knowing a workaround to this problem would be quite useful in the 
future.


 
Cheers,
Markus

--
Markus Lervik
Linux administrator with a kungfoo grip
Vasa City Library - Public Library



-
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




Duplicate messages and quoting

2001-12-13 Thread markus|lervik

database,sql,query and table. there. now we ought to have gotten
by the spam-filter.


Hello all,

What's wrong with the list? Am I the only one getting lots and lots
of dupes? And no, I don't mean messages sent to me and CCd to the list
;) A bit annoying getting 100+ messages/day where perhaps 10-15 are
dupes.

And another thing : would people be so nice as to cutting off a bit
of the quoted messages? I'm particulary refering to the lines added
by the list managing program. I've seen messages with five
before posting, please... -lines. That's close to 50 lines extra text.


-Markus

--
Markus Lervik
Linux administrator with a kungfoo grip
Vasa City Library - Regional Library




-
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




Re: [PHP] Performance

2001-12-13 Thread markus|lervik

On Thu, 2001-12-13 at 23:56, Fournier Jocelyn [Presence-PC] wrote:
 Hi,
 
 You absolutely don't have to reconnect to the database each time a PHP-block
 ends ! (it would be completely awfull !!).
 Don't you forget to specify the mysql link in you 'mysql_query' ??
 
Nope, I always specify the mysql link in my queries. But the problem
remains. As I'm at home for the moment, I can't try out all the 
suggestions, but I have tried the p_connect, and it most certanly didn't
work. I'll have to try to pinpoint the problem more closely tomorrow at
work.

It just might be (came to think of it now), that php closes the
connection every time I use a submit-button and it reloads the page.
Technically speaking, that would be ending a script, right?

-Markus

--
Markus Lervik
Linux administrator with a kungfoo grip
Vasa City Library - Public Library



-
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




Re: [PHP] Performance

2001-12-13 Thread markus|lervik

On Fri, 2001-12-14 at 00:29, Fournier Jocelyn [Presence-PC] wrote:
 Yes, If you have a submit button or if you reload the page, the link is
 closed, excepted if you are using mysql_pconnect. (be aware of the timeout
 with mysql_pconnect - wait_timeout parameter in the my.cnf file - )
 
 Jocelyn

I'll have to check the timeout parameter.

Thanks a million to everyone who replied, but me thinks it's time
for me to move this discussion to the php-db mailing list, as it is
becoming grossly off-topic.

-Markus

--
Markus Lervik
Linux administrator with a kungfoo grip
Vasa City Library - Public Library



-
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