MySQL Router 8.0.16 for MySQL Server 8.0 and 5.7 has been released

2019-04-25 Thread Bjorn Munch
Dear MySQL users,

MySQL Router 8.0.16 is a new release for MySQL Router 8.0 series.

MySQL Router 8.0 is highly recommended for use with MySQL Server 8.0 and 5.7.
Please upgrade to MySQL Router 8.0.16.

The MySQL Router is a new building block for high availability solutions
based on MySQL InnoDB clusters.

By taking advantage of the new Group Replication technology, and
combined with the MySQL Shell, InnoDB clusters provide an integrated
solution for high availability and scalability for InnoDB based MySQL
databases, that does not require advanced MySQL expertise.

The deployment of applications with high availability requirements is
greatly simplified by MySQL Router. MySQL client connections are
transparently routed to online members of a InnoDB cluster, with MySQL
server outages and cluster reconfigurations being automatically handled
by the Router.

To download MySQL Router 8.0.16, see the "Generally Available (GA)
Releases" tab at http://dev.mysql.com/downloads/router. Package
binaries are available for several platforms and also as a source code
download.

Documentation for MySQL Router can be found at
http://dev.mysql.com/doc/mysql-router/en/

Enjoy!

Changes in MySQL Router 8.0.16 (2019-04-25, General Availability)

 * Functionality Added or Changed

 * Bugs Fixed

Functionality Added or Changed


 * Before, bootstrapping would generate Read-Write (PRIMARY)
   and Read-Only (SECONDARY) configuration routing sections
   for multi-master mode, but only Read-Write sections for
   single-master mode. Now, both Read-Write and Read-Only
   sections are always generated.

 * Bootstrapping now sets new routing_strategy values in the
   generated configuration file. Read-Write (PRIMARY)
   sections set routing_strategy to first-available; and
   Read-Only (SECONDARY) sections set it to
   round-robin-with-fallback. Previously, they were both set
   to round-robin.
   The default behavior (for example, if routing_strategy is
   not defined in mysqlrouter.conf) did not change and is
   still round-robin.

 * Added ability to integrate external log-rotation
   applications by reopening the file-based logfile on
   SIGHUP. On Linux, this allows integrating the system-wide
   logrotate utility.

 * On Windows, added the ability to report events to the
   Windows Application Events log.

 * Added a new sinks configuration file option to define one
   or more logger sinks. For example, all level=debug
   messages can be sent to a file while only level=error are
   sent to an eventlog.
   The supported sinks are: consolelog, filelog, eventlog on
   Windows, and syslog on Unix-based systems.

 * An HTTP interface was added based on libevent's HTTP
   library. It's configured using a new [http_server]
   configuration section that contains the following
   options:

  + port: The TCP port listening for HTTP requests; it
defaults to 8011.

  + bind_address: IPv4 address bound to the port; it
defaults to 0.0.0.0.

  + static_folder: Base directory for static file
requests; it's empty by default. An empty value
means no static files are served.

  + require_realm: Name of the [http_auth_realm]
instance.

  + ssl: The value 1 enables SSL, and 0 disables it. TLS
clients supporting TLSv1.2 or later are required.

  + ssl_cert: File name of the certificate and its chain
certifications in PEM format; required if ssl=1.

  + ssl_key: File name of the key in PEM format;
required if ssl=1.

  + ssl_cipher: The cipher-spec (see openssl's 'ciphers'
list). Defaults to a comma-separated list of all
approved ciphers. Unknown ciphers are silently
ignored. Fails if list of ciphers is empty and
ssl=1.

  + ssl_dh_param: Read the DH parameter from this file
in PEM format. Uses the dh-param from RFC 5114 by
default if ssl=1.

 * A mysqlrouter_passwd tool was added to manage password's
   for the HTTP server component.
   Two new HTTP configuration sections were added;
   [http_auth_backend] and [http_auth_realm]. Both are
   optional, and multiple definitions are allowed. There
   options are:
   [http_auth_backend]

  + backend: Name of the backend implementation; it
defaults to file.

  + filename: Name of the backend storage file, relative
to the data_folder directory.
   [http_auth_realm]

  + backend: Name of the [http_auth_backend] section.

  + method: The HTTP authentication method; defaults to
basic.

  + require: Requires that the user validates with the
authentication backend; defaults to valid-user,
which enables 

MySQL Router 8.0.15 for MySQL Server 8.0 and 5.7 has been released

2019-02-01 Thread Bjorn Munch
Dear MySQL users,

MySQL Router 8.0.15 is a new release for MySQL Router 8.0 series.

MySQL Router 8.0 is highly recommended for use with MySQL Server 8.0 and 5.7.
Please upgrade to MySQL Router 8.0.15.

The MySQL Router is a new building block for high availability solutions
based on MySQL InnoDB clusters.

By taking advantage of the new Group Replication technology, and
combined with the MySQL Shell, InnoDB clusters provide an integrated
solution for high availability and scalability for InnoDB based MySQL
databases, that does not require advanced MySQL expertise.

The deployment of applications with high availability requirements is
greatly simplified by MySQL Router. MySQL client connections are
transparently routed to online members of a InnoDB cluster, with MySQL
server outages and cluster reconfigurations being automatically handled
by the Router.

To download MySQL Router 8.0.15, see the "Generally Available (GA)
Releases" tab at http://dev.mysql.com/downloads/router. Package
binaries are available for several platforms and also as a source code
download.

Documentation for MySQL Router can be found at
http://dev.mysql.com/doc/mysql-router/en/

Enjoy!

-
Changes in MySQL Router 8.0.15 (2019-02-01)

   This release contains no functional changes and is published
   to align version number with the MySQL Server 8.0.15 release.

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



MySQL Shell 8.0.15 for MySQL Server 8.0 and 5.7 has been released

2019-02-01 Thread Balasubramanian Kandasamy


Dear MySQL users,

MySQL Shell 8.0.15 is a maintenance release of MySQL Shell 8.0 Series
(a component of the MySQL Server). The MySQL Shell is provided under
Oracle's dual-license.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0
and 5.7. Please upgrade to MySQL Shell 8.0.15.

MySQL Shell is an interactive JavaScript, Python and SQL console
interface, supporting development and administration for the MySQL
Server. It provides APIs implemented in JavaScript and Python that
enable you to work with MySQL InnoDB cluster and use MySQL as a
document store.

The AdminAPI enables you to work with MySQL InnoDB cluster, providing
an integrated solution for high availability and scalability using
InnoDB based MySQL databases, without requiring advanced MySQL
expertise. For more information about how to configure and work with
MySQL InnoDB cluster see

https://dev.mysql.com/doc/refman/en/mysql-innodb-cluster-userguide.html

The X DevAPI enables you to create "schema-less" JSON document
collections and perform Create, Update, Read, Delete (CRUD) operations
on those collections from your favorite scripting language.
For more information about how to use MySQL Shell and the MySQL Document
Store support see

  https://dev.mysql.com/doc/refman/en/document-store.html

For more information about the X DevAPI see

  https://dev.mysql.com/doc/x-devapi-userguide/en/

If you want to write applications that use the the CRUD based X DevAPI
you can also use the latest MySQL Connectors for your language of
choice. For more information about Connectors see

  https://dev.mysql.com/doc/index-connectors.html.

For more information on the APIs provided with MySQL Shell
see

  https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/

and

  https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/

Using MySQL Shell's SQL mode you can communicate with servers using the
legacy MySQL protocol. Additionally, MySQL Shell provides partial
compatibility with the mysql client by supporting many of the same
command line options.

For full documentation on MySQL Server, MySQL Shell and related topics,
see

  https://dev.mysql.com/doc/mysql-shell/8.0/en/

For more information about how to download MySQL Shell 8.0.15, see
the "Generally Available (GA) Releases" tab at

  http://dev.mysql.com/downloads/shell/

We welcome and appreciate your feedback and bug reports, see

  http://bugs.mysql.com/

Enjoy and thanks for the support!

Changes in MySQL Shell 8.0.15 (2019-02-01)

   This release contains no functional changes and is published
   to align version number with the MySQL Server 8.0.15 release.


On Behalf of Oracle/MySQL Release Engineering Team,
Balasubramanian Kandasamy



MySQL Shell 8.0.14 for MySQL Server 8.0 and 5.7 has been released

2019-01-21 Thread Kent Boortz


Dear MySQL users,

MySQL Shell 8.0.14 is a maintenance release of MySQL Shell 8.0 Series
(a component of the MySQL Server). The MySQL Shell is provided under
Oracle's dual-license.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0
and 5.7. Please upgrade to MySQL Shell 8.0.14.

MySQL Shell is an interactive JavaScript, Python and SQL console
interface, supporting development and administration for the MySQL
Server. It provides APIs implemented in JavaScript and Python that
enable you to work with MySQL InnoDB cluster and use MySQL as a
document store.

The AdminAPI enables you to work with MySQL InnoDB cluster, providing
an integrated solution for high availability and scalability using
InnoDB based MySQL databases, without requiring advanced MySQL
expertise. For more information about how to configure and work with
MySQL InnoDB cluster see

  https://dev.mysql.com/doc/refman/en/mysql-innodb-cluster-userguide.html

The X DevAPI enables you to create "schema-less" JSON document
collections and perform Create, Update, Read, Delete (CRUD) operations
on those collections from your favorite scripting language.
For more information about how to use MySQL Shell and the MySQL Document
Store support see

  https://dev.mysql.com/doc/refman/en/document-store.html

For more information about the X DevAPI see

  https://dev.mysql.com/doc/x-devapi-userguide/en/

If you want to write applications that use the the CRUD based X DevAPI
you can also use the latest MySQL Connectors for your language of
choice. For more information about Connectors see

  https://dev.mysql.com/doc/index-connectors.html.

For more information on the APIs provided with MySQL Shell
see

  https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/

and

  https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/

Using MySQL Shell's SQL mode you can communicate with servers using the
legacy MySQL protocol. Additionally, MySQL Shell provides partial
compatibility with the mysql client by supporting many of the same
command line options.

For full documentation on MySQL Server, MySQL Shell and related topics,
see

  https://dev.mysql.com/doc/mysql-shell/8.0/en/

For more information about how to download MySQL Shell 8.0.14, see
the "Generally Available (GA) Releases" tab at

  http://dev.mysql.com/downloads/shell/

We welcome and appreciate your feedback and bug reports, see

  http://bugs.mysql.com/

Enjoy and thanks for the support!

==

Changes in MySQL Shell 8.0.14 (2019-01-21)

 * Functionality Added or Changed

 * Bugs Fixed

Functionality Added or Changed

 * When started from the command line, MySQL Shell prints
   information about the product, information about the
   session (such as the default schema and connection ID),
   warning messages, and any errors that are returned during
   startup and connection. You can now suppress printing of
   information that you do not need by using the
   --quiet-start[=1|2] mysqlsh command-line option. With a
   value of 1 (the default when the option is specified),
   information about the MySQL Shell product is not printed,
   but session information, warnings, and errors are
   printed. With a value of 2, only errors are printed.
   As part of this work, the printed information was tidied
   up so that the information about the MySQL Shell product
   is printed before the information about the session.
   Also, the handling of error printing was normalized to
   send diagnostic data to stderr, and errors to stdout.
   (Bug #28833718, Bug #28855291)

 * MySQL Shell connections using classic MySQL protocol now
   support compression for information sent between the
   client and the server. You can specify compression when
   you start MySQL Shell and connect using command line
   options, or in a URI string or a key-value pair when you
   create a session using other interfaces. You can also use
   the MySQL Shell configuration option defaultCompress to
   enable compression for every global session.
   For MySQL Shell connections that use Unix socket files,
   the --socket command line option can now be specified
   with no argument to connect using the default Unix socket
   file for the protocol. (Bug #28730149)

 * The Cluster.status() operation has been extended to
   enable you to display information about the underlying
   Group Replication group used by the cluster. Now you can
   retrieve information from all members of a cluster
   without having to connect to each member individually.
   To see information about the groupName and memberId; and
   general statistics about the number of transactions
   checked, proposed, and rejected by members issue:

 Cluster.status(extended:true)

   To see information about recovery and regular tr

MySQL Router 8.0.14 for MySQL Server 8.0 and 5.7 has been released

2019-01-21 Thread Bjorn Munch
Dear MySQL users,

MySQL Router 8.0.14 is a new release for MySQL Router 8.0 series.

MySQL Router 8.0 is highly recommended for use with MySQL Server 8.0 and 5.7.
Please upgrade to MySQL Router 8.0.14.

The MySQL Router is a new building block for high availability solutions
based on MySQL InnoDB clusters.

By taking advantage of the new Group Replication technology, and
combined with the MySQL Shell, InnoDB clusters provide an integrated
solution for high availability and scalability for InnoDB based MySQL
databases, that does not require advanced MySQL expertise.

The deployment of applications with high availability requirements is
greatly simplified by MySQL Router. MySQL client connections are
transparently routed to online members of a InnoDB cluster, with MySQL
server outages and cluster reconfigurations being automatically handled
by the Router.

To download MySQL Router 8.0.14, see the "Generally Available (GA)
Releases" tab at http://dev.mysql.com/downloads/router. Package
binaries are available for several platforms and also as a source code
download.

Documentation for MySQL Router can be found at
http://dev.mysql.com/doc/mysql-router/en/

Enjoy!

Changes in MySQL Router 8.0.14 (Not yet released)


 * Functionality Added or Changed

 * Bugs Fixed

Functionality Added or Changed


 * A new dynamic configuration bootstrap feature was added
   that tracks the current MySQL InnoDB cluster Metadata
   servers. This replaces the existing
   bootstrap_server_addresses option with the new
   dynamic_config option in mysqlrouter.conf.
   MySQL Router now tracks and stores active MySQL InnoDB
   cluster Metadata server addresses and loads them if
   Router is restarted. Previously, metadata server
   information was defined during Router's initial bootstrap
   operation and stored statically as
   bootstrap_server_addresses in the configuration file.
   This new dynamic_config option is generated by
   --bootstrap and is defined under mysqlrouter.conf's
   [DEFAULT] section. Its value points to a generated JSON
   file named state.json that's initialized with InnoDB
   cluster Metadata server addresses and the group
   replication ID; and additional information is added and
   updated while Router is running.
   The bootstrap process no longer defines
   bootstrap_server_addresses because dynamic_config
   replaces its functionality; and these two options cannot
   be set at the same time. For backwards compatibility, if
   only bootstrap_server_addresses is set then it functions
   as it did in previous Router versions and this new
   dynamic configuration functionality is not used. (Bug
   #28082857, Bug #91029)

 * MySQL Router now persistently tracks the metadata server
   addresses rather than only using the static list defined
   in the configuration file using the destinations option.

Bugs Fixed


 * The --version output was aligned with MySQL Server's
   layout. (Bug #28899194)

 * Linking Router against libmsyqlclient that was built with
   DBUG enabled led to slow Router shutdown procedures. (Bug
   #28656618)

 * Fixed a thread shutdown race condition. (Bug #28610484)

 * Sending mysqlrouter a SIGTERM would take at least 100ms
   to shut down. Now a concurrent plugin shutdown queue was
   added to speed up the shutdown process. (Bug #28570122)

 * A metadata-cache API method was added to check the
   initialization status. Routing plugins use this during
   initialization to safely register the callbacks after
   metadata-cache is initialized. (Bug #28569717)

 * Installing MySQL Server with Router from source or
   building a tarball with "make package" would create a top
   level "data/" directory as part of the "Router"
   component. Due to possible collisions with MySQL Server,
   "data/" was changed to "var/lib/mysqlrouter". (Bug
   #28537733)

 * The connection error counter that blocks clients after
   max_connect_errors connection errors did not reset after
   a successful connection. (Bug #27995042, Bug #90809)

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



MySQL Router 8.0.13 for MySQL Server 8.0 and 5.7 has been released

2018-10-22 Thread Bjorn Munch
Dear MySQL users,

MySQL Router 8.0.13 is a new release for MySQL Router 8.0 series.

MySQL Router 8.0 is highly recommended for use with MySQL Server 8.0 and 5.7.
Please upgrade to MySQL Router 8.0.13.

The MySQL Router is a new building block for high availability solutions
based on MySQL InnoDB clusters.

By taking advantage of the new Group Replication technology, and
combined with the MySQL Shell, InnoDB clusters provide an integrated
solution for high availability and scalability for InnoDB based MySQL
databases, that does not require advanced MySQL expertise.

The deployment of applications with high availability requirements is
greatly simplified by MySQL Router. MySQL client connections are
transparently routed to online members of a InnoDB cluster, with MySQL
server outages and cluster reconfigurations being automatically handled
by the Router.

To download MySQL Router 8.0.13, see the "Generally Available (GA)
Releases" tab at http://dev.mysql.com/downloads/router. Package
binaries are available for several platforms and also as a source code
download.

Documentation for MySQL Router can be found at
http://dev.mysql.com/doc/mysql-router/en/

Enjoy!

--

Changes in MySQL Router 8.0.13 (2018-10-22)


 * Functionality Added or Changed

 * Bugs Fixed

Functionality Added or Changed


 * To align package names with MySQL Server, the community
   package name prefix changed from "mysql-router-" to
   "mysql-router-community-". This change also allows
   upgrading from MySQL Router 2.1 to 8.0. Additionally, a
   "mysql-router" meta package was added that redirects
   "mysql-router" to "mysql-router-community".

Bugs Fixed


 * For SLES 12, MySQL binary distributions are now built
   using GCC 7. The lowest supported GCC version on this
   platform is now 5.3 (previously 4.8.5).
   Installing MySQL Router 8.0.13 or higher RPM packages on
   SLES 12 platforms requires that the GCC Devel repo is
   enabled, for example:
shell> cd /etc/zypp/repos.d/
shell> wget 
https://download.opensuse.org/repositories/devel:/gcc/SLE-12/devel:gcc.repo
...
shell> zypper install ./mysql-router-community-8.0.*rpm

   (Bug #28685857)
   References: See also: Bug #92147.

 * The log level was changed from INFO to DEBUG for the
   InnoDB cluster Metadata server and replicaset
   connections. Because MySQL Router's ttl configuration
   option defaults to 0.1, these each generate 10 log
   entries per second. (Bug #28424243)

 * Running MySQL Router against an invalid InnoDB cluster
   would report internal SQL errors, such as "Unknown
   database 'mysql_innodb_cluster_metadata'", rather than
   user-friendly information that the cluster is not set up
   as a metadata server. The generated error now clarifies
   the reason and points to related documentation. (Bug
   #28292073)

 * The --version output was aligned across all binaries to
   include license related text. (Bug #28262453)

 * On Windows, starting Router after uninstalling the Router
   service would cause Router to hang as it assumed the
   service was still enabled. (Bug #28261217)

 * Passing in --directory to an unwritable empty directory
   would yield a generic error. (Bug #28228800)

 * The error code ER_CON_COUNT_ERROR is now used instead of
   HY000 ("unknown") when the maximum number of allowed
   connections is exceeded. (Bug #28183810)

 * The metadata version
   (mysql_innodb_cluster_metadata.schema_version)
   compatibility check is now checked at runtime, when
   before it only happened during the bootstrap process.
   (Bug #28147601)

 * Bootstraping with --user set to the same user running the
   bootstrap operation would halt with a "setegid failed"
   error. (Bug #27698052)

 * An error related to running out of available threads was
   only logged once until Router was restarted. (Bug
   #27577694)

 * MySQL Router is now included in MySQL Server's source and
   monolithic binary packages. The MySQL Router standalone
   packages continue to exist, as before.

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



MySQL Shell 8.0.12 for MySQL Server 8.0 and 5.7 has been released

2018-07-27 Thread Hery Ramilison

Dear MySQL users,

MySQL Shell 8.0.12 is a maintenance release of MySQL Shell 8.0 Series
(a component of the MySQL Server). The MySQL Shell is provided under
Oracle's dual-license.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0 and 5.7.
Please upgrade to MySQL Shell 8.0.12.

MySQL Shell is an interactive JavaScript, Python and SQL console
interface, supporting development and administration for the MySQL
Server. It provides APIs implemented in JavaScript and Python that
enable you to work with MySQL InnoDB cluster and use MySQL as a document
store.

The AdminAPI enables you to work with MySQL InnoDB cluster, providing
an integrated solution for high availability and scalability using
InnoDB based MySQL databases, without requiring advanced MySQL
expertise. For more information about how to configure and work with
MySQL InnoDB cluster see
https://dev.mysql.com/doc/refman/en/mysql-innodb-cluster-userguide.html.

The X DevAPI enables you to create "schema-less" JSON document
collections and perform Create, Update, Read, Delete (CRUD) operations
on those collections from your favorite scripting language.
For more information about how to use MySQL Shell and the MySQL Document
Store support see https://dev.mysql.com/doc/refman/en/document-store.html.
For more information about the X DevAPI see
https://dev.mysql.com/doc/x-devapi-userguide/en/.

If you want to write applications that use the the CRUD based X DevAPI
you can also use the latest MySQL Connectors for your language of
choice. For more information about Connectors see
https://dev.mysql.com/doc/index-connectors.html.

For more information on the APIs provided with MySQL Shell
see https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/
and https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/.

Using MySQL Shell's SQL mode you can communicate with servers using the
legacy MySQL protocol. Additionally, MySQL Shell provides partial
compatibility with the mysql client by supporting many of the same
command line options.

For full documentation on MySQL Server, MySQL Shell and related topics,
see https://dev.mysql.com/doc/mysql-shell/8.0/en/

For more information about how to download MySQL Shell 8.0.12, see
the "Generally Available (GA) Releases" tab at 
http://dev.mysql.com/downloads/shell/

We welcome and appreciate your feedback and bug reports, see
http://bugs.mysql.com/

Enjoy!

Changes in MySQL Shell 8.0.12 (2018-07-27, General Availability)

Functionality Added or Changed

 * Important Change: An RPM package for installing ARM
   64-bit (aarch64) binaries of MySQL Shell on Oracle Linux
   7 is now available in the MySQL Yum Repository and for
   direct download.
   Known Limitation for this ARM release: You must enable
   the Oracle Linux 7 Software Collections Repository
   (ol7_software_collections) to install this package, and
   must also adjust the libstdc++7 path. See Yum's Platform
   Specific Notes
   (http://dev.mysql.com/doc/refman/8.0/en/linux-installatio
   n-yum-repo.html#yum-install-platform-specifics) for
   additional details.

 * MySQL Shell now enables you to store user credentials in
   an operating system specific secret store. You can then
   enter a MySQL user's password during connection and store
   it for future connections. Currently the following secret
   stores are supported:

  + MySQL login-path

  + MacOS keychain

  + Windows API
   (Bug #23304789, Bug #81484)

 * The way you access the online Shell help has been
   standardized. Use the \help pattern command to search the
   help. The scope of the command has been increased to
   support retrieving help for the following categories:

  + Class and function help for the Admin API, X DevAPI
and Shell API. Previously, to retrieve help for API
objects, you had to create an instance of the object
and use the object.help() method.

  + SQL syntax help, provided that a global session
object exists.
   Wildcards can now be used to search for help. A number of
   additional bugs relating to incomplete help information
   have also been fixed. (Bug #23255291, Bug #81277, Bug
   #24963435, Bug #25732663, Bug #85481, Bug #25739522, Bug
   #85511, Bug #25739664, Bug #85514, Bug #26393155, Bug
   #86950, Bug #24943074, Bug #26429399, Bug #87037, Bug
   #27870491, Bug #90455, Bug #27870503, Bug #90456, Bug
   #27875150, Bug #90474, Bug #24948933, Bug #83527)

 * The util.checkForServerUpgrade() operation has an
   additional outputFormat parameter that you can specify
   when running the utility. The utility can now generate
   output in two formats:

  + TEXT format, which is the default. This option
provides output suitable for humans, as previously
returned by the utility.

   

Re: MySQL server has gone away

2017-04-04 Thread Reindl Harald



Am 03.04.2017 um 21:22 schrieb Mahmood N:

well, who did set it that low?


ِDon't know. Maybe the previous admin hadn't used mysql for sending emails!!


on a proper server you have a local smtpd like postfix listening on 
127.0.0.1 and hence you can send thousands of messages within seconds 
from a web-application and your local relay queues messages and try to 
deliver them by default up to 5 days


when you use a remote smtpd directly froma php application your are 
doing all wrong - what when the smtpd is not reachable or got restarted 
in the middle of sending?


how to act on a 4xx temporary error?

anything which takes more then 30 seconds needs to be fixed proper and 
then the timeout would not have been a probkem at all



On Monday, April 3, 2017 11:37 PM, Reindl Harald
 wrote:

Am 03.04.2017 um 20:41 schrieb Mahmood N:

Good news!

I changed wait_timeout=30 to wait_timeout=600 and now the error
disappears... I don't know if long_query_time=1 has effect.


well, who did set it that low?

https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout

http://orbisius.com/howto/web-development/change-mysqls-wait_timeout-interactive_timeout-variables/



On Monday, April 3, 2017 10:32 PM, Mahmood N > wrote:

I tested with both 5 and 1 and see the log files are empty.

I am really confused about that error and it is taking more than 2 weeks
about that!


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



Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
>well, who did set it that low?
ِDon't know. Maybe the previous admin hadn't used mysql for sending emails!!
Anyway, thanks.
 Regards,
Mahmood 

On Monday, April 3, 2017 11:37 PM, Reindl Harald  
wrote:
 

 

Am 03.04.2017 um 20:41 schrieb Mahmood N:
> Good news!
>
> I changed wait_timeout=30 to wait_timeout=600 and now the error
> disappears... I don't know if long_query_time=1 has effect.

well, who did set it that low?

https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout

http://orbisius.com/howto/web-development/change-mysqls-wait_timeout-interactive_timeout-variables/

> On Monday, April 3, 2017 10:32 PM, Mahmood N  wrote:
> I tested with both 5 and 1 and see the log files are empty.
>
> I am really confused about that error and it is taking more than 2 weeks
> about that!

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



   

Re: MySQL server has gone away

2017-04-03 Thread Reindl Harald



Am 03.04.2017 um 20:41 schrieb Mahmood N:

Good news!

I changed wait_timeout=30 to wait_timeout=600 and now the error
disappears... I don't know if long_query_time=1 has effect.


well, who did set it that low?

https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout

http://orbisius.com/howto/web-development/change-mysqls-wait_timeout-interactive_timeout-variables/


On Monday, April 3, 2017 10:32 PM, Mahmood N  wrote:
I tested with both 5 and 1 and see the log files are empty.

I am really confused about that error and it is taking more than 2 weeks
about that!


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



Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
Good news!
I changed wait_timeout=30 to wait_timeout=600 and now the error disappears... I 
don't know if long_query_time=1 has effect. Regards,
Mahmood 

On Monday, April 3, 2017 10:32 PM, Mahmood N  wrote:
 

 Dear reindl,
I tested with both 5 and 1 and see the log files are empty.
I am really confused about that error and it is taking more than 2 weeks about 
that!
 Regards,
Mahmood 


   

   

Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
Dear reindl,
I tested with both 5 and 1 and see the log files are empty.
I am really confused about that error and it is taking more than 2 weeks about 
that!
 Regards,
Mahmood 


   

Re: MySQL server has gone away

2017-04-03 Thread Reindl Harald



Am 03.04.2017 um 19:45 schrieb Mahmood N:

So I set long_query_time=5 and restarted the service. Test the email
page again. Still the logs are empty


WTF - you had it set to 5 seconds 2 hours ago
i am out here...

Am 03.04.2017 um 18:11 schrieb Mahmood N:
> The my.conf file contains
>
> log_error=/var/log/mysql/error.log
> slow_query_log=1
> slow_query_log_file=/var/log/mysql/error_slow.log
> max_connections=200
> max_user_connections=30
> wait_timeout=30
> interactive_timeout=50
> long_query_time=5
> character-set-client-handshake = FALSE
> thread_concurrency = 8
> query_cache_size = 16M
> thread_cache_size = 8
> max_allowed_packet = 8M

"long_query_time=5" is low when you talk about 5 seconds as i remember 
in previuos posts - given that a reasonable server should be able to 
handle hunredts to thousands of requests per second anything above 1 
second is a alert sign


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



Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
So I set long_query_time=5 and restarted the service. Test the email page 
again. Still the logs are empty.
 Regards,
Mahmood 


   

Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
>since when is phpinfo() - the *real* active configuration be it changed 
>by some config snippet, vhost-configuration or even ini_set() - the same 
>than a random file in /etc?
Sorry I totally didn't understand that sentence... Regards,
Mahmood 


   

Re: MySQL server has gone away

2017-04-03 Thread Reindl Harald



Am 03.04.2017 um 19:26 schrieb Mahmood N:

given that a reasonable server should be able to
handle hunredts to thousands of requests per second anything above 1
second is a alert sign


Excuse me, do you mean higher values are better? I didn't understand. I
said in my posts that when I submit the email test, the refresh time for
that page is about 5 minutes.


if you think a moment you realize that lower values are better when 5 
seconds don't log any query and you have obvious slow queries



look also in phpinfo() for mysqlnd and mysql params containing "timeout"
and/or "max"


in /etc/php/7.0/apache2/php.ini I see

;mysqlnd.net_read_timeout = 31536000

Note that is comment


since when is phpinfo() - the *real* active configuration be it changed 
by some config snippet, vhost-configuration or even ini_set() - the same 
than a random file in /etc?


http://php.net/manual/en/function.phpinfo.php

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



Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
>given that a reasonable server should be able to 
>handle hunredts to thousands of requests per second anything above 1 
>second is a alert sign
Excuse me, do you mean higher values are better? I didn't understand. I said in 
my posts that when I submit the email test, the refresh time for that page is 
about 5 minutes. 

>look also in phpinfo() for mysqlnd and mysql params containing "timeout" 
>and/or "max"
in /etc/php/7.0/apache2/php.ini I see
;mysqlnd.net_read_timeout = 31536000

Note that is comment.

 Regards,
Mahmood 


   

Re: MySQL server has gone away

2017-04-03 Thread Reindl Harald



Am 03.04.2017 um 18:11 schrieb Mahmood N:

The my.conf file contains

log_error=/var/log/mysql/error.log
slow_query_log=1
slow_query_log_file=/var/log/mysql/error_slow.log
max_connections=200
max_user_connections=30
wait_timeout=30
interactive_timeout=50
long_query_time=5
character-set-client-handshake = FALSE
thread_concurrency = 8
query_cache_size = 16M
thread_cache_size = 8
max_allowed_packet = 8M


"long_query_time=5" is low when you talk about 5 seconds as i remember 
in previuos posts - given that a reasonable server should be able to 
handle hunredts to thousands of requests per second anything above 1 
second is a alert sign



I restarted the mysql server (/etc/init.d/mysql restart on ubuntu) and
tested the email page one again. I again see that error message on the
browser, however, the log files are empty.


look also in phpinfo() for mysqlnd and mysql params containing "timeout" 
and/or "max"


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



Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
The my.conf file contains
log_error=/var/log/mysql/error.log
slow_query_log=1
slow_query_log_file=/var/log/mysql/error_slow.log
max_connections=200
max_user_connections=30
wait_timeout=30
interactive_timeout=50
long_query_time=5
character-set-client-handshake = FALSE
thread_concurrency = 8
query_cache_size = 16M
thread_cache_size = 8
max_allowed_packet = 8M


I restarted the mysql server (/etc/init.d/mysql restart on ubuntu) and tested 
the email page one again. I again see that error message on the browser, 
however, the log files are empty.
 Regards,
Mahmood 


   

Re: MySQL server has gone away

2017-04-03 Thread Reindl Harald



Am 03.04.2017 um 17:52 schrieb Mahmood N:

Dear all,
Currently max_allowed_packet is set to 8M. That test email is simply a test 
email containing some basic information in the message body to assure that the 
email system works.
Thing that can help me is to put mysql in the debug mode in one terminal and at 
the same time, submit a test email from the browser. Then I can see what is 
going there in sql. This process is similar to sshd debug mode where I can turn 
on the ssh service in the debug mode and see what is what. Is there is any 
other option for debugging, please let me know.


The MySQL Error Log may  contain details explaining why mysqld was unable to 
stay running

If you are referring to /var/log/musql/error.log then I have to say it is empty!


Perhaps you could connect your mysql client, load the screen, then run show 
full processlist every second or so to see what queries are going on.

As I said, I know few things about mysql. Please let me know the steps to do 
that


https://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html

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



Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
Dear all,
Currently max_allowed_packet is set to 8M. That test email is simply a test 
email containing some basic information in the message body to assure that the 
email system works.
Thing that can help me is to put mysql in the debug mode in one terminal and at 
the same time, submit a test email from the browser. Then I can see what is 
going there in sql. This process is similar to sshd debug mode where I can turn 
on the ssh service in the debug mode and see what is what. Is there is any 
other option for debugging, please let me know.



>The MySQL Error Log may  contain details explaining why mysqld was unable to 
>stay running
If you are referring to /var/log/musql/error.log then I have to say it is empty!



>Perhaps you could connect your mysql client, load the screen, then run show 
>full processlist every second or so to see what queries are going on.
As I said, I know few things about mysql. Please let me know the steps to do 
that
 Regards,
Mahmood 
  Show original message 

   

Re: MySQL server has gone away

2017-04-03 Thread shawn l.green



On 4/3/2017 8:15 AM, Mahmood N wrote:

When I click on the submit button in Moodle and it is waiting for refresh, I 
execute the mysql command but the output is not meaningful

mahmood@ce:/var/www/html/courses$ mysql -u moodle -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 30912
Server version: 5.5.54-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show full processlist
 ->
 ->



Meanwhile using Webmin, I execute the same command for that user and see
  Output from SQL command show full processlist ..
| Id | User | Host | db | Command | Time | State | Info |
| 30912 | moodle | localhost |
  | Sleep | 42 |



I am not expert with MySQL, however as the Moodle admin I am trying to fix the 
problems.
Regards,
Mahmood



You need to consider a few possibilities,

a) Moodle didn't want to wait long enough for the query to complete (a 
Moodle Timeout) so it said "the server is not responding..."


b) Moodle sent MySQL a command that was "too large".  To protect itself 
from abuse, all MySQL instances have a configurable limit about how 
"large" a command can be. If the command is larger than this limit, the 
server rejects it and closes the connection.  (this could explain why 
the query you just attempted from Moodle is not visible in the list of 
executing commands)


c) Something is unstable in your MySQL instance. The MySQL Error Log may 
contain details explaining why mysqld was unable to stay running.  The 
angel process mysqld_safe would try to restart the server automatically 
which could explain why Moodle was only unresponsive for a short while.


Additional resources:
https://dev.mysql.com/doc/refman/5.6/en/problems.html   (in particular, 
review B.5.2)


--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Integrated Cloud Applications & Platform Services
Office: Blountville, TN

Become certified in MySQL! Visit https://www.mysql.com/certification/ 
for details.


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



Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
When I click on the submit button in Moodle and it is waiting for refresh, I 
execute the mysql command but the output is not meaningful

mahmood@ce:/var/www/html/courses$ mysql -u moodle -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 30912
Server version: 5.5.54-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show full processlist
    ->
    ->



Meanwhile using Webmin, I execute the same command for that user and see
 Output from SQL command show full processlist ..
| Id | User | Host | db | Command | Time | State | Info |
| 30912 | moodle | localhost | 
 | Sleep | 42 |



I am not expert with MySQL, however as the Moodle admin I am trying to fix the 
problems.
Regards,
Mahmood



   

Re: MySQL server has gone away

2017-04-03 Thread Johnny Withers
I'd suspect the underlying query is poorly designed for the amount of data
you have stored. If you have access to the mysql server you could connect
to it using any mysql client and run 'show full processlist' to see the
query as that page is trying to load. The query is probably in the 'sending
data' state and gets killed at the limit of one of the timeout variables.
This causes the application to throw that error you have.

Copy that query out, prefix it with explain and see if there are any tables
in the query where an index could be added to optimize the database for the
query.



On Mon, Apr 3, 2017 at 6:09 AM, Ken D'Ambrosio <k...@jots.org> wrote:

> Basically, it says that MySQL is not responding to queries. So it likely
> has died, or perhaps is mis-configured.
>
> On April 3, 2017 7:07:25 AM EDT, Mahmood N <nt_mahm...@yahoo.com> wrote:
> >Hi,I am using Moodle which itself uses SQL for the database. Problem is
> >that, when I run the email plugin and execute the command, the refresh
> >time of the page becomes high (in the order of 3-5 minutes) and at the
> >end, I see this message
> >Debug info: MySQL server has gone away
> >SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM
> >mdl_sessions WHERE sid = ?
> >[array (
> > 0 => 'jqfbgd5b0q6e2l81bb5gb87mn3',
> >)]
> >Error code: dmlreadexceptionStack trace:
> >  - line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown
> >- line 1175 of /lib/dml/mysqli_native_moodle_database.php: call to
> >moodle_database->query_end()
> >- line 1551 of /lib/dml/moodle_database.php: call to
> >mysqli_native_moodle_database->get_records_sql()
> >- line 1523 of /lib/dml/moodle_database.php: call to
> >moodle_database->get_record_sql()
> >- line 1502 of /lib/dml/moodle_database.php: call to
> >moodle_database->get_record_select()
> >- line 286 of /lib/classes/session/manager.php: call to
> >moodle_database->get_record()
> >- line 82 of /lib/classes/session/manager.php: call to
> >core\session\manager::initialise_user_session()
> >   - line 785 of /lib/setup.php: call to core\session\manager::start()
> >   - line 27 of /config.php: call to require_once()
> >   - line 30 of /index.php: call to require_once()
> >
> >
> >Although it looks like a bug in Moodle, but the guys said it is a MySQL
> >issue. I am confused about that. If you have any idea please let me
> >know. What does this error say exactly?
> >
> > Regards,
> >Mahmood
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.




-- 
-
Johnny Withers
601.209.4985
joh...@pixelated.net


Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
Thanks for the quick reply. So, how can I get further information? 

Thing is that, after 5 minutes, when I refresh the page every thing is normal.
 Regards,
Mahmood 

On Monday, April 3, 2017 3:39 PM, Ken D'Ambrosio <k...@jots.org> wrote:
 

 Basically, it says that MySQL is not responding to queries. So it likely has 
died, or perhaps is mis-configured.

On April 3, 2017 7:07:25 AM EDT, Mahmood N <nt_mahm...@yahoo.com> wrote:
Hi,I am using Moodle which itself uses SQL for the database. Problem is that, 
when I run the email plugin and execute the command, the refresh time of the 
page becomes high (in the order of 3-5 minutes) and at the end, I see this 
message
Debug info: MySQL server has gone away
SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM 
mdl_sessions WHERE sid = ?
[array (
 0 => 'jqfbgd5b0q6e2l81bb5gb87mn3',
)]
Error code: dmlreadexceptionStack trace:
   - line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown
   - line 1175 of /lib/dml/mysqli_native_moodle_database.php: call to 
moodle_database->query_end()
   - line 1551 of /lib/dml/moodle_database.php: call to 
mysqli_native_moodle_database->get_records_sql()
   - line 1523 of /lib/dml/moodle_database.php: call to 
moodle_database->get_record_sql()
   - line 1502 of /lib/dml/moodle_database.php: call to 
moodle_database->get_record_select()
   - line 286 of /lib/classes/session/manager.php: call to 
moodle_database->get_record()
   - line 82 of /lib/classes/session/manager.php: call to 
core\session\manager::initialise_user_session()
   - line 785 of /lib/setup.php: call to core\session\manager::start()
   - line 27 of /config.php: call to require_once()
   - line 30 of /index.php: call to require_once()


Although it looks like a bug in Moodle, but the guys said it is a MySQL issue. 
I am confused about that. If you have any idea please let me know. What does 
this error say exactly?

 Regards,
Mahmood

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

   

Re: MySQL server has gone away

2017-04-03 Thread Ken D'Ambrosio
Basically, it says that MySQL is not responding to queries. So it likely has 
died, or perhaps is mis-configured.

On April 3, 2017 7:07:25 AM EDT, Mahmood N <nt_mahm...@yahoo.com> wrote:
>Hi,I am using Moodle which itself uses SQL for the database. Problem is
>that, when I run the email plugin and execute the command, the refresh
>time of the page becomes high (in the order of 3-5 minutes) and at the
>end, I see this message
>Debug info: MySQL server has gone away
>SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM
>mdl_sessions WHERE sid = ?
>[array (
> 0 => 'jqfbgd5b0q6e2l81bb5gb87mn3',
>)]
>Error code: dmlreadexceptionStack trace:
>  - line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown
>- line 1175 of /lib/dml/mysqli_native_moodle_database.php: call to
>moodle_database->query_end()
>- line 1551 of /lib/dml/moodle_database.php: call to
>mysqli_native_moodle_database->get_records_sql()
>- line 1523 of /lib/dml/moodle_database.php: call to
>moodle_database->get_record_sql()
>- line 1502 of /lib/dml/moodle_database.php: call to
>moodle_database->get_record_select()
>- line 286 of /lib/classes/session/manager.php: call to
>moodle_database->get_record()
>- line 82 of /lib/classes/session/manager.php: call to
>core\session\manager::initialise_user_session()
>   - line 785 of /lib/setup.php: call to core\session\manager::start()
>   - line 27 of /config.php: call to require_once()
>   - line 30 of /index.php: call to require_once()
>
>
>Although it looks like a bug in Moodle, but the guys said it is a MySQL
>issue. I am confused about that. If you have any idea please let me
>know. What does this error say exactly?
>
> Regards,
>Mahmood

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

MySQL server has gone away

2017-04-03 Thread Mahmood N
Hi,I am using Moodle which itself uses SQL for the database. Problem is that, 
when I run the email plugin and execute the command, the refresh time of the 
page becomes high (in the order of 3-5 minutes) and at the end, I see this 
message
Debug info: MySQL server has gone away
SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM 
mdl_sessions WHERE sid = ?
[array (
 0 => 'jqfbgd5b0q6e2l81bb5gb87mn3',
)]
Error code: dmlreadexceptionStack trace:
   - line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown
   - line 1175 of /lib/dml/mysqli_native_moodle_database.php: call to 
moodle_database->query_end()
   - line 1551 of /lib/dml/moodle_database.php: call to 
mysqli_native_moodle_database->get_records_sql()
   - line 1523 of /lib/dml/moodle_database.php: call to 
moodle_database->get_record_sql()
   - line 1502 of /lib/dml/moodle_database.php: call to 
moodle_database->get_record_select()
   - line 286 of /lib/classes/session/manager.php: call to 
moodle_database->get_record()
   - line 82 of /lib/classes/session/manager.php: call to 
core\session\manager::initialise_user_session()
   - line 785 of /lib/setup.php: call to core\session\manager::start()
   - line 27 of /config.php: call to require_once()
   - line 30 of /index.php: call to require_once()


Although it looks like a bug in Moodle, but the guys said it is a MySQL issue. 
I am confused about that. If you have any idea please let me know. What does 
this error say exactly?

 Regards,
Mahmood

compile problem with newest version of mysql-server

2015-10-15 Thread Zhudacai
Hi all,
Recently, I got the newest version of mysql-server from the github,
Bug I got some compile problem as follows:

cmake -DCMAKE_INSTALL_PREFIX=/u04/my3306 \
-DMYSQL_DATADIR=/u04/my3306/data -DMYSQL_USER=mysql \
-DSYSCONFDIR=/etc  -DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DMYSQL_UNIX_ADDR=/u04/my3306/run/mysql.sock \
-DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1  \
-DWITH_PARTITION_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8  \
-DDEFAULT_COLLATION=utf8_general_ci -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O2 -g" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g" \
-DCMAKE_C_FLAGS="-O2 -g" -DCMAKE_CXX_FLAGS="-O2 -g" -DWITH_BOOST=/root/


-- Looking for kqueue
-- Looking for kqueue - not found
-- Looking for EVFILT_TIMER
-- Looking for EVFILT_TIMER - not found
CMake Error at configure.cmake:540 (MESSAGE):
  No mysys timer support detected!
Call Stack (most recent call first):
  CMakeLists.txt:443 (INCLUDE)


-- Configuring incomplete, errors occurred!
See also "/root/mysql/mysql-server-mysql-5.7.8/CMakeFiles/CMakeOutput.log".
See also "/root/mysql/mysql-server-mysql-5.7.8/CMakeFiles/CMakeError.log".

And end of CMakeError.log as follows, and it seems like I had miss event.h file.

/root/mysql/mysql-server-mysql-5.7.8/CMakeFiles/CMakeTmp/CheckSymbolExists.c:3:23:
 fatal error: sys/event.h: No such file or directory
#include 
   ^
compilation terminated.
gmake[1]: *** [CMakeFiles/cmTryCompileExec2077689452.dir/CheckSymbolExists.c.o] 
Error 1
gmake[1]: Leaving directory 
`/root/mysql/mysql-server-mysql-5.7.8/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec2077689452/fast] Error 2

File 
/root/mysql/mysql-server-mysql-5.7.8/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include 
#include 
#include 

int main(int argc, char** argv)
{
  (void)argv;
#ifndef EVFILT_TIMER
  return ((int*)(_TIMER))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Can anyone knows how to fix this problem ?

Dacai.


Re: Specking a small MySQL server

2014-12-09 Thread Johan De Meersman
- Original Message -
 From: Richard Reina gatorre...@gmail.com
 Subject: Specking a small MySQL server
 
 somewhat of an energy hog and is due to be replaced. I was considering
 replacing it with a lap-top so as to conserve energy and because a laptop
 has a built in battery backup. Currently I have a couple of laptops running

For a long time, my go-to recommendation for reliable laptops would've been 
thinkpads; but I haven't had any experience with the new chinese versions.

I've been pretty happy with my (employer-issued) HP ProBooks, but that' a 
sample of one, of course :-)

One thing to keep in mind for your particular usage, though, is that consumer 
drives, and, especially, laptop drives, are not designed for 24/7 operation. I 
would strongly recommend to go for SSD storage even if you don't need the 
speed, as those at least don't have moving parts.

/johan


-- 
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



Specking a small MySQL server

2014-12-06 Thread Richard Reina
I have used MySQL for about twelve years as a database on our private LAN
that has only a handful of users at a time that query about a dozen
databases. The current server is an old rack-mounted machine that is
somewhat of an energy hog and is due to be replaced. I was considering
replacing it with a lap-top so as to conserve energy and because a laptop
has a built in battery backup. Currently I have a couple of laptops running
as slaves. Can anyone advise as to a good reliable brand of laptop to run
Linux and MySQL for this purpose. As this will by my main server I was
looking for something reliable.

Thanks for any ideas or insights.

Richard


Cannot build static mysql server

2014-07-12 Thread Mimiko

I try to cpmpile mysql-with no shared, but have an error when configuring:

mkdir -p ~/src/mysql/bld  \
cd ~/src/mysql/bld  \
(make clean; rm ~/src/mysql/bld/CMakeCache.txt; echo 1)  \
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mysql 
-DBUILD_CONFIG=mysql_release -DMYSQL_DATADIR=data -DSYSCONFDIR=etc \

-DWITH_LIBWRAP=on -DIGNORE_AIO_CHECK=on \
-DWITH_ZLIB=bundled -DENABLE_GCOV=on -DENABLE_GPROF=yes -DWITH_PIC=on \
-DENABLED_LOCAL_INFILE=on -DMYSQL_UNIX_ADDR=/tmp/mysql.sock 
-DINSTALL_LAYOUT=STANDALONE \
-DWITH_EDITLINE=bundled -DENABLED_PROFILING=ON 
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EMBEDDED_SERVER=on -DWITH_INNOBASE_STORAGE_ENGINE=on 
-DWITH_ARCHIVE_STORAGE_ENGINE=on \
-DWITH_BLACKHOLE_STORAGE_ENGINE=on 
-DWITH_PERFSCHEMA_STORAGE_ENGINE=on -DWITH_FEDERATED_STORAGE_ENGINE=on \
-DWITH_PARTITION_STORAGE_ENGINE=on 
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=on -DWITH_EXTRA_CHARSETS=all \
-DWITH_INNODB_MEMCACHED=on -DWITH_LIBEVENT=bundled 
-DCPACK_MONOLITHIC_INSTALL=on \
-DWITH_SSL=bundled -DWITH_PIC=on -DCMAKE_BUILD_TYPE=MinSizeRel 
-DENABLE_DEBUG_SYNC=off \
-DENABLE_MEMCACHED_SASL=on -DENABLE_MEMCACHED_SASL_PWDB=on 
-DFEATURE_SET=community \
-DCMAKE_SKIP_RPATH=on -DCMAKE_USE_RELATIVE_PATHS=on 
-DDISABLE_SHARED=on \

-DWITH_MYSQLD_LDFLAGS=-L/opt/cyrus-sasl/lib \
-DCMAKE_C_FLAGS=-fPIC -fPIE -static-libgcc -static-libstdc++ \
-DCMAKE_CXX_FLAGS=-fPIC -fPIE -I/opt/cyrus-sasl/include

The error is:
-- LIBEVENT_LIBRARY event
CMake Error at 
plugin/innodb_memcached/daemon_memcached/CMakeLists.txt:87 
(TARGET_LINK_LIBRARIES):
  Cannot specify link libraries for target libmemcached which is not 
built

  by this project.

Of I specify -DWITH_INNODB_MEMCACHED=off, then configure passes and can 
compile the project.


What is the problem?

--
Mimiko desu.

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



Why MySQL-server-5.5.37 install fail?

2014-05-04 Thread EdwardKing
I'm newbie to mysql and I  want to install mysql under Centos 5.8 using 
MySQL-server-5.5.37-1.linux2.6.i386.rpm, I use following command to intall mysql

#[root@master software]# rpm -ivh MySQL-server-5.5.37-1.linux2.6.i386.rpm 
Preparing...### [100%]
   1:MySQL-server   ### [100%]

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h master password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

Then I use following command:

[root@master bin]# pwd
/usr/bin
[root@master bin]# /usr/bin/mysqladmin -u root password '123456'
bash: mysqladmin: command not found

[root@master bin]# ls mysqladmin
ls: mysqladmin: No such file or directory

[root@master bin]# mysql_secure_installation
Can't find a 'mysql' client in PATH or ./bin

How to install mysql and start mysql? Why are the commands of  mysqladmin and 
mysql_secure_installation fail?  I am puzzled with it for many days, I still 
can't find a solution. Anyone could help me?  Thanks.

Thanks.


 
---
Confidentiality Notice: The information contained in this e-mail and any 
accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential 
and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of 
this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, 
disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this 
communication in error,please 
immediately notify the sender by return e-mail, and delete the original message 
and all copies from 
your system. Thank you. 
---


Re: Why MySQL-server-5.5.37 install fail?

2014-05-04 Thread Reindl Harald


Am 04.05.2014 08:29, schrieb EdwardKing:
 I'm newbie to mysql and I  want to install mysql under Centos 5.8 using 
 MySQL-server-5.5.37-1.linux2.6.i386.rpm, I use following command to intall 
 mysql
 
 #[root@master software]# rpm -ivh MySQL-server-5.5.37-1.linux2.6.i386.rpm 
 Preparing...### [100%]
1:MySQL-server   ### [100%]
 
 [root@master bin]# pwd
 /usr/bin
 [root@master bin]# /usr/bin/mysqladmin -u root password '123456'
 bash: mysqladmin: command not found

because you are only installing the server and not the clients packages
RTFM or just use your distributions packages which would have pulled
mysql by dependencies because the server makes little sense without
the tools for a basic setup

[root@hosting:~]$ rpm -q --file /usr/bin/mysqladmin
mariadb-5.5.35-3.el7.x86_64

[root@hosting:~]$ rpm -q --file /usr/libexec/mysqld
mariadb-server-5.5.35-3.el7.x86_64







signature.asc
Description: OpenPGP digital signature


Re: Why MySQL-server-5.5.37 install fail?

2014-05-04 Thread yoku ts.
Hello,

mysqladmin and mysql command-line client is included in MySQL-client
package.
mysql_secure_installation is included in MySQL-server but it's a perl
script which calls mysql command-line client internally.

Thus, you should install MySQL-client-*.rpm and try again.

Regards,



2014-05-04 15:29 GMT+09:00 EdwardKing zhan...@neusoft.com:

 I'm newbie to mysql and I  want to install mysql under Centos 5.8 using
 MySQL-server-5.5.37-1.linux2.6.i386.rpm, I use following command to intall
 mysql

 #[root@master software]# rpm -ivh MySQL-server-5.5.37-1.linux2.6.i386.rpm
 Preparing...###
 [100%]
1:MySQL-server   ###
 [100%]

 PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
 To do so, start the server, then issue the following commands:

 /usr/bin/mysqladmin -u root password 'new-password'
 /usr/bin/mysqladmin -u root -h master password 'new-password'

 Alternatively you can run:
 /usr/bin/mysql_secure_installation

 which will also give you the option of removing the test
 databases and anonymous user created by default.  This is
 strongly recommended for production servers.

 See the manual for more instructions.

 Please report any problems at http://bugs.mysql.com/

 Then I use following command:

 [root@master bin]# pwd
 /usr/bin
 [root@master bin]# /usr/bin/mysqladmin -u root password '123456'
 bash: mysqladmin: command not found

 [root@master bin]# ls mysqladmin
 ls: mysqladmin: No such file or directory

 [root@master bin]# mysql_secure_installation
 Can't find a 'mysql' client in PATH or ./bin

 How to install mysql and start mysql? Why are the commands of  mysqladmin
 and mysql_secure_installation fail?  I am puzzled with it for many days, I
 still can't find a solution. Anyone could help me?  Thanks.

 Thanks.




 ---
 Confidentiality Notice: The information contained in this e-mail and any
 accompanying attachment(s)
 is intended only for the use of the intended recipient and may be
 confidential and/or privileged of
 Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader
 of this communication is
 not the intended recipient, unauthorized use, forwarding, printing,
  storing, disclosure or copying
 is strictly prohibited, and may be unlawful.If you have received this
 communication in error,please
 immediately notify the sender by return e-mail, and delete the original
 message and all copies from
 your system. Thank you.

 ---



mysql server does not start

2014-04-05 Thread Nicolae Marasoiu
i made a different datadir and gave ownership and rights to mysql and
trsted with su that mysql can read host.frm

still errno 13: cannot acess ./mysql/host.frm

my datadir comtains the mysql dir/schema

pls help!
i run ununtu
thanks
nicu


Questions about building a dedicated MySQL server.

2014-03-17 Thread Mister Vlad
I am looking at building a dedicated MySQL server... was wondering about the 
downside to using SSD drives?
My thoughts was going 2 servers, with 4 drives each in raid 5 (3+1) 
configuration.
Is this a good idea?   I was originally thinking about going Raid5(3+1) and 
Raid 1 (Mirrored) but that might a little overkill?
Now, for the CPU, is a single 8core sufficient?   what about Ram?   16gb?  32gb?
This is going to have a lot of writes, fewer updates, and a lot of searching... 
 the databases are about 2GB each, and they are monthly created (basically for 
storing stats).  Typically, only the current, and past 2-3 months are accessed, 
and the others are just there for archival purposes.

My reasoning for going SSD over 15k drives was speed.  The lookups would 
(should) be faster,  or so I would think.
What are your thoughts about this?  is this a good idea?  do you have better 
idea?   The only thing on this server would be MySQL, the stats database, and a 
couple others that are used daily, but not nearly as active as the stats db.
Thanks for any and all help!
MV.   

Re: Questions about building a dedicated MySQL server.

2014-03-17 Thread Carsten Pedersen

On 17-03-2014 16:21, Mister Vlad wrote:

I am looking at building a dedicated MySQL server... was wondering about the 
downside to using SSD drives?
My thoughts was going 2 servers, with 4 drives each in raid 5 (3+1) 
configuration.
Is this a good idea?   I was originally thinking about going Raid5(3+1) and 
Raid 1 (Mirrored) but that might a little overkill?
Now, for the CPU, is a single 8core sufficient?   what about Ram?   16gb?  32gb?
This is going to have a lot of writes, fewer updates, and a lot of searching... 
 the databases are about 2GB each, and they are monthly created (basically for 
storing stats).  Typically, only the current, and past 2-3 months are accessed, 
and the others are just there for archival purposes.

My reasoning for going SSD over 15k drives was speed.  The lookups would 
(should) be faster,  or so I would think.
What are your thoughts about this?  is this a good idea?  do you have better 
idea?   The only thing on this server would be MySQL, the stats database, and a 
couple others that are used daily, but not nearly as active as the stats db.
Thanks for any and all help!
MV. 


With this information, with 16GB RAM all your live data will easily fit 
in RAM at any given time - read speed will not be dependent on the disks 
once the data is loaded.


Write speed might. lots of writing - what is that? 1000 10kB 
inserts/sec? 100 1MB inserts/sec?


Best,

/ Carsten

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



Install mysql server using RPM

2014-03-03 Thread Asma rabe
Hi all,

I am trying installing Mysql server using RPM bundle


rpm -i MySQL-server-5.6.16-1.el6.x86_64.rpm
rpm -i MySQL-client-5.6.16-1.el6.x86_64.rpm

next i would like to start the server, i followed the mysql docs:

The server RPM places data under the /var/lib/mysql directory. The RPM also
creates a login account for a user named mysql (if one does not exist) to
use for running the MySQL server, and creates the appropriate entries in
/etc/init.d/ to start the server automatically at boot time. (This means
that if you have performed a previous installation and have made changes to
its startup script, you may want to make a copy of the script so that you
do not lose it when you install a newer RPM.

when i checked /var/lib i found non for mysql,Any idea??

Thank you very much in advance.

Best Regards,
Rabe


Re: Install mysql server using RPM

2014-03-03 Thread geetanjali mehra
issue:
mysql
at the command prompt
and let me know.
also post the output of
ls /var/lib


On Mon, Mar 3, 2014 at 1:53 PM, Asma rabe asma.r...@gmail.com wrote:

 Hi all,

 I am trying installing Mysql server using RPM bundle


 rpm -i MySQL-server-5.6.16-1.el6.x86_64.rpm
 rpm -i MySQL-client-5.6.16-1.el6.x86_64.rpm

 next i would like to start the server, i followed the mysql docs:

 The server RPM places data under the /var/lib/mysql directory. The RPM also
 creates a login account for a user named mysql (if one does not exist) to
 use for running the MySQL server, and creates the appropriate entries in
 /etc/init.d/ to start the server automatically at boot time. (This means
 that if you have performed a previous installation and have made changes to
 its startup script, you may want to make a copy of the script so that you
 do not lose it when you install a newer RPM.

 when i checked /var/lib i found non for mysql,Any idea??

 Thank you very much in advance.

 Best Regards,
 Rabe




-- 
Geetanjali Mehra
Oracle DBA Corporate Trainer
Koenig-solutions
Moti Nagar,New Delhi


Re: Install mysql server using RPM

2014-03-03 Thread Johan De Meersman


- Original Message -
 From: Asma rabe asma.r...@gmail.com
 Subject: Install mysql server using RPM
 
 rpm -i MySQL-server-5.6.16-1.el6.x86_64.rpm
 rpm -i MySQL-client-5.6.16-1.el6.x86_64.rpm


I seem to recall that Oracle's Debian -server package included the clients 
already. You may not need to install the -client package if the same goes for 
the RPMs.

-- 
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: ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-08 Thread Manuel Arostegui
2014/1/7 h...@tbbs.net

  2014/01/06 17:07 +0100, Reindl Harald 
 what about look in the servers logfiles
 most likely max_allowed_packet laughable low
 
 Is this then, too, likly when the server and the client are the same
 machine?

 I left this out, that it only then happens when the client has been idle,
 and right afterwards the client repeats the request and all goes well. The
 message is no more than an irritatind break between request and fulfillment.

 Hello,

That happens when you're trying to re-use an existing connection which
wasn't properly closed and as you said, it's been idle. When you repeat the
operation, the thread is created again and thus everything goes normal.

Review the following variables

wait_timeout
net_write_timeout
net_read_timeout


Manu


Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-07 Thread hsv
 2014/01/06 17:07 +0100, Reindl Harald 
what about look in the servers logfiles
most likely max_allowed_packet laughable low 

Is this then, too, likly when the server and the client are the same machine?

I left this out, that it only then happens when the client has been idle, and 
right afterwards the client repeats the request and all goes well. The message 
is no more than an irritatind break between request and fulfillment.


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



ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-06 Thread hsv
Now that I installed 5.6.14 on our Vista machine, when using mysql I often 
see that error-message, which under 5.5.8 I never saw. What is going on?


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



Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-06 Thread Reindl Harald


Am 06.01.2014 15:36, schrieb h...@tbbs.net:
 Now that I installed 5.6.14 on our Vista machine, when using mysql I often 
 see that error-message, which under 5.5.8 I never saw. What is going on?

what about look in the servers logfiles
most likely max_allowed_packet laughable low



signature.asc
Description: OpenPGP digital signature


Lost connection to MySQL server - need help.

2013-10-12 Thread Jørn Dahl-Stamnes
Hello,

I got a strange problem related to a production server. It has been working OK 
for months, but yesterday it start to fail. There are several batch scripts 
using the database in addition to a web application using it.

The php scripts running in batch mode began to get:

mysql_connect(): Lost connection to MySQL server at 'reading initial 
communication packet', system error: 111

I stopped the server and restarted it and everything seems to work OK for 
hours but when the load start to increase, the errors begin to appear again.

Today I noticed that after I starte phpMyAdmin and selected one of the 
databases, phpMyAdmin was hanging and the batch scripts began to fail again. 
Seems like the server does not handle much load anymore.


What's strange is the memory usage. The server is a quad core cpu with 48 Gb 
memory, where 28 Gb is allocated to innodb (we mostly use innodb). But when 
using top command, I noticed this:

VIRT: 33.9g
RES: 9.4g
SWAP: 23g

at this time over 11G memory is free. vm.swappiness is set to 0. I find it 
strange that the server is not able to use physical memory but use swap 
instead. The amount of cpu time used for swapping is rather high during sql 
queries. The amount of RESident memory may increase slowly over time but very 
slowly (it can take hours before it increase to 20+ Gb).

[PS: I also got a MySQL server running at a dedicated host at home, where the 
it seem to use the memory as I except it to use:

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  SWAP DATA COMMAND
 1462 mysql 20   0 30.0g  27g 3900 S  0.3 87.3   2633:14 844m  29g mysqld
]


I would like to have some suggestions what I can do to solve this problem.
I have google'd it but found nothing that seem to solve my case.

Server:
  OS: Debian 6
  MySQL: 5.1.61-0+squeeze1

my.cnf:
#
# The MySQL database server configuration file.
#

[client]
port= 3306
socket  = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld].
[mysqld_safe]
socket  = /var/run/mysqld/mysqld.sock
nice= 0

[mysqld]
#
# * Basic Settings
#
user= mysql
pid-file= /var/run/mysqld/mysqld.pid
socket  = /var/run/mysqld/mysqld.sock
port= 3306
basedir = /usr
datadir = /database/mysql
tmpdir  = /tmp
language= /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address= 127.0.0.1
## All applications use 127.0.0.1 when connectiong to the db.

#
# * Fine Tuning
#
#key_buffer = 16M
max_allowed_packet  = 64M
thread_stack= 192K
#thread_cache_size   = 8

# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#
# * Query Cache Configuration
#
query_cache_limit   = 1M

#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#   other settings you may need to change.
#server-id  = 1
#log_bin= /var/log/mysql/mysql-bin.log
expire_logs_days= 10
max_binlog_size = 100M
#binlog_do_db   = include_database_name
#binlog_ignore_db   = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!

thread_cache_size = 192
table_cache = 768
## key_buffer = 64M
## sort_buffer_size = 256K
## read_buffer_size = 256K
## read_rnd_buffer_size = 256K
tmp_table_size=32M
max_heap_table_size=32M
query_cache_size=128M
query_cache_type=2

innodb_open_files=1000
innodb_buffer_pool_size = 28G
innodb_additional_mem_pool_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_support_xa = 0
innodb_lock_wait_timeout = 50
## innodb_flush_method=O_DIRECT
innodb_log_files_in_group = 2
## innodb_log_file_size = 128M
innodb_log_buffer_size = 8M
innodb_thread_concurrency = 14
innodb_file_per_table

max_connections = 100
binlog_cache_size   = 1M
sort_buffer_size= 16M
join_buffer_size= 16M
ft_min_word_len = 1
ft_max_word_len = 84
ft_stopword_file= ''
default_table_type  = InnoDB
key_buffer  = 2G
read_buffer_size= 2M
read_rnd_buffer_size= 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size   = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads   = 1
myisam_recover

[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab

Re: Lost connection to MySQL server - need help.

2013-10-12 Thread nixofortune

You might want to comment

bind-address= 127.0.0.1

in your my.cnf and restart mysql server.



On 12/10/13 10:49, Jørn Dahl-Stamnes wrote:

Hello,

I got a strange problem related to a production server. It has been working OK
for months, but yesterday it start to fail. There are several batch scripts
using the database in addition to a web application using it.

The php scripts running in batch mode began to get:

mysql_connect(): Lost connection to MySQL server at 'reading initial
communication packet', system error: 111

I stopped the server and restarted it and everything seems to work OK for
hours but when the load start to increase, the errors begin to appear again.

Today I noticed that after I starte phpMyAdmin and selected one of the
databases, phpMyAdmin was hanging and the batch scripts began to fail again.
Seems like the server does not handle much load anymore.


What's strange is the memory usage. The server is a quad core cpu with 48 Gb
memory, where 28 Gb is allocated to innodb (we mostly use innodb). But when
using top command, I noticed this:

VIRT: 33.9g
RES: 9.4g
SWAP: 23g

at this time over 11G memory is free. vm.swappiness is set to 0. I find it
strange that the server is not able to use physical memory but use swap
instead. The amount of cpu time used for swapping is rather high during sql
queries. The amount of RESident memory may increase slowly over time but very
slowly (it can take hours before it increase to 20+ Gb).

[PS: I also got a MySQL server running at a dedicated host at home, where the
it seem to use the memory as I except it to use:

   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  SWAP DATA COMMAND
  1462 mysql 20   0 30.0g  27g 3900 S  0.3 87.3   2633:14 844m  29g mysqld
]


I would like to have some suggestions what I can do to solve this problem.
I have google'd it but found nothing that seem to solve my case.

Server:
   OS: Debian 6
   MySQL: 5.1.61-0+squeeze1

my.cnf:
#
# The MySQL database server configuration file.
#

[client]
port= 3306
socket  = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld].
[mysqld_safe]
socket  = /var/run/mysqld/mysqld.sock
nice= 0

[mysqld]
#
# * Basic Settings
#
user= mysql
pid-file= /var/run/mysqld/mysqld.pid
socket  = /var/run/mysqld/mysqld.sock
port= 3306
basedir = /usr
datadir = /database/mysql
tmpdir  = /tmp
language= /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address= 127.0.0.1
## All applications use 127.0.0.1 when connectiong to the db.

#
# * Fine Tuning
#
#key_buffer = 16M
max_allowed_packet  = 64M
thread_stack= 192K
#thread_cache_size   = 8

# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#
# * Query Cache Configuration
#
query_cache_limit   = 1M

#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#   other settings you may need to change.
#server-id  = 1
#log_bin= /var/log/mysql/mysql-bin.log
expire_logs_days= 10
max_binlog_size = 100M
#binlog_do_db   = include_database_name
#binlog_ignore_db   = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!

thread_cache_size = 192
table_cache = 768
## key_buffer = 64M
## sort_buffer_size = 256K
## read_buffer_size = 256K
## read_rnd_buffer_size = 256K
tmp_table_size=32M
max_heap_table_size=32M
query_cache_size=128M
query_cache_type=2

innodb_open_files=1000
innodb_buffer_pool_size = 28G
innodb_additional_mem_pool_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_support_xa = 0
innodb_lock_wait_timeout = 50
## innodb_flush_method=O_DIRECT
innodb_log_files_in_group = 2
## innodb_log_file_size = 128M
innodb_log_buffer_size = 8M
innodb_thread_concurrency = 14
innodb_file_per_table

max_connections = 100
binlog_cache_size   = 1M
sort_buffer_size= 16M
join_buffer_size= 16M
ft_min_word_len = 1
ft_max_word_len = 84
ft_stopword_file= ''
default_table_type  = InnoDB
key_buffer  = 2G
read_buffer_size= 2M
read_rnd_buffer_size= 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size   = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads

Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Jørn Dahl-Stamnes
On Saturday 12 October 2013 12:01, nixofortune wrote:
 You might want to comment

 bind-address= 127.0.0.1

 in your my.cnf and restart mysql server.

It does not explain why it works under low load and not under high load.

However, I seem to have found something. When I started phpMyAdmin and 
selected one of the database, the server went away again and I found this 
in /var/log/syslog:

Oct 12 11:53:33 cebycny mysqld: 131012 11:53:33  InnoDB: Assertion failure in 
thread 140182892447488 in file ../../../storage/innobase/handler/ha_innodb.cc 
line
 8066
Oct 12 11:53:33 cebycny mysqld: InnoDB: Failing assertion: auto_inc  0
Oct 12 11:53:33 cebycny mysqld: InnoDB: We intentionally generate a memory 
trap.
Oct 12 11:53:33 cebycny mysqld: InnoDB: Submit a detailed bug report to 
http://bugs.mysql.com.
Oct 12 11:53:33 cebycny mysqld: InnoDB: If you get repeated assertion failures 
or crashes, even
Oct 12 11:53:33 cebycny mysqld: InnoDB: immediately after the mysqld startup, 
there may be
Oct 12 11:53:33 cebycny mysqld: InnoDB: corruption in the InnoDB tablespace. 
Please refer to
Oct 12 11:53:33 cebycny mysqld: InnoDB: 
http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html
Oct 12 11:53:33 cebycny mysqld: InnoDB: about forcing recovery.
Oct 12 11:53:33 cebycny mysqld: 09:53:33 UTC - mysqld got signal 6 ;
Oct 12 11:53:33 cebycny mysqld: This could be because you hit a bug. It is 
also possible that this binary
Oct 12 11:53:33 cebycny mysqld: or one of the libraries it was linked against 
is corrupt, improperly built,
Oct 12 11:53:33 cebycny mysqld: or misconfigured. This error can also be 
caused by malfunctioning hardware.
Oct 12 11:53:33 cebycny mysqld: We will try our best to scrape up some info 
that will hopefully help
Oct 12 11:53:33 cebycny mysqld: diagnose the problem, but since we have 
already crashed,
Oct 12 11:53:33 cebycny mysqld: something is definitely wrong and this may 
fail.
Oct 12 11:53:33 cebycny mysqld:
Oct 12 11:53:33 cebycny mysqld: key_buffer_size=2147483648
Oct 12 11:53:33 cebycny mysqld: read_buffer_size=2097152
Oct 12 11:53:33 cebycny mysqld: max_used_connections=8
Oct 12 11:53:33 cebycny mysqld: max_threads=100
Oct 12 11:53:33 cebycny mysqld: thread_count=2
Oct 12 11:53:33 cebycny mysqld: connection_count=2
Oct 12 11:53:33 cebycny mysqld: It is possible that mysqld could use up to
Oct 12 11:53:33 cebycny mysqld: key_buffer_size + (read_buffer_size + 
sort_buffer_size)*max_threads = 3941387 K  bytes of memory
Oct 12 11:53:33 cebycny mysqld: Hope that's ok; if not, decrease some 
variables in the equation.
Oct 12 11:53:33 cebycny mysqld:
Oct 12 11:53:33 cebycny mysqld: Thread pointer: 0x7f7f1bf997c0
Oct 12 11:53:33 cebycny mysqld: Attempting backtrace. You can use the 
following information to find out
Oct 12 11:53:33 cebycny mysqld: where mysqld died. If you see no messages 
after this, something went
Oct 12 11:53:33 cebycny mysqld: terribly wrong...
Oct 12 11:53:33 cebycny mysqld: stack_bottom = 7f7edf81fe88 thread_stack 
0x3
Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(my_print_stacktrace+0x29) 
[0x7f7edff62b59]
Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(handle_fatal_signal+0x483) 
[0x7f7edfd774a3]
Oct 12 11:53:33 cebycny mysqld: /lib/libpthread.so.0(+0xeff0) [0x7f7edf4c9ff0]
Oct 12 11:53:33 cebycny mysqld: /lib/libc.so.6(gsignal+0x35) [0x7f7eddf6c1b5]
Oct 12 11:53:33 cebycny mysqld: /lib/libc.so.6(abort+0x180) [0x7f7eddf6efc0]
Oct 12 11:53:33 cebycny 
mysqld: /usr/sbin/mysqld(ha_innobase::innobase_peek_autoinc()+0x8f) 
[0x7f7edfe1fa2f]
Oct 12 11:53:33 cebycny 
mysqld: /usr/sbin/mysqld(ha_innobase::info_low(unsigned int, bool)+0x18f) 
[0x7f7edfe2524f]
Oct 12 11:53:33 cebycny 
mysqld: 
/usr/sbin/mysqld(ha_innobase::update_create_info(st_ha_create_information*)+0x29)
 
[0x7f7edfe256b9]
Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(+0x49e3dc) [0x7f7edfd953dc]
Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(mysqld_show_create(THD*, 
TABLE_LIST*)+0x7a8) [0x7f7edfd9d388]
Oct 12 11:53:33 cebycny 
mysqld: /usr/sbin/mysqld(mysql_execute_command(THD*)+0x184a) [0x7f7edfc7cb0a]
Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(mysql_parse(THD*, char*, 
unsigned int, char const**)+0x3fb) [0x7f7edfc80dbb]
Oct 12 11:53:33 cebycny 
mysqld: /usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, 
unsigned int)+0x115a) [0x7f7edfc81f2a]
Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(do_command(THD*)+0xea) 
[0x7f7edfc8285a]
Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(handle_one_connection+0x235) 
[0x7f7edfc74435]
Oct 12 11:53:33 cebycny mysqld: /lib/libpthread.so.0(+0x68ca) [0x7f7edf4c18ca]
Oct 12 11:53:33 cebycny mysqld: /lib/libc.so.6(clone+0x6d) [0x7f7ede00992d]
Oct 12 11:53:33 cebycny mysqld:
Oct 12 11:53:33 cebycny mysqld: Trying to get some variables.
Oct 12 11:53:33 cebycny mysqld: Some pointers may be invalid and cause the 
dump to abort.
Oct 12 11:53:33 cebycny mysqld: Query (7f7f1c0dcbc0): SHOW CREATE TABLE 
`calculation`
Oct 12

Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Andrew Moore
Could be a crash related to innodb data dictionary being out of sync. Could
be a bug.

http://bugs.mysql.com/bug.php?id=55277
On 12 Oct 2013 11:21, Jørn Dahl-Stamnes sq...@dahl-stamnes.net wrote:

 On Saturday 12 October 2013 12:01, nixofortune wrote:
  You might want to comment
 
  bind-address= 127.0.0.1
 
  in your my.cnf and restart mysql server.

 It does not explain why it works under low load and not under high load.

 However, I seem to have found something. When I started phpMyAdmin and
 selected one of the database, the server went away again and I found this
 in /var/log/syslog:

 Oct 12 11:53:33 cebycny mysqld: 131012 11:53:33  InnoDB: Assertion failure
 in
 thread 140182892447488 in file
 ../../../storage/innobase/handler/ha_innodb.cc
 line
  8066
 Oct 12 11:53:33 cebycny mysqld: InnoDB: Failing assertion: auto_inc  0
 Oct 12 11:53:33 cebycny mysqld: InnoDB: We intentionally generate a memory
 trap.
 Oct 12 11:53:33 cebycny mysqld: InnoDB: Submit a detailed bug report to
 http://bugs.mysql.com.
 Oct 12 11:53:33 cebycny mysqld: InnoDB: If you get repeated assertion
 failures
 or crashes, even
 Oct 12 11:53:33 cebycny mysqld: InnoDB: immediately after the mysqld
 startup,
 there may be
 Oct 12 11:53:33 cebycny mysqld: InnoDB: corruption in the InnoDB
 tablespace.
 Please refer to
 Oct 12 11:53:33 cebycny mysqld: InnoDB:
 http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html
 Oct 12 11:53:33 cebycny mysqld: InnoDB: about forcing recovery.
 Oct 12 11:53:33 cebycny mysqld: 09:53:33 UTC - mysqld got signal 6 ;
 Oct 12 11:53:33 cebycny mysqld: This could be because you hit a bug. It is
 also possible that this binary
 Oct 12 11:53:33 cebycny mysqld: or one of the libraries it was linked
 against
 is corrupt, improperly built,
 Oct 12 11:53:33 cebycny mysqld: or misconfigured. This error can also be
 caused by malfunctioning hardware.
 Oct 12 11:53:33 cebycny mysqld: We will try our best to scrape up some info
 that will hopefully help
 Oct 12 11:53:33 cebycny mysqld: diagnose the problem, but since we have
 already crashed,
 Oct 12 11:53:33 cebycny mysqld: something is definitely wrong and this may
 fail.
 Oct 12 11:53:33 cebycny mysqld:
 Oct 12 11:53:33 cebycny mysqld: key_buffer_size=2147483648
 Oct 12 11:53:33 cebycny mysqld: read_buffer_size=2097152
 Oct 12 11:53:33 cebycny mysqld: max_used_connections=8
 Oct 12 11:53:33 cebycny mysqld: max_threads=100
 Oct 12 11:53:33 cebycny mysqld: thread_count=2
 Oct 12 11:53:33 cebycny mysqld: connection_count=2
 Oct 12 11:53:33 cebycny mysqld: It is possible that mysqld could use up to
 Oct 12 11:53:33 cebycny mysqld: key_buffer_size + (read_buffer_size +
 sort_buffer_size)*max_threads = 3941387 K  bytes of memory
 Oct 12 11:53:33 cebycny mysqld: Hope that's ok; if not, decrease some
 variables in the equation.
 Oct 12 11:53:33 cebycny mysqld:
 Oct 12 11:53:33 cebycny mysqld: Thread pointer: 0x7f7f1bf997c0
 Oct 12 11:53:33 cebycny mysqld: Attempting backtrace. You can use the
 following information to find out
 Oct 12 11:53:33 cebycny mysqld: where mysqld died. If you see no messages
 after this, something went
 Oct 12 11:53:33 cebycny mysqld: terribly wrong...
 Oct 12 11:53:33 cebycny mysqld: stack_bottom = 7f7edf81fe88 thread_stack
 0x3
 Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(my_print_stacktrace+0x29)
 [0x7f7edff62b59]
 Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(handle_fatal_signal+0x483)
 [0x7f7edfd774a3]
 Oct 12 11:53:33 cebycny mysqld: /lib/libpthread.so.0(+0xeff0)
 [0x7f7edf4c9ff0]
 Oct 12 11:53:33 cebycny mysqld: /lib/libc.so.6(gsignal+0x35)
 [0x7f7eddf6c1b5]
 Oct 12 11:53:33 cebycny mysqld: /lib/libc.so.6(abort+0x180)
 [0x7f7eddf6efc0]
 Oct 12 11:53:33 cebycny
 mysqld: /usr/sbin/mysqld(ha_innobase::innobase_peek_autoinc()+0x8f)
 [0x7f7edfe1fa2f]
 Oct 12 11:53:33 cebycny
 mysqld: /usr/sbin/mysqld(ha_innobase::info_low(unsigned int, bool)+0x18f)
 [0x7f7edfe2524f]
 Oct 12 11:53:33 cebycny
 mysqld:
 /usr/sbin/mysqld(ha_innobase::update_create_info(st_ha_create_information*)+0x29)
 [0x7f7edfe256b9]
 Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(+0x49e3dc)
 [0x7f7edfd953dc]
 Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(mysqld_show_create(THD*,
 TABLE_LIST*)+0x7a8) [0x7f7edfd9d388]
 Oct 12 11:53:33 cebycny
 mysqld: /usr/sbin/mysqld(mysql_execute_command(THD*)+0x184a)
 [0x7f7edfc7cb0a]
 Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(mysql_parse(THD*, char*,
 unsigned int, char const**)+0x3fb) [0x7f7edfc80dbb]
 Oct 12 11:53:33 cebycny
 mysqld: /usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*,
 unsigned int)+0x115a) [0x7f7edfc81f2a]
 Oct 12 11:53:33 cebycny mysqld: /usr/sbin/mysqld(do_command(THD*)+0xea)
 [0x7f7edfc8285a]
 Oct 12 11:53:33 cebycny mysqld:
 /usr/sbin/mysqld(handle_one_connection+0x235)
 [0x7f7edfc74435]
 Oct 12 11:53:33 cebycny mysqld: /lib/libpthread.so.0(+0x68ca)
 [0x7f7edf4c18ca]
 Oct 12 11:53:33 cebycny mysqld: /lib/libc.so.6(clone+0x6d) [0x7f7ede00992d]
 Oct 12 11:53

Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Jørn Dahl-Stamnes
On Saturday 12 October 2013 13:07, Andrew Moore wrote:
 Could be a crash related to innodb data dictionary being out of sync. Could
 be a bug.

Seems like a bug yes. However, we had a strange situation yesterday when we 
had several processes in the state copying to tmp table (if i remember the 
exact phrase). After witing 2 seconds, I restarted the server. It seemed 
to work OK until the backup started.

Perhaps we should restore the database that I suspect cause this, in order to 
rebuild the complete database.

-- 
Jørn Dahl-Stamnes
homepage: http://photo.dahl-stamnes.net/

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



Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Reindl Harald


Am 12.10.2013 17:02, schrieb Jørn Dahl-Stamnes:
 On Saturday 12 October 2013 13:07, Andrew Moore wrote:
 Could be a crash related to innodb data dictionary being out of sync. Could
 be a bug.
 
 Seems like a bug yes. However, we had a strange situation yesterday when we 
 had several processes in the state copying to tmp table (if i remember the 
 exact phrase). After witing 2 seconds, I restarted the server. It seemed 
 to work OK until the backup started

so someone did optimize table on a large table
you do yourself not a favour restarting the server in such a moment



signature.asc
Description: OpenPGP digital signature


Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Jørn Dahl-Stamnes
On Saturday 12 October 2013 17:36, Reindl Harald wrote:
 so someone did optimize table on a large table
 you do yourself not a favour restarting the server in such a moment

7 hours before the server was shut down, we did a alter table to add a primary 
key to a table that is read-only from the web application.

-- 
Jørn Dahl-Stamnes
homepage: http://photo.dahl-stamnes.net/

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



Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Reindl Harald


Am 12.10.2013 19:45, schrieb Jørn Dahl-Stamnes:
 On Saturday 12 October 2013 17:36, Reindl Harald wrote:
 so someone did optimize table on a large table
 you do yourself not a favour restarting the server in such a moment
 
 7 hours before the server was shut down, we did a alter table to add a 
 primary 
 key to a table that is read-only from the web application.

which means the table is most likely completly copied
in a temp file and depending on the table size this
takes time - you killed the alter table i guess



signature.asc
Description: OpenPGP digital signature


Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Chris McKeever
We had a similar issue a bit back - and although it sounds similar - based
on your followups it probably isnt, but will just toss this out there
anyhows.  We were experiencing connection timeouts when load would ramp up.
 Doing some digging we learned that our firewall between the servers
bandwidth would get consumed by a large wordpress load - and this in
essence backed up the rest of the requests until they timed out.

We fixed that load issue which reduced the data passing through and have
expereinced a significant performance boost in our app let alone reduction
of these timeout issues




On Sat, Oct 12, 2013 at 12:56 PM, Reindl Harald h.rei...@thelounge.netwrote:



 Am 12.10.2013 19:45, schrieb Jørn Dahl-Stamnes:
  On Saturday 12 October 2013 17:36, Reindl Harald wrote:
  so someone did optimize table on a large table
  you do yourself not a favour restarting the server in such a moment
 
  7 hours before the server was shut down, we did a alter table to add a
 primary
  key to a table that is read-only from the web application.

 which means the table is most likely completly copied
 in a temp file and depending on the table size this
 takes time - you killed the alter table i guess




Re: Lost connection to MySQL server - need help.

2013-10-12 Thread Reindl Harald
sounds like a scheduler issue

did you try deadline?
http://en.wikipedia.org/wiki/Deadline_scheduler

on Linux systems pass elevator=deadline as kernel param

Am 12.10.2013 20:58, schrieb Chris McKeever:
 We had a similar issue a bit back - and although it sounds similar - based
 on your followups it probably isnt, but will just toss this out there
 anyhows.  We were experiencing connection timeouts when load would ramp up.
  Doing some digging we learned that our firewall between the servers
 bandwidth would get consumed by a large wordpress load - and this in
 essence backed up the rest of the requests until they timed out.
 
 We fixed that load issue which reduced the data passing through and have
 expereinced a significant performance boost in our app let alone reduction
 of these timeout issues
 
 On Sat, Oct 12, 2013 at 12:56 PM, Reindl Harald h.rei...@thelounge.netwrote:
 


 Am 12.10.2013 19:45, schrieb Jørn Dahl-Stamnes:
 On Saturday 12 October 2013 17:36, Reindl Harald wrote:
 so someone did optimize table on a large table
 you do yourself not a favour restarting the server in such a moment

 7 hours before the server was shut down, we did a alter table to add a
 primary
 key to a table that is read-only from the web application.

 which means the table is most likely completly copied
 in a temp file and depending on the table size this
 takes time - you killed the alter table i guess




signature.asc
Description: OpenPGP digital signature


Why ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72' (111)?

2013-06-13 Thread lx
hi all:
  I'm a new one. I have a mysql server in 192.168.27.72 , and a mysql
client in 192.168.23.73.
I use this way:
 mysql -h 192.168.27.72 -u root -p

the ERROR message is:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72' (111)

#
mysql select host, user, password from user;
+-+--+---+
| host| user | password
 |
+-+--+---+
| localhost   | root | 023c30696e164488
 |
| vps192168027072 | root |
  |
| 127.0.0.1   | root |
  |
| localhost   |  |
  |
| vps192168027072 |  |
  |
| localhost   | monty| 0fc756bc026507b2
 |
| %   | monty| 0fc756bc026507b2
 |
| localhost   | gdnscenter   | 184a22a73852ad5b
 |
| %   | gdns_replication | 2dbc2f8719c4ffcd
 |
| %   | root | 023c30696e164488
 |
| 192.168.23.73   | root |
*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
| 0.0.0.0 | root |
*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
+-+--+---+
12 rows in set (0.00 sec)
#

And in 192.168.27.72
#
service iptables status
Firewall is stopped.
#

and there are not bind-address  and skip_networking in my.cnf 。


I have installed the mysql in this way:
#
yum -y install mysql-server

#vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
default-character-set = utf8


[mysql]
default-character-set = utf8


[root@sample ~]# chkconfig mysqld on
[root@sample ~]# chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off


chattr -i /etc/group
chattr -i /etc/passwd
chattr -i /etc/shadow
chattr -i /etc/gshadow
useradd mysql
chattr +i /etc/group
chattr +i /etc/passwd
chattr +i /etc/shadow
chattr +i /etc/gshadow


chown mysql /var/run/mysqld/

cd /var/lib/mysql
chown mysql -R *
cd �C


mysql_install_db --user=mysql --ldata=/var/lib/mysql


[root@sample ~]# /etc/rc.d/init.d/mysqld start

#


Thank you


Re: Why ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72' (111)?

2013-06-13 Thread Johan De Meersman
Assuming Linux, check where it's listening using netstat -lptn.

lx lxlenovos...@gmail.com wrote:
hi all:
I'm a new one. I have a mysql server in 192.168.27.72 , and a mysql
client in 192.168.23.73.
I use this way:
 mysql -h 192.168.27.72 -u root -p

the ERROR message is:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72'
(111)

#
mysql select host, user, password from user;
+-+--+---+
| host| user | password
 |
+-+--+---+
| localhost   | root | 023c30696e164488
 |
| vps192168027072 | root |
  |
| 127.0.0.1   | root |
  |
| localhost   |  |
  |
| vps192168027072 |  |
  |
| localhost   | monty| 0fc756bc026507b2
 |
| %   | monty| 0fc756bc026507b2
 |
| localhost   | gdnscenter   | 184a22a73852ad5b
 |
| %   | gdns_replication | 2dbc2f8719c4ffcd
 |
| %   | root | 023c30696e164488
 |
| 192.168.23.73   | root |
*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
| 0.0.0.0 | root |
*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
+-+--+---+
12 rows in set (0.00 sec)
#

And in 192.168.27.72
#
service iptables status
Firewall is stopped.
#

and there are not bind-address  and skip_networking in my.cnf 。


I have installed the mysql in this way:
#
yum -y install mysql-server

#vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
default-character-set = utf8


[mysql]
default-character-set = utf8


[root@sample ~]# chkconfig mysqld on
[root@sample ~]# chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off


chattr -i /etc/group
chattr -i /etc/passwd
chattr -i /etc/shadow
chattr -i /etc/gshadow
useradd mysql
chattr +i /etc/group
chattr +i /etc/passwd
chattr +i /etc/shadow
chattr +i /etc/gshadow


chown mysql /var/run/mysqld/

cd /var/lib/mysql
chown mysql -R *
cd –


mysql_install_db --user=mysql --ldata=/var/lib/mysql


[root@sample ~]# /etc/rc.d/init.d/mysqld start

#


Thank you

-- 
Sent from Kaiten Mail. Please excuse my brevity.

Re: Mysql server - which filesystem to choose? Is it really that important nowadays?

2013-05-23 Thread Manuel Arostegui
2013/5/22 Tim Callaghan tmcallag...@gmail.com

 Rafal,

 I don't believe TRIM is supported for XFS.


I tried this two weeks ago and worked pretty well:
http://xfs.org/index.php/FITRIM/discard

Manuel.


Re: Mysql server - which filesystem to choose? Is it really that important nowadays?

2013-05-23 Thread Johan De Meersman
- Original Message -
 From: Rick James rja...@yahoo-inc.com
 Subject: RE: Mysql server - which filesystem to choose? Is it really that 
 important nowadays?
 
 ext does less well with simultaneous IOPs than xfs.

Possibly, but how much less (and which ext)? Without numbers that's not very 
helpful :-)

I think that the underlying FS is only a major concern in setups where the load 
is explicitly I/O-bound - that is to say, where the active dataset is 
significantly larger than the available memory. I do not think the majority of 
installations match that description.


-- 
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: Mysql server - which filesystem to choose? Is it really that important nowadays?

2013-05-23 Thread Tim Callaghan
Thanks for the information, I'll give it a try myself.


On Thu, May 23, 2013 at 5:02 AM, Manuel Arostegui man...@tuenti.com wrote:




 2013/5/22 Tim Callaghan tmcallag...@gmail.com

 Rafal,

 I don't believe TRIM is supported for XFS.


 I tried this two weeks ago and worked pretty well:
 http://xfs.org/index.php/FITRIM/discard

 Manuel.



Mysql server - which filesystem to choose? Is it really that important nowadays?

2013-05-22 Thread Rafał Radecki
Hi All.

I use mysql/perconna/maria on my production CentOS 6 Linux servers. I
currently try to choose the default filesystem for partitions with mysql
data. Some time ago (previous dba) reiserfs was the choice but now it is
not in the kernel and the main author is in prison.

From what I've read xfs and ext4 are valid choices and performance
benchmarks over the web show that they are comparable (no clear winner).
I've also read that with every new kernel there can be changes in
performance in every filesystem ( for example
http://gtowey.blogspot.com/2013/02/serious-xfs-performance-regression-in.html
 ).

From your experiences: which filesystem to choose for a mysql db? Is ext4
or xfs better? Or is it more a case of proper filesystem tuning to my
workload? Any articles worth reading which you can recommend?

Best regards,
Rafal.


Re: Mysql server - which filesystem to choose? Is it really that important nowadays?

2013-05-22 Thread Manuel Arostegui
2013/5/22 Rafał Radecki radecki.ra...@gmail.com

 Hi All.

 I use mysql/perconna/maria on my production CentOS 6 Linux servers. I
 currently try to choose the default filesystem for partitions with mysql
 data. Some time ago (previous dba) reiserfs was the choice but now it is
 not in the kernel and the main author is in prison.

 From what I've read xfs and ext4 are valid choices and performance
 benchmarks over the web show that they are comparable (no clear winner).
 I've also read that with every new kernel there can be changes in
 performance in every filesystem ( for example

 http://gtowey.blogspot.com/2013/02/serious-xfs-performance-regression-in.html
  ).

 From your experiences: which filesystem to choose for a mysql db? Is ext4
 or xfs better? Or is it more a case of proper filesystem tuning to my
 workload? Any articles worth reading which you can recommend?


Hi Rafal,

I guess it really depends on your workload, your HW, kernel etc.
From my experience, having XFS with lazy-count=1 and kernels 2.6.31.X gives
better performance in our HW RAID 10 + BBU servers. We do have this
configuration in around 200 DBs without any stability issue.
I still have pending to test ext4/xfs with 3.2.X kernels...

Manuel.


Re: Mysql server - which filesystem to choose? Is it really that important nowadays?

2013-05-22 Thread Tim Callaghan
Rafal,

I benchmark a lot on various hardware and software configurations.  When I
started 2 years back I went along with the general consensus that XFS is
faster than ext4 for MySQL.  I recently had the opportunity to see how much
of a difference, if any, it made.  I didn't find much, especially on SSD.

The benefit of ext4 on SSD (on newer kernels) is that it supports the TRIM
functionality (add discard to your /etc/fstab file for the particular file
system).  I don't believe TRIM is supported for XFS.

-Tim



On Wed, May 22, 2013 at 2:55 AM, Rafał Radecki radecki.ra...@gmail.comwrote:

 Hi All.

 I use mysql/perconna/maria on my production CentOS 6 Linux servers. I
 currently try to choose the default filesystem for partitions with mysql
 data. Some time ago (previous dba) reiserfs was the choice but now it is
 not in the kernel and the main author is in prison.

 From what I've read xfs and ext4 are valid choices and performance
 benchmarks over the web show that they are comparable (no clear winner).
 I've also read that with every new kernel there can be changes in
 performance in every filesystem ( for example

 http://gtowey.blogspot.com/2013/02/serious-xfs-performance-regression-in.html
  ).

 From your experiences: which filesystem to choose for a mysql db? Is ext4
 or xfs better? Or is it more a case of proper filesystem tuning to my
 workload? Any articles worth reading which you can recommend?

 Best regards,
 Rafal.



RE: Mysql server - which filesystem to choose? Is it really that important nowadays?

2013-05-22 Thread Rick James
ext does less well with simultaneous IOPs than xfs.

 -Original Message-
 From: Manuel Arostegui [mailto:man...@tuenti.com]
 Sent: Wednesday, May 22, 2013 12:22 AM
 To: Rafał Radecki
 Cc: mysql@lists.mysql.com
 Subject: Re: Mysql server - which filesystem to choose? Is it really
 that important nowadays?
 
 2013/5/22 Rafał Radecki radecki.ra...@gmail.com
 
  Hi All.
 
  I use mysql/perconna/maria on my production CentOS 6 Linux servers. I
  currently try to choose the default filesystem for partitions with
  mysql data. Some time ago (previous dba) reiserfs was the choice but
  now it is not in the kernel and the main author is in prison.
 
  From what I've read xfs and ext4 are valid choices and performance
  benchmarks over the web show that they are comparable (no clear
 winner).
  I've also read that with every new kernel there can be changes in
  performance in every filesystem ( for example
 
  http://gtowey.blogspot.com/2013/02/serious-xfs-performance-
 regression-
  in.html
   ).
 
  From your experiences: which filesystem to choose for a mysql db? Is
  ext4 or xfs better? Or is it more a case of proper filesystem tuning
  to my workload? Any articles worth reading which you can recommend?
 
 
 Hi Rafal,
 
 I guess it really depends on your workload, your HW, kernel etc.
 From my experience, having XFS with lazy-count=1 and kernels 2.6.31.X
 gives better performance in our HW RAID 10 + BBU servers. We do have
 this configuration in around 200 DBs without any stability issue.
 I still have pending to test ext4/xfs with 3.2.X kernels...
 
 Manuel.

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



Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-08-01 Thread Fred G
Hi Monty,

First of all, thanks so much for responding to my question! I am using
MySQLworkbench 5.2.37CE.  I'm pretty sure the issue has to do with
something on the administrator side of things. We managed to get it so that
I can click the icon to export the file, but he's still working on getting
it so that we can write an sql query to do this. So for all practical
purposes on my end, the question is being resolved.

But I don't understand how clicking the icon after running a select query
works for exporting, but the command to outfile in a sql query would not
work.

Thanks again

On Tue, Jul 31, 2012 at 5:36 AM, Michael Widenius mo...@askmonty.orgwrote:


 Hi!

  Fred == Fred G Fred writes:

 Fred Thanks Dhaval.  Putting the join condition before INTO outfile
 doesn't seem
 Fred to work, either.

 Fred When I try to use the same outfile name 'test123.csv' I get Error
 Code:
 Fred 1086 File 'test123.csv' already exists.  But then when I try to find
 the
 Fred csv file on my computer, there is a folder with that name, but weird
 files
 Fred in it, none of which are a csv-- and certainly not in the location
 that I
 Fred thought it would be (the same directory that the .sql query is in).

 It's the mysqld server that is writing the .csv file. This means that
 the path is related to the mysql data directory and not to where your
 .sql file is.

 When using select into outfile it's always best to give a full path!


 Fred  Additionally, when I try to identify a different path, such as
 'C:\\' etc,
 Fred I get an error.  This error is: Error Code: 1. Can't create/write to
 file
 Fred C:\test123.csv(Errocde: 2).

 This probably means that you don't have write access to C:\


 Fred I tried running the query outputting to a different named .csv file,
 but it
 Fred is still just running... and seems like it was like yesterday
 where after
 Fred 10 minutes I will get the Error that the MySQL connection was lost.

 The reason that your connection is lost are ether:
 - There is timeout in the client you are using
   (The server never gives a timeout for running queries).
 - The mysqld server died (not likely but possible).
 - Some process in your system is killing quries that runs too long.

 One way to quickly check that things are working are by adding LIMIT 1
 to the query.

 Fred Does anyone have an idea of what is going on?

  The query without exporting the file works fine, in about 12 sec/77
 sec.
  I
  read online how to export MySQL queries into csv's, and I'm not sure
 what
  I
  am doing wrong.  I keep getting the error:
  Error Code: 2013.  Lost connection to MySQL server during query, where
 the
  duration/fetch values are 600.547 sec (~10 minutes).

 What is the exact error message?
 Which client are you using to do the query?

 It's strange that the query works fine when you are not using select
 into outfile.

 What MySQL version are you using

 Regards,
 Monty
 Creator of MySQL and MariaDB



Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-31 Thread Michael Widenius

Hi!

 Fred == Fred G Fred writes:

Fred Thanks Dhaval.  Putting the join condition before INTO outfile doesn't 
seem
Fred to work, either.

Fred When I try to use the same outfile name 'test123.csv' I get Error Code:
Fred 1086 File 'test123.csv' already exists.  But then when I try to find the
Fred csv file on my computer, there is a folder with that name, but weird files
Fred in it, none of which are a csv-- and certainly not in the location that I
Fred thought it would be (the same directory that the .sql query is in).

It's the mysqld server that is writing the .csv file. This means that
the path is related to the mysql data directory and not to where your
.sql file is.

When using select into outfile it's always best to give a full path!


Fred  Additionally, when I try to identify a different path, such as 'C:\\' 
etc,
Fred I get an error.  This error is: Error Code: 1. Can't create/write to file
Fred C:\test123.csv(Errocde: 2).

This probably means that you don't have write access to C:\


Fred I tried running the query outputting to a different named .csv file, but 
it
Fred is still just running... and seems like it was like yesterday where 
after
Fred 10 minutes I will get the Error that the MySQL connection was lost.

The reason that your connection is lost are ether:
- There is timeout in the client you are using
  (The server never gives a timeout for running queries).
- The mysqld server died (not likely but possible).
- Some process in your system is killing quries that runs too long.

One way to quickly check that things are working are by adding LIMIT 1
to the query.

Fred Does anyone have an idea of what is going on?

 The query without exporting the file works fine, in about 12 sec/77 sec.
 I
 read online how to export MySQL queries into csv's, and I'm not sure what
 I
 am doing wrong.  I keep getting the error:
 Error Code: 2013.  Lost connection to MySQL server during query, where the
 duration/fetch values are 600.547 sec (~10 minutes).

What is the exact error message?
Which client are you using to do the query?

It's strange that the query works fine when you are not using select
into outfile.

What MySQL version are you using

Regards,
Monty
Creator of MySQL and MariaDB

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



Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-26 Thread Fred G
Thanks Dhaval.  Putting the join condition before INTO outfile doesn't seem
to work, either.

When I try to use the same outfile name 'test123.csv' I get Error Code:
1086 File 'test123.csv' already exists.  But then when I try to find the
csv file on my computer, there is a folder with that name, but weird files
in it, none of which are a csv-- and certainly not in the location that I
thought it would be (the same directory that the .sql query is in).
 Additionally, when I try to identify a different path, such as 'C:\\' etc,
I get an error.  This error is: Error Code: 1. Can't create/write to file
C:\test123.csv(Errocde: 2).

I tried running the query outputting to a different named .csv file, but it
is still just running... and seems like it was like yesterday where after
10 minutes I will get the Error that the MySQL connection was lost.

Does anyone have an idea of what is going on?

On Wed, Jul 25, 2012 at 9:22 PM, Dhaval Jaiswal dhaval.jais...@via.comwrote:

 SELECT * FROM test INTO OUTFILE '/home/test.csv' FIELDS TERMINATED BY ','
 ENCLOSED BY '' LINES TERMINATED BY '\n'

 as above give your join condition before INTO OUTFILE.



 On Thu, Jul 26, 2012 at 1:32 AM, Fred G bayespoker...@gmail.com wrote:

 Hi--

 I'm trying to do the following:
 SELECT db.emp.emp_fname, db.emp.emp_fname, db.sale.sale_date,
 db.sale.sale_no, db.sale.sale_total_amt
 into outfile 'test123.csv'
 FIELDS terminated by ','
 FROM db.emp
 LEFT OUTER JOIN db.sale
 ON db.sale.emp_id = db.emp.emp_id;

 The query without exporting the file works fine, in about 12 sec/77 sec.
  I
 read online how to export MySQL queries into csv's, and I'm not sure what
 I
 am doing wrong.  I keep getting the error:
 Error Code: 2013.  Lost connection to MySQL server during query, where the
 duration/fetch values are 600.547 sec (~10 minutes).

 I'm wondering:
 a) What is going on?
 b) How do I fix it?

 Thanks so much!!




 --

 [image: Inline image 2] http://www.via.com/

 *Dhaval* | Database  System

 *E:* dhaval.jais...@via.com ra...@via.com| *T:* 080 4043 3000 | *M:* +91
 - 8095 397 843

 [image: all-icon.jpg] http://www.via.com/




Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-26 Thread hsv
 2012/07/26 06:52 +0530, Dhaval Jaiswal 
SELECT * FROM test INTO OUTFILE '/home/test.csv' FIELDS TERMINATED BY ',' 
ENCLOSED BY '' LINES TERMINATED BY '\n'

as above give your join condition before INTO OUTFILE.

Right: MySQL server writes into some directory where it is, not where MySQL 
client is. If less than a full path name is given, almost certainly the server 
will attempt to write into a directory to which it has no permission, and 
almost certainly also not into one that you want it to write into. If server 
and client run on separate machines with separate disks, there is no means 
through OUTFILE of there setting the output where the client is, only through 
client s standard output, where you get no choice of field separator, line 
separator, or field-quote character (there is none), although you can keep or 
skip the column names (-N for skipping them), and suppress the one-character 
escape character (-r), same as FIELDS ESCAPED BY ''. There is no means of 
skipping NULL or \N for nulls, which is not CSV format.

And if your MySQL is under Windows, be sure to read all instructions about 
entering full pathnames. It is best to avoid the backslash (\), because that is 
a C-escape introduced (along with much other C-stuff) into SQL s original PL1.


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



Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-26 Thread Fred G
Thanks!

On Thu, Jul 26, 2012 at 12:05 AM, h...@tbbs.net wrote:

  2012/07/26 06:52 +0530, Dhaval Jaiswal 
 SELECT * FROM test INTO OUTFILE '/home/test.csv' FIELDS TERMINATED BY ','
 ENCLOSED BY '' LINES TERMINATED BY '\n'

 as above give your join condition before INTO OUTFILE.
 
 Right: MySQL server writes into some directory where it is, not where
 MySQL client is. If less than a full path name is given, almost certainly
 the server will attempt to write into a directory to which it has no
 permission, and almost certainly also not into one that you want it to
 write into. If server and client run on separate machines with separate
 disks, there is no means through OUTFILE of there setting the output where
 the client is, only through client s standard output, where you get no
 choice of field separator, line separator, or field-quote character (there
 is none), although you can keep or skip the column names (-N for skipping
 them), and suppress the one-character escape character (-r), same as FIELDS
 ESCAPED BY ''. There is no means of skipping NULL or \N for nulls,
 which is not CSV format.

 And if your MySQL is under Windows, be sure to read all instructions about
 entering full pathnames. It is best to avoid the backslash (\), because
 that is a C-escape introduced (along with much other C-stuff) into SQL s
 original PL1.


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




Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-25 Thread Fred G
Hi--

I'm trying to do the following:
SELECT db.emp.emp_fname, db.emp.emp_fname, db.sale.sale_date,
db.sale.sale_no, db.sale.sale_total_amt
into outfile 'test123.csv'
FIELDS terminated by ','
FROM db.emp
LEFT OUTER JOIN db.sale
ON db.sale.emp_id = db.emp.emp_id;

The query without exporting the file works fine, in about 12 sec/77 sec.  I
read online how to export MySQL queries into csv's, and I'm not sure what I
am doing wrong.  I keep getting the error:
Error Code: 2013.  Lost connection to MySQL server during query, where the
duration/fetch values are 600.547 sec (~10 minutes).

I'm wondering:
a) What is going on?
b) How do I fix it?

Thanks so much!!


Re: Exporting to CSV. Error Code: 2013. Lost connection to MySQL server during query

2012-07-25 Thread Dhaval Jaiswal
SELECT * FROM test INTO OUTFILE '/home/test.csv' FIELDS TERMINATED BY ','
ENCLOSED BY '' LINES TERMINATED BY '\n'

as above give your join condition before INTO OUTFILE.


On Thu, Jul 26, 2012 at 1:32 AM, Fred G bayespoker...@gmail.com wrote:

 Hi--

 I'm trying to do the following:
 SELECT db.emp.emp_fname, db.emp.emp_fname, db.sale.sale_date,
 db.sale.sale_no, db.sale.sale_total_amt
 into outfile 'test123.csv'
 FIELDS terminated by ','
 FROM db.emp
 LEFT OUTER JOIN db.sale
 ON db.sale.emp_id = db.emp.emp_id;

 The query without exporting the file works fine, in about 12 sec/77 sec.  I
 read online how to export MySQL queries into csv's, and I'm not sure what I
 am doing wrong.  I keep getting the error:
 Error Code: 2013.  Lost connection to MySQL server during query, where the
 duration/fetch values are 600.547 sec (~10 minutes).

 I'm wondering:
 a) What is going on?
 b) How do I fix it?

 Thanks so much!!




-- 

[image: Inline image 2] http://www.via.com/

*Dhaval* | Database  System

*E:* dhaval.jais...@via.com ra...@via.com| *T:* 080 4043 3000 | *M:* +91
- 8095 397 843

[image: all-icon.jpg] http://www.via.com/


Re: i need advice on redundancy of mysql server.

2012-06-14 Thread Joey L
Guys - thanks for the replys - do any of you guys are on odesk or elancer.com ??
thanks

On Wed, Jun 13, 2012 at 7:28 PM, Rick James rja...@yahoo-inc.com wrote:
 I prefer:
 * Master-Master (dual master) but write to only one of them.  (Writing to 
 both can lead to duplicate keys, etc., unless you are very careful in your 
 code.)
 * Have the two Masters geographically separate.  (Think tornados, floods, 
 earthquakes, etc)
 * Have Slave(s) hanging of each master -- (1) for read scaling, and (2) to 
 avoid a major outage when one Master goes down and you need to take the other 
 one down to clone it.

 Another thing to consider:
 Backing up via a LVM snapshot requires only a minute or so of downtime, 
 regardless of dataset size.
 Percona's XtraBackup is also very good.

 I also agree that MyISAM in not best.  But, caution, InnoDB's disk footprint 
 is 2x=3x bigger than MyISAM's.

 You can Load Balance reads (among slaves and, optionally, masters); you 
 cannot do writes.

 Any number of Apache servers can talk to MySQL.  But watch out -- MaxClients 
 should not be so large that it swamps max_connections.

 Load balancing:
 DNS is the simple way to load balance Apache.
 There are low-impact software solutions.
 There are hardware solutions.  (This is what I am used to at work; it is 
 severe overkill for most users.)

 Bottom line:  There is no best or perfect solution.  First decide what 
 'keeps you up at night'.

 -Original Message-
 From: Joey L [mailto:mjh2...@gmail.com]
 Sent: Monday, June 11, 2012 7:26 AM
 To: mysql@lists.mysql.com
 Subject: i need advice on redundancy of mysql server.

 I am running a site with about 50gig myisam databases which are the
 backend to different websites.
 I can not afford any downtime and the data is realtime.

 What is the best method for this setup? master-master or master-slave?

 What are the best utilities to create and maintain this setup?  as far
 as load balancing between the two physical servers that i am running.
 I am currently working with percona utilities - is there something
 better ?
 what would you use to load balance mysql ? what would you use to load
 balance apache.


 thanks

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


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



Re: i need advice on redundancy of mysql server.

2012-06-13 Thread Johan De Meersman
- Original Message -
 From: Joey L mjh2...@gmail.com
 
 It sounds like you are all consultants.

Hehe. I'm not :-p

A lot are, though, because the combined technical knowledge on this list draws 
in consultants looking for stuff, and having experienced consultants on the 
list in turn heightens the combined technical knowledge again.


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

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



Re: i need advice on redundancy of mysql server.

2012-06-13 Thread Prabhat Kumar
Does really Master-Master replication provide load balancing feature?
since, each node need to replicate to other node, and MySQL replication
still a is single threaded replication , it mean there is only single
replication thread  sql_thread for DML queries.

eg.

There is two node with master master replication - Master -1  Master 2.

  *app1 --read/write* --- *Master 1 --* single thread*-- Master 2*
--- *read/write
-- app1*

Its just a *high availability* not a load balancing*.*

Thanks,
On Wed, Jun 13, 2012 at 2:33 AM, Johan De Meersman vegiv...@tuxera.bewrote:

 - Original Message -
  From: Joey L mjh2...@gmail.com
 
  It sounds like you are all consultants.

 Hehe. I'm not :-p

 A lot are, though, because the combined technical knowledge on this list
 draws in consultants looking for stuff, and having experienced consultants
 on the list in turn heightens the combined technical knowledge again.


 --
 Bier met grenadyn
 Is als mosterd by den wyn
 Sy die't drinkt, is eene kwezel
 Hy die't drinkt, is ras een ezel

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




-- 
Best Regards,

Prabhat Kumar
MySQL DBA

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat


RE: i need advice on redundancy of mysql server.

2012-06-13 Thread Rick James
I prefer:
* Master-Master (dual master) but write to only one of them.  (Writing to 
both can lead to duplicate keys, etc., unless you are very careful in your 
code.)
* Have the two Masters geographically separate.  (Think tornados, floods, 
earthquakes, etc)
* Have Slave(s) hanging of each master -- (1) for read scaling, and (2) to 
avoid a major outage when one Master goes down and you need to take the other 
one down to clone it.

Another thing to consider:
Backing up via a LVM snapshot requires only a minute or so of downtime, 
regardless of dataset size.
Percona's XtraBackup is also very good.

I also agree that MyISAM in not best.  But, caution, InnoDB's disk footprint is 
2x=3x bigger than MyISAM's.

You can Load Balance reads (among slaves and, optionally, masters); you cannot 
do writes.

Any number of Apache servers can talk to MySQL.  But watch out -- MaxClients 
should not be so large that it swamps max_connections.

Load balancing:
DNS is the simple way to load balance Apache.
There are low-impact software solutions.
There are hardware solutions.  (This is what I am used to at work; it is severe 
overkill for most users.)

Bottom line:  There is no best or perfect solution.  First decide what 
'keeps you up at night'.

 -Original Message-
 From: Joey L [mailto:mjh2...@gmail.com]
 Sent: Monday, June 11, 2012 7:26 AM
 To: mysql@lists.mysql.com
 Subject: i need advice on redundancy of mysql server.
 
 I am running a site with about 50gig myisam databases which are the
 backend to different websites.
 I can not afford any downtime and the data is realtime.
 
 What is the best method for this setup? master-master or master-slave?
 
 What are the best utilities to create and maintain this setup?  as far
 as load balancing between the two physical servers that i am running.
 I am currently working with percona utilities - is there something
 better ?
 what would you use to load balance mysql ? what would you use to load
 balance apache.
 
 
 thanks
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql


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



Re: i need advice on redundancy of mysql server.

2012-06-12 Thread Joey L
It sounds like you are all consultants.


On Mon, Jun 11, 2012 at 4:46 PM, Baron Schwartz ba...@xaprb.com wrote:
 Yeah -- that was an unintentional omission. There are solo consultants
 like Ronald Bradford too.

 On Mon, Jun 11, 2012 at 3:14 PM, Andrew Moore eroomy...@gmail.com wrote:
 Not forgetting Pythian, Baron ;)

 On Mon, Jun 11, 2012 at 8:12 PM, Baron Schwartz ba...@xaprb.com wrote:

 Ultimately, if you intend to use MyISAM, you must keep in mind that it
 eliminates some of your options. One problem is that MyISAM is very
 slow to repair after a crash. Remember, if a crash can happen, it
 eventually will, it's just a question of when. And MyISAM doesn't have
 recovery -- it only has repair, which will not necessarily recover
 all of your data.

 If you are not aware of Percona XtraDB Cluster, it might be
 interesting for you. (I work for Percona.) There is also Continuent
 Tungsten to consider.

 Frankly, though, I'd step back a bit from such microscopic focus on
 technologies. It looks like you need advice from someone who's done
 this before, to get the high-level things right before you dive deeply
 into details. If it's really this important, I personally wouldn't
 trust it to a mailing list, I'd hire someone. It's well worth it.
 There's Percona again, of course, but there's also MySQL, SkySQL,
 PalominoDB, and lots more to choose from.

 Baron

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





 --
 Baron Schwartz
 Author, High Performance MySQL
 http://www.xaprb.com/

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


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



Re: i need advice on redundancy of mysql server.

2012-06-12 Thread Claudio Nanni
Joey,

 I can not afford any downtime and the data is realtime. 

This is a very good reason for asking help to consultants.

If you ask What is the best method for this setup? master-master or
master-slave?
then the simple answer is master-slave, for any mysql setup, that is the
only safe mysql replication setup.
If you mean Master-Master Active/Passive I still consider that Master-Slave.
While is very well advisable to stay away from master-master active/active,
unless you really know what you are doing and you have the development
aware, very skilled, and listening to you*.

So, go for master-slave, but I would suggest to read online mysql manuals
and some great books,
because if you post here to ask every single step to set it up, you are
basically asking someone else to do the job for you, for free ;)

Cheers

Claudio



2012/6/12 Joey L mjh2...@gmail.com

 It sounds like you are all consultants.


 On Mon, Jun 11, 2012 at 4:46 PM, Baron Schwartz ba...@xaprb.com wrote:
  Yeah -- that was an unintentional omission. There are solo consultants
  like Ronald Bradford too.
 
  On Mon, Jun 11, 2012 at 3:14 PM, Andrew Moore eroomy...@gmail.com
 wrote:
  Not forgetting Pythian, Baron ;)
 
  On Mon, Jun 11, 2012 at 8:12 PM, Baron Schwartz ba...@xaprb.com
 wrote:
 
  Ultimately, if you intend to use MyISAM, you must keep in mind that it
  eliminates some of your options. One problem is that MyISAM is very
  slow to repair after a crash. Remember, if a crash can happen, it
  eventually will, it's just a question of when. And MyISAM doesn't have
  recovery -- it only has repair, which will not necessarily recover
  all of your data.
 
  If you are not aware of Percona XtraDB Cluster, it might be
  interesting for you. (I work for Percona.) There is also Continuent
  Tungsten to consider.
 
  Frankly, though, I'd step back a bit from such microscopic focus on
  technologies. It looks like you need advice from someone who's done
  this before, to get the high-level things right before you dive deeply
  into details. If it's really this important, I personally wouldn't
  trust it to a mailing list, I'd hire someone. It's well worth it.
  There's Percona again, of course, but there's also MySQL, SkySQL,
  PalominoDB, and lots more to choose from.
 
  Baron
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/mysql
 
 
 
 
 
  --
  Baron Schwartz
  Author, High Performance MySQL
  http://www.xaprb.com/
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/mysql
 

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




-- 
Claudio


i need advice on redundancy of mysql server.

2012-06-11 Thread Joey L
I am running a site with about 50gig myisam databases which are the
backend to different websites.
I can not afford any downtime and the data is realtime.

What is the best method for this setup? master-master or master-slave?

What are the best utilities to create and maintain this setup?  as far
as load balancing between the two physical servers that i am running.
I am currently working with percona utilities - is there something better ?
what would you use to load balance mysql ? what would you use to load
balance apache.


thanks

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



Re: i need advice on redundancy of mysql server.

2012-06-11 Thread Ananda Kumar
when u say redudency.
Do u just want replication like master-slave, which will be active-passive
or
Master-master which be active-active.

master-slave, will work just a DR, when ur current master fails you can
failover the slave, with NO LOAD balancing.

Master-master allows load balancing.

On Mon, Jun 11, 2012 at 7:56 PM, Joey L mjh2...@gmail.com wrote:

 I am running a site with about 50gig myisam databases which are the
 backend to different websites.
 I can not afford any downtime and the data is realtime.

 What is the best method for this setup? master-master or master-slave?

 What are the best utilities to create and maintain this setup?  as far
 as load balancing between the two physical servers that i am running.
 I am currently working with percona utilities - is there something better ?
 what would you use to load balance mysql ? what would you use to load
 balance apache.


 thanks

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




Re: i need advice on redundancy of mysql server.

2012-06-11 Thread Shawn Green

On 6/11/2012 10:36 AM, Ananda Kumar wrote:

...
Master-master allows load balancing.



Why do people keep replication rings as if they are the best possible 
configuration? A master-slave relationship also permits load balancing 
and is easier to maintain and recover in the event of a node failure.


Any MySQL replication topology cannot, in a generic sense, allow load 
balancing. Careful precautions must be maintained in your load balancer 
and in your application code to avoid data collisions (adding or 
modifying the same PK on the same table on two or more nodes at the same 
time).


For continuous uptime, you do need redundancy. For the 'limited 
downtime' scenario that the customer proposed, this includes 
geographical redundancy as well as physical duplication and should also 
include sharding his data so that the loss of one sharded set (due to 
extreme disaster or comms failure) does not knock all of his users 
offline at the same time.


realtime data is also a variable definition. For hydrologic monitoring 
data 'realtime' could mean within the last 15 minutes.  For some 
applications (such as telecommunication) 'realtime' is measured in 
microseconds.  It may be that the customer's requirements can tolerate a 
normal variance in duplication time provided by MySQL's native 
replication. If not, then rewriting (notice I did not say porting) 
their application to use MySQL Cluster may be the way to meet their 
realtime requirements.


Yes, master-master replication can be useful (in an active-passive 
setup) for rapid failover and recovery if you take the appropriate 
precautions. It is not recommended for the newest administrators because 
recovery can become complicated. One should really understand basic, 
top-down master-slave replication before attempting to create a 
replication ring.


Active-Active (dual master) configuration is even more complicated and 
is suited only for specific application purposes. This is definitely an 
advanced technique and requires careful planning and engineering to 
perform properly.


Regards,
--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN



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



Re: i need advice on redundancy of mysql server.

2012-06-11 Thread Joey L
I understand ..I am looking for load balancing - something that i do
not have to worry about if one server goes down - the other server
will be up and running by itself and i can bring back the other server
later on when i have time.

On Mon, Jun 11, 2012 at 10:36 AM, Ananda Kumar anan...@gmail.com wrote:
 when u say redudency.
 Do u just want replication like master-slave, which will be active-passive
 or
 Master-master which be active-active.

 master-slave, will work just a DR, when ur current master fails you can
 failover the slave, with NO LOAD balancing.

 Master-master allows load balancing.

 On Mon, Jun 11, 2012 at 7:56 PM, Joey L mjh2...@gmail.com wrote:

 I am running a site with about 50gig myisam databases which are the
 backend to different websites.
 I can not afford any downtime and the data is realtime.

 What is the best method for this setup? master-master or master-slave?

 What are the best utilities to create and maintain this setup?  as far
 as load balancing between the two physical servers that i am running.
 I am currently working with percona utilities - is there something better
 ?
 what would you use to load balance mysql ? what would you use to load
 balance apache.


 thanks

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



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



Re: i need advice on redundancy of mysql server.

2012-06-11 Thread Andrew Moore
That's not a description of 'load balancing'; it is a high availability
solution you're looking for.

On Mon, Jun 11, 2012 at 4:43 PM, Joey L mjh2...@gmail.com wrote:

 I understand ..I am looking for load balancing - something that i do
 not have to worry about if one server goes down - the other server
 will be up and running by itself and i can bring back the other server
 later on when i have time.

 On Mon, Jun 11, 2012 at 10:36 AM, Ananda Kumar anan...@gmail.com wrote:
  when u say redudency.
  Do u just want replication like master-slave, which will be
 active-passive
  or
  Master-master which be active-active.
 
  master-slave, will work just a DR, when ur current master fails you can
  failover the slave, with NO LOAD balancing.
 
  Master-master allows load balancing.
 
  On Mon, Jun 11, 2012 at 7:56 PM, Joey L mjh2...@gmail.com wrote:
 
  I am running a site with about 50gig myisam databases which are the
  backend to different websites.
  I can not afford any downtime and the data is realtime.
 
  What is the best method for this setup? master-master or master-slave?
 
  What are the best utilities to create and maintain this setup?  as far
  as load balancing between the two physical servers that i am running.
  I am currently working with percona utilities - is there something
 better
  ?
  what would you use to load balance mysql ? what would you use to load
  balance apache.
 
 
  thanks
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/mysql
 
 

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




Re: i need advice on redundancy of mysql server.

2012-06-11 Thread Joey L
You listed a lot of things - but no solution - i am looking for master
- master configuration.
Any tools you have used ?
Anything concrete you can offer?

thanks


On Mon, Jun 11, 2012 at 11:39 AM, Shawn Green shawn.l.gr...@oracle.com wrote:
 On 6/11/2012 10:36 AM, Ananda Kumar wrote:

 ...
 Master-master allows load balancing.


 Why do people keep replication rings as if they are the best possible
 configuration? A master-slave relationship also permits load balancing and
 is easier to maintain and recover in the event of a node failure.

 Any MySQL replication topology cannot, in a generic sense, allow load
 balancing. Careful precautions must be maintained in your load balancer and
 in your application code to avoid data collisions (adding or modifying the
 same PK on the same table on two or more nodes at the same time).

 For continuous uptime, you do need redundancy. For the 'limited downtime'
 scenario that the customer proposed, this includes geographical redundancy
 as well as physical duplication and should also include sharding his data so
 that the loss of one sharded set (due to extreme disaster or comms failure)
 does not knock all of his users offline at the same time.

 realtime data is also a variable definition. For hydrologic monitoring
 data 'realtime' could mean within the last 15 minutes.  For some
 applications (such as telecommunication) 'realtime' is measured in
 microseconds.  It may be that the customer's requirements can tolerate a
 normal variance in duplication time provided by MySQL's native replication.
 If not, then rewriting (notice I did not say porting) their application to
 use MySQL Cluster may be the way to meet their realtime requirements.

 Yes, master-master replication can be useful (in an active-passive setup)
 for rapid failover and recovery if you take the appropriate precautions. It
 is not recommended for the newest administrators because recovery can become
 complicated. One should really understand basic, top-down master-slave
 replication before attempting to create a replication ring.

 Active-Active (dual master) configuration is even more complicated and is
 suited only for specific application purposes. This is definitely an
 advanced technique and requires careful planning and engineering to perform
 properly.

 Regards,
 --
 Shawn Green
 MySQL Principal Technical Support Engineer
 Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
 Office: Blountville, TN




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


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



Re: i need advice on redundancy of mysql server.

2012-06-11 Thread Joey L
Sorry new to this part - but I am looking for both.
I have setup similar configuration using other technologies.
I was asking the group for recommendations - concrete ones ?
Can you offer up any ?

On Mon, Jun 11, 2012 at 11:54 AM, Andrew Moore eroomy...@gmail.com wrote:
 That's not a description of 'load balancing'; it is a high availability
 solution you're looking for.


 On Mon, Jun 11, 2012 at 4:43 PM, Joey L mjh2...@gmail.com wrote:

 I understand ..I am looking for load balancing - something that i do
 not have to worry about if one server goes down - the other server
 will be up and running by itself and i can bring back the other server
 later on when i have time.

 On Mon, Jun 11, 2012 at 10:36 AM, Ananda Kumar anan...@gmail.com wrote:
  when u say redudency.
  Do u just want replication like master-slave, which will be
  active-passive
  or
  Master-master which be active-active.
 
  master-slave, will work just a DR, when ur current master fails you can
  failover the slave, with NO LOAD balancing.
 
  Master-master allows load balancing.
 
  On Mon, Jun 11, 2012 at 7:56 PM, Joey L mjh2...@gmail.com wrote:
 
  I am running a site with about 50gig myisam databases which are the
  backend to different websites.
  I can not afford any downtime and the data is realtime.
 
  What is the best method for this setup? master-master or master-slave?
 
  What are the best utilities to create and maintain this setup?  as far
  as load balancing between the two physical servers that i am running.
  I am currently working with percona utilities - is there something
  better
  ?
  what would you use to load balance mysql ? what would you use to load
  balance apache.
 
 
  thanks
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:    http://lists.mysql.com/mysql
 
 

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



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



Re: i need advice on redundancy of mysql server.

2012-06-11 Thread Shawn Green

On 6/11/2012 12:02 PM, Joey L wrote:

You listed a lot of things - but no solution - i am looking for master
- master configuration.
Any tools you have used ?
Anything concrete you can offer?



There is no one-size-fits-all approach to the problem you are 
attempting to solve. However, there are some documented solutions in the 
manual for you to review


Let's start with the basics:

   http://dev.mysql.com/doc/refman/5.5/en/faqs-replication.html


http://dev.mysql.com/doc/refman/5.5/en/replication-solutions-scaleout.html

   http://dev.mysql.com/doc/refman/5.5/en/replication-solutions-switch.html

   http://dev.mysql.com/doc/refman/5.5/en/replication-howto.html

   http://dev.mysql.com/doc/refman/5.5/en/replication-problems.html

We also document some more exotic configurations:

   http://dev.mysql.com/doc/refman/5.5/en/ha-overview.html

Which one you opt for depends on many factors that we cannot determine 
for you.


Warmest wishes,
--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN



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



Re: i need advice on redundancy of mysql server.

2012-06-11 Thread Baron Schwartz
Ultimately, if you intend to use MyISAM, you must keep in mind that it
eliminates some of your options. One problem is that MyISAM is very
slow to repair after a crash. Remember, if a crash can happen, it
eventually will, it's just a question of when. And MyISAM doesn't have
recovery -- it only has repair, which will not necessarily recover
all of your data.

If you are not aware of Percona XtraDB Cluster, it might be
interesting for you. (I work for Percona.) There is also Continuent
Tungsten to consider.

Frankly, though, I'd step back a bit from such microscopic focus on
technologies. It looks like you need advice from someone who's done
this before, to get the high-level things right before you dive deeply
into details. If it's really this important, I personally wouldn't
trust it to a mailing list, I'd hire someone. It's well worth it.
There's Percona again, of course, but there's also MySQL, SkySQL,
PalominoDB, and lots more to choose from.

Baron

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



Re: i need advice on redundancy of mysql server.

2012-06-11 Thread Andrew Moore
Not forgetting Pythian http://www.pythian.com, Baron ;)

On Mon, Jun 11, 2012 at 8:12 PM, Baron Schwartz ba...@xaprb.com wrote:

 Ultimately, if you intend to use MyISAM, you must keep in mind that it
 eliminates some of your options. One problem is that MyISAM is very
 slow to repair after a crash. Remember, if a crash can happen, it
 eventually will, it's just a question of when. And MyISAM doesn't have
 recovery -- it only has repair, which will not necessarily recover
 all of your data.

 If you are not aware of Percona XtraDB Cluster, it might be
 interesting for you. (I work for Percona.) There is also Continuent
 Tungsten to consider.

 Frankly, though, I'd step back a bit from such microscopic focus on
 technologies. It looks like you need advice from someone who's done
 this before, to get the high-level things right before you dive deeply
 into details. If it's really this important, I personally wouldn't
 trust it to a mailing list, I'd hire someone. It's well worth it.
 There's Percona again, of course, but there's also MySQL, SkySQL,
 PalominoDB, and lots more to choose from.

 Baron

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




Re: i need advice on redundancy of mysql server.

2012-06-11 Thread Baron Schwartz
Yeah -- that was an unintentional omission. There are solo consultants
like Ronald Bradford too.

On Mon, Jun 11, 2012 at 3:14 PM, Andrew Moore eroomy...@gmail.com wrote:
 Not forgetting Pythian, Baron ;)

 On Mon, Jun 11, 2012 at 8:12 PM, Baron Schwartz ba...@xaprb.com wrote:

 Ultimately, if you intend to use MyISAM, you must keep in mind that it
 eliminates some of your options. One problem is that MyISAM is very
 slow to repair after a crash. Remember, if a crash can happen, it
 eventually will, it's just a question of when. And MyISAM doesn't have
 recovery -- it only has repair, which will not necessarily recover
 all of your data.

 If you are not aware of Percona XtraDB Cluster, it might be
 interesting for you. (I work for Percona.) There is also Continuent
 Tungsten to consider.

 Frankly, though, I'd step back a bit from such microscopic focus on
 technologies. It looks like you need advice from someone who's done
 this before, to get the high-level things right before you dive deeply
 into details. If it's really this important, I personally wouldn't
 trust it to a mailing list, I'd hire someone. It's well worth it.
 There's Percona again, of course, but there's also MySQL, SkySQL,
 PalominoDB, and lots more to choose from.

 Baron

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





-- 
Baron Schwartz
Author, High Performance MySQL
http://www.xaprb.com/

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



Re: Connect to MySQL server from a c++ application

2012-06-08 Thread Simon Walter


On 06/08/2012 01:55 AM, Claudio Nanni wrote:

Hi,

you guys don't like the official API?

http://dev.mysql.com/downloads/connector/c/



That's C isn't it? I think there is also a C++ connector. I'm interested 
to hear how that performs. It seems like a waste of time to write a 
bunch of wrappers for the C connector.



--
simonsmicrophone.com

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



Re: Connect to MySQL server from a c++ application

2012-06-08 Thread Claudio Nanni
Simon,

yes it is C,

C++ here:  http://dev.mysql.com/downloads/connector/cpp/

I did not work with this libraries and to be honest I do not know about
their performances,

If you have the chance it would be extremely useful for the community
having some tests done with both APIs.

Cheers

Claudio

2012/6/8 Simon Walter si...@gikaku.com


 On 06/08/2012 01:55 AM, Claudio Nanni wrote:

 Hi,

 you guys don't like the official API?

 http://dev.mysql.com/**downloads/connector/c/http://dev.mysql.com/downloads/connector/c/


 That's C isn't it? I think there is also a C++ connector. I'm interested
 to hear how that performs. It seems like a waste of time to write a bunch
 of wrappers for the C connector.


 --
 simonsmicrophone.com


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




-- 
Claudio


Re: Connect to MySQL server from a c++ application

2012-06-07 Thread Simon Walter


On 06/07/2012 12:29 PM, Lars Nilsson wrote:


On Wed, Jun 6, 2012 at 10:41 PM, Simon Waltersi...@gikaku.com  wrote:

However, memory leaks are not acceptable. So I am open to suggestions. What
do other c++ programmers use?


I've been happy using SQLAPI++ (http://www.sqlapi.com/) where I work.
Commercial and not open source, but it's cross-platform and supports a
dozen or so different databases.



It looks nice. I'm looking for something open source. I'm fine using one 
of the SQL connectors. I just need to know which one works. How does 
SQLAPI++ connect to MySQL? Is it thread safe?


--
simonsmicrophone.com

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



Re: Connect to MySQL server from a c++ application

2012-06-07 Thread Lars Nilsson
On Thu, Jun 7, 2012 at 3:08 AM, Simon Walter si...@gikaku.com wrote:
 On 06/07/2012 12:29 PM, Lars Nilsson wrote:
 I've been happy using SQLAPI++ (http://www.sqlapi.com/) where I work.
 Commercial and not open source, but it's cross-platform and supports a
 dozen or so different databases.

 It looks nice. I'm looking for something open source. I'm fine using one of
 the SQL connectors. I just need to know which one works. How does SQLAPI++
 connect to MySQL? Is it thread safe?

It loads the libmysqlclient dll/so libraries under the hood, mapping
each database client library's particular function set to its own
internal function pointers. I believe it to be thread-safe (pthread
mutexes on Linux/Unix, Windows relies on mutex/critical section
objects). Instances of SAConnection objects should probably not be
used across threads simultaneously though (usual caveats when doing
multi-threaded programming apply, etc).

I do like the high-level abstraction of the databases, and the use of
exceptions for errors so every statement doesn't need to have a check
to see if it was successful (just wrap your sequence of operations in
a try/catch as makes sense for the application). I know it reduced my
database-specific lines of code quite a bit when I changed a MySQL
specific program to using SQLAPI++.

If one need to, it is always possible to get a native database handle
out that can be used with the database-specific API (at which point
your program would have to be linked with the required
database-specific client libraries, and so on), but it is not
something I have really needed personally. If at all possible, I stay
in the realm of SQLAPI++ which makes my program independent of the
database libraries (implies I do not use native handles). It means I
can compile my program without having Oracle installed for instance,
and as long as a user has some means of configuring my program so that
SA_Oracle_Client is passed to a connection object (mapping from string
to the enum value or whatever else make sense), it should just work,
given a proper connection string (as long as one handles the special
cases properly as outlined in database specific notes for the classes
and methods, etc)

I'm sorry if I sound like a sales person for SQLAPI++. I have no
relation to it, just a satisfied user.

Lars Nilsson

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



Re: Connect to MySQL server from a c++ application

2012-06-07 Thread Claudio Nanni
Hi,

you guys don't like the official API?

http://dev.mysql.com/downloads/connector/c/

Cheers

Claudio

2012/6/7 Lars Nilsson chamael...@gmail.com

 On Thu, Jun 7, 2012 at 3:08 AM, Simon Walter si...@gikaku.com wrote:
  On 06/07/2012 12:29 PM, Lars Nilsson wrote:
  I've been happy using SQLAPI++ (http://www.sqlapi.com/) where I work.
  Commercial and not open source, but it's cross-platform and supports a
  dozen or so different databases.

  It looks nice. I'm looking for something open source. I'm fine using one
 of
  the SQL connectors. I just need to know which one works. How does
 SQLAPI++
  connect to MySQL? Is it thread safe?

 It loads the libmysqlclient dll/so libraries under the hood, mapping
 each database client library's particular function set to its own
 internal function pointers. I believe it to be thread-safe (pthread
 mutexes on Linux/Unix, Windows relies on mutex/critical section
 objects). Instances of SAConnection objects should probably not be
 used across threads simultaneously though (usual caveats when doing
 multi-threaded programming apply, etc).

 I do like the high-level abstraction of the databases, and the use of
 exceptions for errors so every statement doesn't need to have a check
 to see if it was successful (just wrap your sequence of operations in
 a try/catch as makes sense for the application). I know it reduced my
 database-specific lines of code quite a bit when I changed a MySQL
 specific program to using SQLAPI++.

 If one need to, it is always possible to get a native database handle
 out that can be used with the database-specific API (at which point
 your program would have to be linked with the required
 database-specific client libraries, and so on), but it is not
 something I have really needed personally. If at all possible, I stay
 in the realm of SQLAPI++ which makes my program independent of the
 database libraries (implies I do not use native handles). It means I
 can compile my program without having Oracle installed for instance,
 and as long as a user has some means of configuring my program so that
 SA_Oracle_Client is passed to a connection object (mapping from string
 to the enum value or whatever else make sense), it should just work,
 given a proper connection string (as long as one handles the special
 cases properly as outlined in database specific notes for the classes
 and methods, etc)

 I'm sorry if I sound like a sales person for SQLAPI++. I have no
 relation to it, just a satisfied user.

 Lars Nilsson

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




-- 
Claudio


Re: Connect to MySQL server from a c++ application

2012-06-07 Thread Baron Schwartz
There is also libdrizzle.

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



Re: Connect to MySQL server from a c++ application

2012-06-07 Thread Lars Nilsson
On Thu, Jun 7, 2012 at 12:55 PM, Claudio Nanni claudio.na...@gmail.com wrote:
 Hi,

 you guys don't like the official API?

 http://dev.mysql.com/downloads/connector/c/

 Cheers

 Claudio

Personally? Not really.

For instance, memory leaks are not acceptable according to Simon's
expressed desire.

SQLAPI++ allows me to completely avoid explicit memory/resource
allocation, if I put things on the stack.

class Foo { int x; std::string y; }
typedef std::mapint, Foo FooV;

FooV vFoo;

try
{
  SAConnection db(db, user, password);
  SACommand cmd(db);

  cmd.setCommandText(SELECT id, name FROM foo);
  cmd.Execute();

  while (cmd.FetchNext())
  {
Foo foo;
foo.x = cmd.Field(1).asLong();
foo.y = (const char *)cmd.Field(2).asString();
vFoo[foo.x] = foo;
  }
}
catch (SAException e)
{
  std::cerr  Failure:   (const char *)e.ErrText();
}

Using MySQL's API I'd need to make sure I close connections I open,
free result sets I get back, etc. SQLAPI++ perform these operations
behind the scenes for me when objects are created/initialized and
destroyed. If I happen to use pointers for some of these instead of
putting them on the stack, the ball is back in my court again to make
sure I don't lose track of something.

This is my personal preference. YMMV.

Lars Nilsson

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



Connect to MySQL server from a c++ application

2012-06-06 Thread Simon Walter


What is the most stable and performant way to connect to a MySQL server 
from a c++ application?


I've been using libmyodbc via unixODBC running under Debian squeeze. 
Suffice it to say, I am sorely disappointed. First of all the libmyodbc 
driver that's included with Debian is quite old. However, even after 
building and utilizing the latest version, there are still memory leaks 
in the driver.


I'm not stuck on using ODBC. Though it's nice to be able to is use an 
ODBC library so that I can connect to various DBs without having to 
learn new APIs. There is also the benefit of being able to change 
databases without much effort.


However, memory leaks are not acceptable. So I am open to suggestions. 
What do other c++ programmers use?


(note: I know this is probably not the place to ask this, but the 
libmyodbc mailing is dead as a door nail with people's auto-responders 
going off like a digital ghost town. :/)


Thanks,

Simon

--
simonsmicrophone.com


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



Re: Connect to MySQL server from a c++ application

2012-06-06 Thread Lars Nilsson
On Wed, Jun 6, 2012 at 10:41 PM, Simon Walter si...@gikaku.com wrote:
 However, memory leaks are not acceptable. So I am open to suggestions. What
 do other c++ programmers use?

I've been happy using SQLAPI++ (http://www.sqlapi.com/) where I work.
Commercial and not open source, but it's cross-platform and supports a
dozen or so different databases.

One of the example programs (without comments and the wrapping try/catch block)

con.Connect(test, tester, tester, SA_Oracle_Client);
cmd.setConnection(con);
cmd.setCommandText(
Insert into test_tbl(fid, fvarchar20) values(:1, :2));
cmd.Param(1).setAsLong() = 2;
cmd.Param(2).setAsString() = Some string (2);
cmd.Execute();
cmd  (long)3  Some string (3);
cmd.Execute();
con.Commit();

Simply replace SA_Oracle_Client with SA_MySQL_Client, etc, and you'll
be working against MySQL. Only requirement is that the dll/so
libraries for each database you want to connect to are installed
properly.

Lars Nilsson

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



Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

2012-04-13 Thread Claudio Nanni
Hi
you have to see the reason in the mysql log file,
that is a file either in the datadir with .err extension or in the /var/log
directory.
tail the last 30 lines you will see the reason why it failed to start.

Claudio


2012/4/11 Prabhat Kumar aim.prab...@gmail.com

 did you check permission of file /var/run/mysqld/mysqld.sock

 On Wed, Apr 11, 2012 at 9:48 AM, Larry Martell larry.mart...@gmail.com
 wrote:

  On Wed, Apr 11, 2012 at 2:51 AM, Ganesh Kumar bugcy...@gmail.com
 wrote:
   Hi Guys,
  
   I am using debian squeeze it's working good, I am trying to install
   mysql-server. mysql-server installation successfully but didn't start
   service
   root@devel:/var/run# more /etc/mysql/my.cnf |grep socket
   # Remember to edit /etc/mysql/debian.cnf when changing the socket
  location.
   socket  = /var/run/mysqld/mysqld.sock
   socket  = /var/run/mysqld/mysqld.sock
   socket  = /var/run/mysqld/mysqld.sock
  
   root@devel:~# /etc/init.d/mysql restart
   Stopping MySQL database server: mysqld.
   Starting MySQL database server: mysqld . . . . . . . . . . . . . .
  failed!
   root@devel:~# mysql -u root -p
   Enter password:
   ERROR 2002 (HY000): Can't connect to local MySQL server through socket
   '/var/run/mysqld/mysqld.sock' (2)
   root@devel:~# cd /var/run/mysqld/
   root@devel:/var/run/mysqld# ls
   root@devel:/var/run/mysqld#
 
  Is selinux enabled? If so, check the logs for that.
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/mysql
 
 


 --
 Best Regards,

 Prabhat Kumar
 MySQL DBA

 My Blog: http://adminlinux.blogspot.com
 My LinkedIn: http://www.linkedin.com/in/profileprabhat




-- 
Claudio


Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

2012-04-11 Thread mail...@securitylabs.it

Il 11/04/2012 10:51, Ganesh Kumar ha scritto:

Hi Guys,

I am using debian squeeze it's working good, I am trying to install
mysql-server. mysql-server installation successfully but didn't start


root@devel:~# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

Hi, look at /var/log/daemon.log, here you will find the reason.

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



Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

2012-04-11 Thread Larry Martell
On Wed, Apr 11, 2012 at 2:51 AM, Ganesh Kumar bugcy...@gmail.com wrote:
 Hi Guys,

 I am using debian squeeze it's working good, I am trying to install
 mysql-server. mysql-server installation successfully but didn't start
 service
 root@devel:/var/run# more /etc/mysql/my.cnf |grep socket
 # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
 socket          = /var/run/mysqld/mysqld.sock
 socket          = /var/run/mysqld/mysqld.sock
 socket          = /var/run/mysqld/mysqld.sock

 root@devel:~# /etc/init.d/mysql restart
 Stopping MySQL database server: mysqld.
 Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
 root@devel:~# mysql -u root -p
 Enter password:
 ERROR 2002 (HY000): Can't connect to local MySQL server through socket
 '/var/run/mysqld/mysqld.sock' (2)
 root@devel:~# cd /var/run/mysqld/
 root@devel:/var/run/mysqld# ls
 root@devel:/var/run/mysqld#

Is selinux enabled? If so, check the logs for that.

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



Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

2012-04-11 Thread Prabhat Kumar
did you check permission of file /var/run/mysqld/mysqld.sock

On Wed, Apr 11, 2012 at 9:48 AM, Larry Martell larry.mart...@gmail.comwrote:

 On Wed, Apr 11, 2012 at 2:51 AM, Ganesh Kumar bugcy...@gmail.com wrote:
  Hi Guys,
 
  I am using debian squeeze it's working good, I am trying to install
  mysql-server. mysql-server installation successfully but didn't start
  service
  root@devel:/var/run# more /etc/mysql/my.cnf |grep socket
  # Remember to edit /etc/mysql/debian.cnf when changing the socket
 location.
  socket  = /var/run/mysqld/mysqld.sock
  socket  = /var/run/mysqld/mysqld.sock
  socket  = /var/run/mysqld/mysqld.sock
 
  root@devel:~# /etc/init.d/mysql restart
  Stopping MySQL database server: mysqld.
  Starting MySQL database server: mysqld . . . . . . . . . . . . . .
 failed!
  root@devel:~# mysql -u root -p
  Enter password:
  ERROR 2002 (HY000): Can't connect to local MySQL server through socket
  '/var/run/mysqld/mysqld.sock' (2)
  root@devel:~# cd /var/run/mysqld/
  root@devel:/var/run/mysqld# ls
  root@devel:/var/run/mysqld#

 Is selinux enabled? If so, check the logs for that.

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




-- 
Best Regards,

Prabhat Kumar
MySQL DBA

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat


  1   2   3   4   5   6   7   8   9   10   >