Re: Where to ask a question about installation and configuration

2015-06-23 Thread Claudio Nanni
Hello Steve,


To what list should I post with a post-installation config and startup
 question?


This list, the MySQL General Mailing List, is the right place if the
question is about MySQL!

Cheers
-- 
Claudio


Post-installation config and startup questions

2015-06-23 Thread Steve Matzura
I'm building a mail system with Dovecot, Postfix and Mailman with
MySQL. I have the other three products installed but not yet
configured. I'll do that after I get MySQL running.

The documentation at
http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html
was instrumental in remedying some errors I made along the way by
following an installation procedure for Ubuntu instead of for Fedora.
The installation completed successfully.

The next step in the instructions I originally read said the next
thing to do was run mysql_install_db. It started out well:

Installing MySQL system tables...2015-06-23 11:54:50 0 [Warning]
TIMESTAMP with implicit DEFAULT value is deprecated. Please use
--explicit_defaults_for_timestamp server option (see documentation for
more details).
2015-06-23 11:54:50 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25) starting
as process 23737 ...
2015-06-23 11:54:50 23737 [Note] InnoDB: Using atomics to ref count
buffer pool pages
2015-06-23 11:54:50 23737 [Note] InnoDB: The InnoDB memory heap is
disabled
2015-06-23 11:54:50 23737 [Note] InnoDB: Mutexes and rw_locks use GCC
atomic builtins
2015-06-23 11:54:50 23737 [Note] InnoDB: Memory barrier is not used
2015-06-23 11:54:50 23737 [Note] InnoDB: Compressed tables use zlib
1.2.3
2015-06-23 11:54:50 23737 [Note] InnoDB: Using Linux native AIO
2015-06-23 11:54:50 23737 [Note] InnoDB: Using CPU crc32 instructions
2015-06-23 11:54:50 23737 [Note] InnoDB: Initializing buffer pool,
size = 128.0M
2015-06-23 11:54:50 23737 [Note] InnoDB: Completed initialization of
buffer pool
2015-06-23 11:54:50 23737 [Note] InnoDB: Highest supported file format
is Barracuda.
2015-06-23 11:54:50 23737 [Warning] InnoDB: Resizing redo log from
2*320 to 2*3072 pages, LSN=1597945
2015-06-23 11:54:50 23737 [Warning] InnoDB: Starting to delete and
rewrite log files.
2015-06-23 11:54:50 23737 [Note] InnoDB: Setting log file
./ib_logfile101 size to 48 MB
2015-06-23 11:54:51 23737 [Note] InnoDB: Setting log file
./ib_logfile1 size to 48 MB
2015-06-23 11:54:52 23737 [Note] InnoDB: Renaming log file
./ib_logfile101 to ./ib_logfile0
2015-06-23 11:54:52 23737 [Warning] InnoDB: New log files created,
LSN=1597945
2015-06-23 11:54:52 23737 [Note] InnoDB: 128 rollback segment(s) are
active.
2015-06-23 11:54:52 23737 [Note] InnoDB: Creating tablespace and
datafile system tables.
2015-06-23 11:54:52 23737 [Note] InnoDB: Tablespace and datafile
system tables created.
2015-06-23 11:54:52 23737 [Note] InnoDB: Waiting for purge to start
2015-06-23 11:54:52 23737 [Note] InnoDB: 5.6.25 started; log sequence
number 1597945

And then things fell apart.

2015-06-23 11:54:52 23737 [ERROR] Incorrect definition of table
mysql.proc: expected column 'sql_mode' at position 14 to have type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERRO
2015-06-23 11:54:52 23737 [ERROR] Incorrect definition of table
mysql.event: expected column 'sql_mode' at position 14 to have type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH'),
found type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_A
ERROR: 1136  Column count doesn't match value count at row 1
2015-06-23 11:54:53 23737 [ERROR] Aborting

2015-06-23 11:54:53 23737 [Note] Binlog end
2015-06-23 11:54:53 23737 [Note] InnoDB: FTS optimize thread exiting.
2015-06-23 11:54:53 23737 [Note] InnoDB: Starting shutdown...
2015-06-23 11:54:54 23737 [Note] InnoDB: Shutdown completed; log
sequence number 1627743
2015-06-23 11:54:54 23737 [Note] /usr/sbin/mysqld: Shutdown complete

OK

Filling help tables...2015-06-23 11:54:54 0 [Warning] TIMESTAMP with
implicit DEFAULT value is deprecated. Please use
--explicit_defaults_for_timestamp server option (see documentation for
more details).
2015-06-23 11:54:54 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25) starting
as process 23762 ...
2015-06-23 

Where to ask a question about installation and configuration

2015-06-23 Thread Steve Matzura
To what list should I post with a post-installation config and startup
question?

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



Re: server-side logging of query errors?

2015-06-23 Thread Singer Wang
You could log all queries using the audit plugin, 15% hit..

On Tue, Jun 23, 2015 at 4:54 AM, Johan De Meersman vegiv...@tuxera.be
wrote:

 - Original Message -
  From: Tomasz Chmielewski man...@wpkg.org

  It would be a mild security risk; a malicious
  (or just stupid, see Hanlon's razor) user could spam your server with
  malformed requests until the logging disk runs full, at which point
  the daemon would suspend operations until space is freed.
 
  I don't think it's a valid argument - the same is true right now for
  general query log. Any stupid/malicious user can produce loads of
  queries and fill the disk if one has general query log enabled.
 
  In short, anyone enabling any logging should consider what limitations
  it brings.

 Including quite a bit of overhead, which is why its use is discouraged in
 production :-)


 --
 Unhappiness is discouraged and will be corrected with kitten pictures.

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




Re: Post-installation config and startup questions

2015-06-23 Thread a . smith

Hi Steve,

  you haven't said what OS you are installing this on or how you have  
installed MySQL. Normally you would use a version avaialable in your  
OS distribution as this avoids any overly complicated installation and  
will manage security and bug patches for you MySQL binaries. Ie  
installation can usually be completed with one yum or apt-get command  
on Linux.


Looking at the point at which you find yourself now I suspect you have  
run mysqld_safe --defaults-file and that this has stopped or you  
have killed it. This should remain running in the background in order  
that MySQL will be up and available either by socket or TCP/IP. If in  
doubt please check what mysql processes are running via ps, if you  
don't have any MySQL processes running this will explain why you  
cannot connect to it (which the script you ran needs to do). You will  
be able to find more detailed information in the MySQL error log,


thanks, Andy.




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



Re: Post-installation config and startup questions

2015-06-23 Thread shawn l.green



On 6/23/2015 10:59 AM, Steve Matzura wrote:

I'm building a mail system with Dovecot, Postfix and Mailman with
MySQL. I have the other three products installed but not yet
configured. I'll do that after I get MySQL running.

The documentation at
http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html
was instrumental in remedying some errors I made along the way by
following an installation procedure for Ubuntu instead of for Fedora.
The installation completed successfully.



These should be the same instructions as we post here:
http://dev.mysql.com/doc/refman/5.6/en/linux-installation-yum-repo.html

But perhaps you needed to follow these instead?
http://dev.mysql.com/doc/refman/5.6/en/replace-third-party-yum.html



The next step in the instructions I originally read said the next
thing to do was run mysql_install_db. It started out well:
... snip ...

And then things fell apart.

2015-06-23 11:54:52 23737 [ERROR] Incorrect definition of table
mysql.proc: expected column 'sql_mode' at position 14 to have type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERRO
2015-06-23 11:54:52 23737 [ERROR] Incorrect definition of table
mysql.event: expected column 'sql_mode' at position 14 to have type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH'),
found type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_A
ERROR: 1136  Column count doesn't match value count at row 1
2015-06-23 11:54:53 23737 [ERROR] Aborting
... snip ...

Since this is a new installation, I decided to take the advice of the
automated instructions:

# mysqld_safe --defaults-file
150623 11:58:52 mysqld_safe Logging to '/var/log/mysqld.log'.
150623 11:58:52 mysqld_safe Starting mysqld daemon with databases from
/var/lib/mysql
150623 11:58:53 mysqld_safe mysqld from pid file
/var/run/mysqld/mysqld.pid ended

Unless I'm an absolute dolt, this looked successful. Since this was my
first time running MySQL, I tried the next step as if it were a new
install, which it's supposed to be:

# /usr/bin/mysql_secure_installation



Unless you can tail the end of the MySQL error log and see that it is 
ready for connections, then you may not have started MySQL and you 
would not be ready for mysql_secure_installation.






NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
   SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none): ^C
Aborting!

Cleaning up...
Cleaning up...
Warning: Could not unlink .my.cnf.24101: No such file or directory
Warning: Could not unlink .mysql.24101: No such file or directory

And that's where things are.

Any help greatly appreciated.



@Andy - a.sm...@ukgrid.net -

you haven't said what OS you are installing this on or how you have installed 
MySQL.


Yes, he did but not directly and not completely. He is installing on 
some version of Fedora using a YUM repository.



@Steve

You might need to revert the situation to the state it was in just 
before you run mysql_install_db then try again.  That situation would be

* The binaries are installed
* The --datadir location (which defaults to /var/lib/mysql/data on most 
Linux flavors) is empty.


But, before you attempt to return to that state:
1) Is your mysqld running?  If so, what errors were recorded to the log 
in your last startup (not messages, errors).


2) Is the running MySQL the package you were trying to install? Give us 
the 

Re: Post-installation config and startup questions

2015-06-23 Thread Steve Matzura
On Tue, 23 Jun 2015 14:51:48 -0400, you wrote:



On 6/23/2015 10:59 AM, Steve Matzura wrote:
 I'm building a mail system with Dovecot, Postfix and Mailman with
 MySQL. I have the other three products installed but not yet
 configured. I'll do that after I get MySQL running.

 The documentation at
 http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html
 was instrumental in remedying some errors I made along the way by
 following an installation procedure for Ubuntu instead of for Fedora.
 The installation completed successfully.


These should be the same instructions as we post here:
http://dev.mysql.com/doc/refman/5.6/en/linux-installation-yum-repo.html

But perhaps you needed to follow these instead?
http://dev.mysql.com/doc/refman/5.6/en/replace-third-party-yum.html

Yes, I did exactly both those things. I added the yum repository
first, then did the second one which disabled and removed the old
versions and installed the new.

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



server-side logging of query errors?

2015-06-23 Thread Tomasz Chmielewski

Suppose I run a query which has a syntax error:

mysql blah;
ERROR 1064 (42000): You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right 
syntax to use near 'blah' at line 1



How can I get mysql server to log this error?


According to the documentation:

http://dev.mysql.com/doc/refman/5.5/en/server-logs.html

- Error log - will only log mysqld errors - so, it won't log syntax 
errors in the query
- General query log - it will log all queries, but without indicating 
if it was an error or not



Is there a way to log query syntax errors on the server? Please assume 
that connection and the query can be coming from PHP, perl etc. code, so 
any /usr/bin/mysql stderr output redirecting is not helping here.



--
Tomasz Chmielewski
http://wpkg.org


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



Re: server-side logging of query errors?

2015-06-23 Thread Johan De Meersman

None that I'm aware of. It would be a mild security risk; a malicious (or just 
stupid, see Hanlon's razor) user could spam your server with malformed requests 
until the logging disk runs full, at which point the daemon would suspend 
operations until space is freed.

Maybe one of the proxies out there has support for such logging, I'm not really 
familiar with any of them.


- Original Message -
 From: Tomasz Chmielewski man...@wpkg.org
 To: MySql mysql@lists.mysql.com
 Sent: Tuesday, 23 June, 2015 09:35:46
 Subject: server-side logging of query errors?

 Suppose I run a query which has a syntax error:
 
 mysql blah;
 ERROR 1064 (42000): You have an error in your SQL syntax; check the
 manual that corresponds to your MySQL server version for the right
 syntax to use near 'blah' at line 1
 
 
 How can I get mysql server to log this error?
 
 
 According to the documentation:
 
 http://dev.mysql.com/doc/refman/5.5/en/server-logs.html
 
 - Error log - will only log mysqld errors - so, it won't log syntax
 errors in the query
 - General query log - it will log all queries, but without indicating
 if it was an error or not
 
 
 Is there a way to log query syntax errors on the server? Please assume
 that connection and the query can be coming from PHP, perl etc. code, so
 any /usr/bin/mysql stderr output redirecting is not helping here.
 
 
 --
 Tomasz Chmielewski
 http://wpkg.org
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql

-- 
Unhappiness is discouraged and will be corrected with kitten pictures.

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



Re: server-side logging of query errors?

2015-06-23 Thread Tomasz Chmielewski

On 2015-06-23 17:29, Johan De Meersman wrote:

None that I'm aware of.


It's a pity!
This could ease debugging in many cases, without the need to change the 
client (i.e. PHP/Perl/Python code which sends the queries, and we 
suspect that some of them are bogus).




It would be a mild security risk; a malicious
(or just stupid, see Hanlon's razor) user could spam your server with
malformed requests until the logging disk runs full, at which point
the daemon would suspend operations until space is freed.


I don't think it's a valid argument - the same is true right now for 
general query log. Any stupid/malicious user can produce loads of 
queries and fill the disk if one has general query log enabled.


In short, anyone enabling any logging should consider what limitations 
it brings.




Maybe one of the proxies out there has support for such logging, I'm
not really familiar with any of them.




--
Tomasz Chmielewski
http://wpkg.org


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



Re: server-side logging of query errors?

2015-06-23 Thread Johan De Meersman
- Original Message -
 From: Tomasz Chmielewski man...@wpkg.org

 It would be a mild security risk; a malicious
 (or just stupid, see Hanlon's razor) user could spam your server with
 malformed requests until the logging disk runs full, at which point
 the daemon would suspend operations until space is freed.
 
 I don't think it's a valid argument - the same is true right now for
 general query log. Any stupid/malicious user can produce loads of
 queries and fill the disk if one has general query log enabled.
 
 In short, anyone enabling any logging should consider what limitations
 it brings.

Including quite a bit of overhead, which is why its use is discouraged in 
production :-)


-- 
Unhappiness is discouraged and will be corrected with kitten pictures.

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