� ���� ������� ������� ��������� � ��������� MySQL:
��� ��������� MySQL �� Linux ������������� ��������� ������ RPM. �
��������� ����� RPM ��� MySQL ��������� �� ������������ ������� SuSE Linux 7.3,
�� ��� ������ �������� ����� � ��� ������ ������ Linux,
������� ������������ rpm
� ���������� glibc
.
� ������ ������������� ������� � ������ RPM (��������, ���� �� ��������
������ ``Sorry, the host 'xxxx' could not be looked up
''), ����������� �
������� See section 2.6.1.1 ���������� � �������� ������������� Linux.
�������� ��� ������������� ��������� RPM-�����:
MySQL-server-VERSION.i386.rpm
.
������ MySQL. ���� ��� ����� ������ ������������ � ������� MySQL, �����������
�� ������ ����������, ���� ���� �� ���������. �������� ��������, ��� ������
4.0.10 ���� ����� ��������� MySQL-VERSION.i386.RPM
.
MySQL-client-VERSION.i386.rpm
.
����������� ���������� ��������� MySQL.
��������� ����� ������ ��������� ������.
MySQL-bench-VERSION.i386.rpm
.
����� � ����������� ������. ��� �����
��������� ������� ������� Perl � msql-mysql-modules.
MySQL-devel-VERSION.i386.rpm
.
���������� � ���������� �����,
����������� ��� �������������� ������ �������� MySQL, ����� ��� ������
Perl.
MySQL-shared-VERSION.i386.rpm
���� ����� �������� ������������ ���������� (libmysqlclient.so*
),
������ ��� ��������� ������ ���������������� ��� ���������� ��� ����, �����
�������� � MySQL.
MySQL-embedded-VERSION.i386.rpm
������������ ���������� ������� MySQL (MySQL 4.x � ����� �����).
MySQL-VERSION.src.rpm
.
���� ���� �������� �������� ��� ��� ����
���������� �������. ���� ����� ����� ������������ ��� �������� ������
RPM ��� ������ ���������� (�������� Alpha ��� SPARC).
��� ��������� ���� ������ � ������ RPM ��������� �������:
shell> rpm -qpl MySQL-VERSION.i386.rpm
��� ���������� ����������� ����������� ��������� ��������� �������:
shell> rpm -i MySQL-server-VERSION.i386.rpm MySQL-client-VERSION.i386.rpm
��� ��������� ������ ����������� ������ ��������� �������:
shell> rpm -i MySQL-client-VERSION.i386.rpm
RPM �������� ������ � `/var/lib/mysql' � ������� ��������������� ��������� � `/etc/init.d/' ��� ��������������� ������� ������� �� ����� ��������� �������� (� ������, ���� � ��� ������� ���������� �����������, ����� ������� ����� ����� �������������� ����� ������� MySQL, ����� ��������� � ��� �� ���� �������.)
���� �� ������ ���������� MySQL RPM �� ������� ������� Linux, ������� �� ������������ init-������� � `/etc/init.d' (��������������� ��� ����������� ������������� ������), ��� ������� ������� ������������� ������ �� ������ ������������ ����� ���, ��� ������������� RPM:
shell> cd /etc ; ln -s rc.d/init.d .
������, ��� ����������� �������� Linux ������ ������������ ��� ����� ���������, �.�. ��� ���������� ��������� LSB (Linux Standard Base).
����� ��������� RPM, mysqld
������ ���������� � �� ������ ����� ���������� �
������������� MySQL.
See section 2.4 ����������������� ��������� � ������������.
���� ��� ��������� ��������� ��������, �� �� ����� ��������� ����������� ������� ���������� � �����, � ������� ����������� ��������� �� ��������� ������������. See section 2.2.10 ��������� ��������� ������������ MySQL.
������� ��� ��������� ���� ������������� ������� MySQL ��� Windows:
� ����� ������ ������� �������� ������������ ��������� ������������.
��� �����������:
MAX_ROWS
� AVG_ROW_LENGTH
. See section 6.5.3 ��������� ��������� CREATE TABLE
.
ZIP
��� ���������� ����� ������������.
ODBC
, ��
����������� ������� MyODBC
. See section 8.3 ��������� ODBC � MySQL.
C:\> NET STOP MySQL� ��������� ������� �����������:
C:\mysql\bin> mysqladmin -u root shutdown
C:\mysql\bin> mysqld-max-nt --remove
Browse
��� �������� ���������� ����
��������.
������� � ������ MySQL 3.23.38, ����������� ��� Windows �������� � ����
��� ������� �������� ���, ��� � �������� ��� ������� MySQL-Max
. ����
���������� ������ ��������� �������� MySQL, ������� ����� ������������:
�������� ��� | �������� |
mysqld | ������������� � ������ ������� ������������ ������� � �������������� �������� ��������� ������, ������������� ������, ������ InnoDB � BDB. |
mysqld-opt | ���������������� �������� ��� ��� ��������� �������������� ������. |
mysqld-nt | ���������������� �������� ��� ��� NT/2000/XP � ���������� ����������� �������. ����� ��������� ��� ������ �� Windows 9x/Me, �� � ���� ������ �� ��������� ����������� ������ � ���������� ����� ������������� �������� TCP/IP. |
mysqld-max | ���������������� �������� ��� � ���������� ������������� ������ � ������ InnoDB � BDB. |
mysqld-max-nt | ������� mysqld-max , �� ������������� � ���������� ����������� �������.
|
������� � ������ 3.23.50, ����������� ������ �������� ������ ��� �������
mysqld � --enable-named-pipe
.
��� �������� ���� �������������� ��� ��������� Pentium Pro, �� ������ �������� �� ����� ���������� Intel >= i386.
��� ��������� ��������������� ��� ���� ����� ������ ���� ������������ MySQL ����� ���������� ������������ ���� �����:
������ ��� �������������� ����� ����� `my.ini' ����� ������������ ����������
WinMySQLAdmin
. � ���� ������ ��������� ����� ������� ������� �� ������
����������.
���������� ��� ����� ����� � ����������� ���������: `my.cnf' � `my.ini'.
������ �� ��������� ������������� ����� ����� ������������ ������ ���� ��
���. ��� ����� ������������ ����� ������� �����. ���� �� �����������
������������ ���� `my.cnf', �� ��� ������� ������� � �������� ��������
����� C, ���� `my.ini' - �� � ��������� �������� Windows (��� ������
���-���� ����� `C:\WINDOWS' ��� `C:\WINNT'; ��� ������ ��������������
����� ���������� �� �������� ���������� ��������� windir
). MySQL �������
���� ���� `my.ini', � ����� `my.cnf'.
���� �� ����� ���������� ������������ ��������� ���������, � ������� ����
C �� �������� ����������� ������, �� ������� �������� ������ � ������
`my.ini'. ���������������� ��������� WinMySQLAdmin
, ���� ��� � ���
�����������, ����� ���������� ������ ���� `my.ini' (���� ������ �
������������ �� ������������� ����� ����������� ��������� � ��������
`\mysql\bin').
��������� notepad.exe
, �������� ���� ����� � �������������� ������
[mysqld]
, ������ �������� ���������� basedir
� datadir
:
[mysqld] # set basedir to installation path, e.g., c:/mysql basedir=the_install_path # set datadir to location of data directory, # e.g., c:/mysql/data or d:/mydata/data datadir=the_data_path
������� ���������, ��� � Windows ����� ����� ������ ����������� � ����� ����� � �������������� ��������������� ������ ������, � �� ��������. ���� �� ���������� �������� �����, �� �� ���������� �����������.
����� ������������ ������� ������, �������� �� ��������� �� ��������� `c:\mysql\data', ���������� ����������� ��� ���������� �������� `c:\mysql\data' � ����� ��������������.
���� �� ������ �������� � ��������������� ��������� InnoDB
, �� ����������
������� ������� ��� ����� �������� ��� �������� ������ ������ InnoDB
�
���������� ������ - �.�. `c:\ibdata' � `c:\iblogs'. ������ �����
����������� �������� ��������� �������������� ����� � ����� �����. ��.
������ See section 7.5.2 ��������� ������� InnoDB.
���� �� ������ � ��������� InnoDB
�� �� ����������, ������� � ����� �����
�������� ����� skip-innodb
.
������ �� ������ ����������� ������ �������.
������������ ����� ����� ����������� �� ���� �������� DOS, ��������� ��������� � ���������, ������� ������� ������, ���������� � ���� DOS. ���� � ����� ������������� ���-������ �� ���, �� ��� ������ ���� ��������� ����� ����� ���������������� � ��������� ����� ��������.
���������, ��� ���������� � ��������, ��� ���������� ������, ����� ������� ��������� �������:
C:\mysql\bin> mysqld-max --standalone
��� ������� ������� �� ������ ������� ��������� ���������:
InnoDB: The first specified datafile c:\ibdata\ibdata1 did not exist: InnoDB: a new database to be created! InnoDB: Setting file c:\ibdata\ibdata1 size to 209715200 InnoDB: Database physically writes the file full: wait... InnoDB: Log file c:\iblogs\ib_logfile0 did not exist: new to be created InnoDB: Setting log file c:\iblogs\ib_logfile0 size to 31457280 InnoDB: Log file c:\iblogs\ib_logfile1 did not exist: new to be created InnoDB: Setting log file c:\iblogs\ib_logfile1 size to 31457280 InnoDB: Log file c:\iblogs\ib_logfile2 did not exist: new to be created InnoDB: Setting log file c:\iblogs\ib_logfile2 size to 31457280 InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: creating foreign key constraint system tables InnoDB: foreign key constraint system tables created 011024 10:58:25 InnoDB: Started
����� �������� ���������� ���������� � ������ MySQL ��� Windows, ����������� � ������� See section 2.6.2 ���������� � Windows.
������� � MySQL 4.0.11, �� ������ ��������� MySQL �� Mac OS X 10.2 ("Jaguar") ���������
������ ������ ������� PKG
������ ��������� tar-������. �������� ��������, ���
����� ������ ������ Mac OS X (������, 10.1.x) �� �������������� ���� �������.
����� ��������� ������ ����� ������ ����� (.dmg
), ������� ��� �������
������� ������������ ������� ������� ����� �� ��� ������ � Finder. ����� ������
���� ����������� � �� ������� ��� ����������.
��������: ����� ��� ��� ���������� �����������, ���������, ��� ������ ������� MySQL �� �������� �� ���� ����������!
����������, ���������� ��� ���������� ����� MySQL ����� ���, ��� ����������. ��� ����� �����������
��� ���������� MySQL Manager (�� Mac OS X Server) ��� � �������
mysqladmin shutdown
� ��������� ������.
��� ���� ����� ��������� MySQL PKG, ������ �������� ������ �� ������ ������. ��� �������� �������� ����������� ������� Mac OS, ������� � �������� ��� ����� ������� ��������� MySQL.
����� �������� ���� �
`/usr/local/mysql-<������>' � ����� �������� ������������� ������
`/usr/local/mysql', ����������� �� ����� �����������������. ���� ������� � ������
`/usr/local/mysql' ��� ����������, �� ����� ������� ������������ �
`/usr/local/mysql.bak'. ����� ����, ����� ����������� ������� ���������� MySQL �����
���������� mysql_install_db
����� �����������.
����� ����������� ������ �� ��, ������� ������������ � �������� ��������: ��� ����������� ����� MySQL ����� ����������� �� ���� `/usr/local/mysql/bin', ����� ����� ���������� � `/etc/mysql.sock'. See section 2.2.7 ����� ���������.
���������� ����� ����������� ������������ � ������ mysql
(������� ������ ������������
�� ��������� � ������ �������� Mac OS X 10.2 � ����).
���� �� ����������� Mac OS X Server, � ��� ��� ���� ���������� ����� MySQL:
���� ������ ����������� ��������� ������� ����������� ������ ������������ ������ PKG ��� Mac OS X. ������� ���������� ����������� Apple �� ��������� MySQL, ���������� (��������� ���������� "Help View", �������� "Mac OS X Server", �������� ����� ����� "MySQL" � ���������� ������ ��� ��������� "Installing MySQL").
������, ��� ������������������� ������ MySQL �� Mac OS X Server ����������� �
������� ������� safe_mysqld
������ mysqld_safe
!
���� �� ����� ������������ ������ MySQL ����� ������� (Marc Liyanage) � ����� http://www.entropy.ch, �� ������ ������ ��������� ����������� �� ���������� ������� ��������� ����� ������������, ��� ������� �� ��� ����������.
���� �� ���������� MySQL � ������, ��������� ������ ��� � ����������������� ������ �� �������� Mac OS X Server, �� ����������� ������ �� MySQL - ��� ������� ����� ������������� ������������ ������� ���������� MySQL. See section 2.5.2 ������������ � ������ 3.23 �� ������ 4.0.
����� ����������� �� ������ ��������� MySQL �������� ��������� ������� � ������������ ����. �������� ��������, ��� ��� ����� ���������� �������������� ��� ���������� ���� ������.
shell> cd /usr/local/mysql shell> sudo ./bin/mysqld_safe (������� ��� ������) (������� CTRL+Z) shell> bg (������� CTRL+D ��� ������ �� ��������)
������ �� ������� ������������ � ������� MySQL, ������, �������� `/usr/local/mysql/bin/mysql'.
��� ����, ����� MySQL ������������� ���������� ��� ��������, �� ������ ����� MySQL StartupItem ����� �� ����� ������:
http://www2.entropy.ch/download/mysql-startupitem.pkg.tar.gz
�� ��������� � ��������� ����� �������� StartupItem � ����������� ����� MySQL � ��������� �����.
��������, ��� ����������� ������ ������ MySQL �� ������� ������� ����� ������ �����������. � ���������, ����������� � Mac OS X ��� �� ������������� ������ ���������������� ��� ����, ����� ��������� �������� ������������ � ������� ������.
����� ����, ��� �� ����������� ����� ������ MySQL � ����������� �����������������, � ������� ��������� ����� ������, �� ������ ������� ������ �����������. ����� ����, �� ������ ������� ������ �������� Package Receipt, ������������� �����: `/Library/Receipts/mysql-<version>.pkg'.
���������� � ������� ������ � ���������� �� �� �������� ����� �������� �� �������� �������� MySQL (http://www.mysql.com/).
��� ������� ���������� ���� - http://mirrors.sunsite.dk/mysql/
���� �� �������������� � ����������� ����������� ����� MySQL, �� ������
�������� ������������� ��� ���������� rsync � ������
rsync://sunsite.dk/ftp/mirrors/mysql/
. ������� ��������� ��� ������ ��
������ webmaster@mysql.com
, ����� ��������� ��� � ���, ��� ��� ����������
���� ������� �������� � �������������� ���� ������.
���� ��������� �������� � ��������� � ������ �������� �����, �������� ������������ ���� �� ��������� ���������� ������.
� ���������������� ��� ���������� ���������� ������ ������� �������� ��
������ webmaster@mysql.com
.
For a complete upto-date list of MySQL web/download mirrors, see http://www.mysql.com/downloads/mirrors.html. There you will also find information about becoming a MySQL mirror site and how to report a bad or out-of-date mirror.
MD5 Checksums
��� GnuPG
����� ����, ��� �� ��������� ������ ��� ����� MySQL, � ����� ��� ��� �� ������ ��� �������������, ��� ������� ��������� � ���, ��� �� � ����������� � �� ��� ���-���� �������.
MySQL AB ������������� ��� ������� ��������� �����: ����������� ����� MD5
� ����������������� ������� � ��������������� GnuPG
, GNU Privacy Guard
.
MD5
����� ���� ��� �� ��������� �����, �� ������ ���������, ������������� �� ����������� ����� MD5 ������������ ������ ���, ��� ������� �� ��������� �������� �������. � ������� ������ ���� ����������� �����, ������� �� ������ ��������� ����� ��������:
shell> md5sum <�����>
������ �� ��� ������������ ������� ������������ ������� md5sum
- �� ���������
��� ������ ���������� md5
, � � ������ ��� ����� �� ������������. �� Linux
��� ������� �������� ������ GNU Text Utilities
, ������� �������� ��� ���������
������ ��������.
�� ������ ��������� �������� ��� �� ������
http://www.gnu.org/software/textutils/. ���� � ��� ��� ����������
OpenSSL
, �� ����� ������ ������������ ������� openssl md5
<�����>
. ���������� md5
��� DOS/Windows �������� �� ������
http://www.fourmilab.ch/md5/.
������:
shell> md5sum mysql-standard-4.0.10-gamma-pc-linux-i686.tar.gz 155836a7ed8c93aee6728a827a6aa153 mysql-standard-4.0.10-gamma-pc-linux-i686.tar.gz
�� ������ ��������������, ��� �������������� ����������� ����� ������������� ���, ��� ������� �� ��������� �������� ����� ���������������� ������.
��������� ���������� ������ ����� ������������� ���� � ������ `MD5SUMS',
������� ����� �������� MD5
����������� ����� ���� ������ �� ��������
`Downloads'. ������ ��������, ��� ���� ���� ���������� ����� �������� �
��� �� ����� �������� ����� �������� ����������� ������. ���� �� � ���������,
�� ������ ���������� �� ������ ������� � �������� ���������.
GnuPG
������� ����� �������� ����� �������� ����������� ������ ��� �������������
���������������� ��������. MySQL AB ���������� �� GNU Privacy Guard
(GnuPG
), �������� ������������ ������ ���������� ������ Pretty Good
Privacy
(PGP
) ���� ���������� (Phil Zimmermann).
��. http://www.gnupg.org/ � http://www.openpgp.org/
��� ����� ��������� ���������� ��� OpenPGP/GnuPG � ��� ��� �������� � ��������� ��
����� �������. ����������� �������� Linux ��� ���� � GnuPG ����� � ��������.
������� � MySQL 4.0.10 (������� 2003), MySQL AB ������ �����������
����������� ������ � ������� GnuPG
. ����������������� ��������� ��������
������� ����� �������� ������� �������� ����������� � ������������� �����.
��� �������� ������� ����������� ������, ��� � ������ ������� ������� �������� ����� ���������� ����� GPG build@mysql.com. �� ������ ���� ����� ���� ���� ����� ������, ���� ����� ��� �� http://www.keyserver.net/.
Key ID: pub 1024D/5072E1F5 2003-02-03 MySQL Package signing key (www.mysql.com) <build@mysql.com> Fingerprint: A4A9 4068 76FC BD3C 4567 70C8 8C71 8D3B 5072 E1F5 Public Key (ASCII-armored): -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3 RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ fw2vOUgCmYv2hW0hyDHuvYlQA/BThQoADgj8AW6/0Lo7V1W9/8VuHP0gQwCgvzV3 BqOxRznNCRCRxAuAuVztHRcEAJooQK1+iSiunZMYD1WufeXfshc57S/+yeJkegNW hxwR9pRWVArNYJdDRT+rf2RUe3vpquKNQU/hnEIUHJRQqYHo8gTxvxXNQc7fJYLV K2HtkrPbP72vwsEKMYhhr0eKCbtLGfls9krjJ6sBgACyP/Vb7hiPwxh6rDZ7ITnE kYpXBACmWpP8NJTkamEnPCia2ZoOHODANwpUkP43I7jsDmgtobZX9qnrAXw+uNDI QJEXM6FSbi0LLtZciNlYsafwAPEOMDKpMqAK6IyisNtPvaLd8lH0bPAnWqcyefep rv0sxxqUEMcM3o7wwgfN83POkDasDbs3pjwPhxvhz6//62zQJ7Q7TXlTUUwgUGFj a2FnZSBzaWduaW5nIGtleSAod3d3Lm15c3FsLmNvbSkgPGJ1aWxkQG15c3FsLmNv bT6IXQQTEQIAHQUCPj6jDAUJCWYBgAULBwoDBAMVAwIDFgIBAheAAAoJEIxxjTtQ cuH1cY4AnilUwTXn8MatQOiG0a/bPxrvK/gCAJ4oinSNZRYTnblChwFaazt7PF3q zIhMBBMRAgAMBQI+PqPRBYMJZgC7AAoJEElQ4SqycpHyJOEAn1mxHijft00bKXvu cSo/pECUmppiAJ41M9MRVj5VcdH/KN/KjRtW6tHFPYhMBBMRAgAMBQI+QoIDBYMJ YiKJAAoJELb1zU3GuiQ/lpEAoIhpp6BozKI8p6eaabzF5MlJH58pAKCu/ROofK8J Eg2aLos+5zEYrB/LsrkCDQQ+PqMdEAgA7+GJfxbMdY4wslPnjH9rF4N2qfWsEN/l xaZoJYc3a6M02WCnHl6ahT2/tBK2w1QI4YFteR47gCvtgb6O1JHffOo2HfLmRDRi Rjd1DTCHqeyX7CHhcghj/dNRlW2Z0l5QFEcmV9U0Vhp3aFfWC4Ujfs3LU+hkAWzE 7zaD5cH9J7yv/6xuZVw411x0h4UqsTcWMu0iM1BzELqX1DY7LwoPEb/O9Rkbf4fm Le11EzIaCa4PqARXQZc4dhSinMt6K3X4BrRsKTfozBu74F47D8Ilbf5vSYHbuE5p /1oIDznkg/p8kW+3FxuWrycciqFTcNz215yyX39LXFnlLzKUb/F5GwADBQf+Lwqq a8CGrRfsOAJxim63CHfty5mUc5rUSnTslGYEIOCR1BeQauyPZbPDsDD9MZ1ZaSaf anFvwFG6Llx9xkU7tzq+vKLoWkm4u5xf3vn55VjnSd1aQ9eQnUcXiL4cnBGoTbOW I39EcyzgslzBdC++MPjcQTcA7p6JUVsP6oAB3FQWg54tuUo0Ec8bsM8b3Ev42Lmu QT5NdKHGwHsXTPtl0klk4bQk4OajHsiy1BMahpT27jWjJlMiJc+IWJ0mghkKHt92 6s/ymfdf5HkdQ1cyvsz5tryVI3Fx78XeSYfQvuuwqp2H139pXGEkg0n6KdUOetdZ Whe70YGNPw1yjWJT1IhMBBgRAgAMBQI+PqMdBQkJZgGAAAoJEIxxjTtQcuH17p4A n3r1QpVC9yhnW2cSAjq+kr72GX0eAJ4295kl6NxYEuFApmr1+0uUq/SlsQ== =YJkx -----END PGP PUBLIC KEY BLOCK-----
�� ������ ������������� ���� ���� � ��� ��������� ����������� ������ (public keyring)
��������� gpg --import
. ��. ������������ �� GPG
��� ����� ��������� ����������
� ���, ��� �������� � ���������� �������.
����� ����, ��� �� ��������� � ������������� ��������� ���� ������, �� ������ ��������� ��������� ���� ����� MySQL � ��������������� �������, ��������� �� ��� �� ��������� ��������.
���� ��������� ����� ���������� `.asc'. ��������, ��������� ��� `mysql-standard-4.0.10-gamma-pc-linux-i686.tar.gz' ����� `mysql-standard-4.0.10-gamma-pc-linux-i686.tar.gz.asc'. ��������������, ����� ��� ����� ��������� � ��� �� ����� �������� � ����� ��������� ����� ������� ��� �������� ��������� �����:
shell> gpg --verify <package>.asc Example: shell> gpg --verify mysql-standard-4.0.10-gamma-pc-linux-i686.tar.gz.asc gpg: Warning: using insecure memory! gpg: Signature made Mon 03 Feb 2003 08:50:39 PM MET using DSA key ID 5072E1F5 gpg: Good signature from "MySQL Package signing key (www.mysql.com) <build@mysql.com>"
��������� "Good signature" �������� ��� � ���, ��� ��� � �������.
��� ������� RPM
, ���������� ����� ������� �� ��������������� - ������ RPM
���
���� �� ���� ����� ���������� ��������� �������� GPG
� ����������� ���� MD5
. �� ������
��������� �� ����� ��������:
shell> rpm --checksig <package>.rpm
������:
shell> rpm --checksig MySQL-server-4.0.10-0.i386.rpm MySQL-server-4.0.10-0.i386.rpm: md5 gpg OK
��������: ���� �� ����������� RPM 4.1 � �� �������� ���������: (GPG)
NOT OK (MISSING KEYS: GPG#5072e1f5)
(���� �������� �� ��, ��� �� �������������
���� � ��� ��������� ����������� ������ GPG, keyring) - ��� �������
������������� ���� � ����������� ������ RPM.
RPM 4.1 ������ �� ���������� ��� ����������� ������ GPG (� GPG ������), ��
������������ ���� �����������, ��������� RPM - ��� ������������� �������, �
����������� ������ GPG - ��� ����������� ��� ������������ ����).
����� ������������� ��������� ���� MySQL � RPM, ����������� ��� ����� �������:
shell> rpm --import <pubkey>
������:
shell> rpm --import mysql_pubkey.asc
���� ����� �� �������� ��� ����������� ����� MD5 ��� ������� GPG �� ���������, ���������� � ������ ������� ��������� ��������������� ����� ��� ���� ���, ����� ����, ���� � ������� �������. ���� �� �� ������� ������� �������������� � ����������� ������, ����������, �������� ��� � �������� ����������, ������� ������ ��� ������ � ����� �����, � �������� �� �������� ��������� �����, �� ����� webmaster@mysql.com ��� build@mysql.com.
�� ��������� GNU Autoconf, ��� ���� ����������� ���������� MySQL �� ��� ����������� ������� � ����������� �������� Posix � ������������ C++ (����� �������������� ������ ��� �������, ��������� ������ ���������� C++ ��� ������������� �������). ��� ���� �� ���������� � ������������� ����������� ����������� � �������� �� Sun Solaris (������ 2.5 - 2.7) � SuSE Linux ������ 7.x.
������� ���������, ��� ��� ������ ������������ ������ ��������� ����������� ������� �������� ������ � ����� ��������� �������. �������� ���������� ���� ����������, MySQL ������� ������������� �� ��������� ����������� ������������ ������ � ��������� �������:
������� ��������, ��� �� �� ���� ���������� MySQL ������������� ��������� ������. ��������� �������� ������������ ��������� ��� ������������������ ������������� ������� MySQL, ������������ ���������� ���������:
SMP
) �� �����������������
��������. ������� �������, ��� �������� ��������� ������ ��� �����
������ ������ ���� ����������� �������� �� ���� ����������� ����������
(CPU), ��� �������� �������.
pthread_mutex_lock()
�������� �����
``����������'' ����� ������������ ����������, ��� �����������
������ MySQL. ���� �� ������� �� �������� ������ ��������������, ��
������������� ���������� ����������� ����������� ������� MySQL
����������� ���������.
� ������������ � ����������� ���������� ���������� ����������� � ���� ����� ������ ��� ���������������� MySQL ��������: x86 ��� ����������� SuSE Linux 7.1, � ����� 2.4 � ReiserFS (��� ����� �������� ����������� Linux) � SPARC ��� ����������� Solaris 2.7 ��� 2.8. FreeBSD ����������� �������, �� �� � ����� ���� ��������, ��� ��� ��������� ������ � ����� ������, ��� ������ ������ ����������� ��������� ����������. �� ����� ��������, ���, � ���������� �������, �� ������ �������� � ������ ��������� ��� ��������� ���������, �� ������� MySQL ������������� � ������������� ���������, �� �� � ��� �� ������� ������������ � ������������������. ��� ��������� ��������� ������ � ����� ������� � �������������� � �������������� ����������� ������������ ������ � ���������, �� ������� ������� MySQL. ���� �� �������������� � ��������� ��� ��� ���� �����������, � ��� ���� ����������� ������� ������� �� �� ���������� � �� ���������� � ��������� ����������� �� ������ ����, ��� ����� MySQL, ����� �������� �����, ������� ������ �� ������ internals@lists.mysql.com.
������� � ���: �� ��������� ����������� ���� ������������� ������������� �� ������ ������� � ���, ��� �����-���� ������������ ������� ����� ��� ���� ������ � �����. �� ������� � ������ ������������ ������������ ������� ��� ���������� ���� - ��� ������ MySQL, � ���������� ��������� ������ � ����� ������. � ���� ����� ������ ��������� ������ ��������� ��� �� ������, ���� �� �� �������� � ���� ������ �������. � � ��������� ������� ������� ����, ��� ���� ������������ ������� �����, ��� ������, ����� ����������� ����� ���� � ���, ��� � ������������ � ����������� ���� ���������� ��������� ���� ������� ������� ������ ������. �� ������ ������������ ���� ����������, ����� ������ ��� ������� ������� - �� ����� ��������� ������������ MySQL � ����� �������.
��-������, ����� ������� ������� � ���, ��� ������ ��� ��������� - ����� ������ ����������������� ������ ��� ��������� ���������� ������:
��-������, ����� ������� �������, ������ �� �� ������������ ����������� ��������� ���� ��� �������� �����������. � ����������� ������� ����� ���������� ���� ����� �� �������� ������������, ���� ����� ���������� ��� ����� ���������, ��� ��� ������ ��� ����� ����������, ��� ����������� ��������� ����.
��������� �� ��������� ���� ����� ��������� ����� ���������������� � ��������� �������:
MySQL
�����
������������ � ����� �������.
�������� ����������� ����������� ������
MySQL ����������� ��������� -max
� ��������������� � ���� �� �������,
��� � mysqld-max
. See section 4.7.5 mysqld-max
, ����������� ������ mysqld
.
���� �� ������ ������������ ����� RPM MySQL-Max
, �� �������
������� ���������� ����������� ����� MySQL
RPM.
mysqld
� ���������� ���������������
����������, ������� ����������� � ����������� �������� �������������.
���� ���������� ������ �������� ���������������� �������������� �����,
�������, ��������, �� �������� ������������:
--with-innodb
--with-berkeley-db
--with-raid
--with-libwrap
--with-named-z-lib (��� �������� ��� ��������� �������� �������������)
--with-debug[=full]
pgcc
) ��� ��������������� ������� �����������, ������� �����
�������������� ��� ������ ����������.
� ������� ������������ � MySQL ������������ ������ ��������, ��������� ��
���� ����� � ��������. ��������, ������ mysql-3.21.17-beta
���������������� ��������� �������:
3
) ������ ��� �������� ������� ������. ��� �������
������ 3
����� ���� � ��� �� ������ ������.
21
) ������������ ����� ������� �������. ������
���������� ����� �� ���� ������������. ���� ������������ ������
���������� ����� (� ��������� ����� 23
) � ������ - �����������������
����� (� ��������� ����� 4.0
). ������ ��� ����� ���������, ��
����������������� ������ ����� �������� ���������� ���������, ��������
���������� ������������ �� ����� ��������, ���� ��� ����� ��
��������������� �� ��������� ��������.
17
) �������� ������� ������ � �������� ������ �������.
��� ����� ������������� ��� ������� ������ ������������. ������ �����
����� ����������� ����� ��������� ������ ��� ���������� ������
�������.
beta
) ��������� �� ������� ������������ ������� �������.
�������� ��������� ��������:
alpha
���������, ��� ������ �������� ������� ������� ������ ����,
�� ����������������� �� 100%. ������������ ������ (������ �� ���)
������ ���� ����������������� � ������� ``�������'' (News). ��.
������ See section D ������� ��������� � ���������� MySQL. � ����������� �������� alpha
������������ ����� ����� ������� � ����������. ��� ������ ���
alpha
-�������� ����� ����������� �������� ����������, ����������
������������ ��������� ����, �� ����� �������� ��� �����������. �
����� ������� MySQL �� ������ ���� ��������� ������.
beta
��������, ��� ���� ����� ��� �������������. �� �����������
������� ����� ��������, ������� ����� �� ������� �����������
������� ����. �� ������ ���� ������� ��������� ������. ������
���������� � alpha
�� beta
�����, ����� ������� ��������� �
����������� ������� � alpha
-������ �� ��������� �� ������� ���� �
������� ������ � �� �� ��������� ��������� �����- ���� �����
��������, ������� ����� �� �������� ���������� ������� ������.
gamma
������������ ����� ������ beta
, ������� ����� ��������� �,
������, �������� ������. ����������� ������ ��������������
�����������. ��� ������ ��, ��� �� ������ ������ ���������
���������� �������.
��� ������ MySQL ������������ ����� ���� ����������� ����� � ����������� ������, ����� �������� ����������� � ���, ��� ��� ������� � ����������. ��� ��� ����������� ����� ������������ �����������, ����� �������� �������� ������������ ����� ������ � ��������, ������� ����� �� �������, �� ����� ������ �� �������� ���������� ����� � �����.
�������, ��� ��� ������� �������������� �� ������� ���� �� ���������� �������:
crash-me
���������� ��� ���� ����. �� ����������� � ���, ��� �� ���������� ����� ����� ������ MySQL � ����� ���������� ���������������� ����� �� ������� ���� �� ����� ������. ��� ������ � ���� ������� � ��� ���� ����� ��� 100 �������� ������.
� ���� ������� ����������� ������������ ���������, ����������� �� ��������� ��� ��������� ��������� ������������ � ������������ ��������� ����.
�������� ����������� ��������������� ����� ��� ���������� � ��������� ���� ����� ��������� (������ `/usr/local/mysql') � ������� ��������� ��������:
������� | ���������� �������� |
`bin' | ���������� ��������� � ������ mysqld
|
`data' | ����� ��������, ���� ������ |
`include' | ���������� (������������) ����� |
`lib' | ���������� |
`scripts' | mysql_install_db
|
`share/mysql' | ����� � �������� ��������� �� ������� |
`sql-bench' | ����� ������������������ |
����������� ��������� ���� ��������������� ����� ����, ��� �� ��������������� � ������������� ���. �� ��������� �� ����� ��������� ����� �������������� � ������� `/usr/local' � ��������� �����������:
������� | ���������� �������� |
`bin' | ���������� ��������� � ������� |
`include/mysql' | ���������� (������������) ����� |
`info' | ������������ � ������� Info |
`lib/mysql' | ���������� |
`libexec' | ������ mysqld
|
`share/mysql' | ����� � �������� ��������� �� ������� |
`sql-bench' | ����� ������������������ � ���� crash-me
|
`var' | ���� ������ � ����� �������� |
������ �������� ��������� ����� ������������ ����������� ��������� ���� ���������� �� ����� ��������� ��������� ������������ � ��������� ����������:
mysqld
��������������� � ������� `libexec', � �� � `bin'.
mysql_install_db
��������������� � �������� `/usr/local/bin', � �� �
`/usr/local/mysql/scripts'.
����� ������� ����������� �������� ��������� �� ����������������� ������������ ��������� ����. ��� ����� ������� ��������� ������ `scripts/make_binary_distribution'.
�������� MySQL � MySQL AB ���������� ����� �������� ������� � �� ��������� � ����, ����� ���������� ����� ������ ����� �������� � ������ ������������� MySQL. �� ��������� ������� ����� ������ ����� ��, ��� ������ � �������� ���������� ����� �������� ��������, �������, �� ������ ������, ���������� ������ �������������.
������ ����� �� ����������� �� ������� ����� �������������, ���� ��� ����� ��������� �������� � ������� ����� ����������� ��������. �� ��������� �� �������� ��������� ����� �������������, ������� ��������, � �������� - ��������� ��������� ����� �������������, ���������� ���������� ��� ������ ����������� �����, � ��������� ������ �� ������ �� ��������.
��������� ����� ������ �� �����������. ���������� � ���, ������������� �� ����� ������ ������������ ����� ������ ��, ��� ��� ���������, �� ���������� �� ������� ``�������'' (News). See section D ������� ��������� � ���������� MySQL.
���� �������� � �������� ���������� MySQL ����������� � ���������:
������� ���������� �������� ������ �������� ������ 3.23; ��� ������ �������� ���������� ������ 4.0. ������ � ���������� ������ ��-�������� ����� ������������. �� �� ����� � ������ ``�������������'', ��������� ��� ���� ���������� ����������� ������ � ����, ������� ``������ ���� �������''. ``������� ����������'' �������������, ��� �� ����� �������� ��������� ����, ������� ``����� ���������� �� ������ ������� �� �� ��� �� ����, ��� ��� ��������''.
� MySQL ����������� ��������� ������������ �� ����������� ������ ��������� ������� ����������. � ����� ������ ���������� ������� ������������ ����� ������, ����������������� � ������� ���� ������ ��� ������ �� ����� �������. See section 2.2.6 ����� ������ MySQL ������������.
�������� MySQL AB � �������� ������ ������������� ����� �������� (����������������) ������������� MySQL - ��� �������������� �� ����� ������������ ��� �� �������������� ��������, � ������� ��� ������� ������������ ������ ���������.
��� ������������ ������������� ��������
Build-tools/Do-compile
, ������� ����������� ������ ��������
�����, � ������� ����� .tar.gz
��������� scripts/make_binary_distribution
��� ��������� ���������������� � ������� � ������� ��������� ������������ � �����.
gcc
2.95.3
CFLAGS="-O2 -mcpu=pentiumpro" CXX=gcc CXXFLAGS="-O2 -mcpu=pentiumpro -felide-constructors" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
ecc
(Intel C++ Itanium Compiler 7.0)
CC=ecc CFLAGS=-tpp1 CXX=ecc CXXFLAGS=-tpp1 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile
ccc
(Compaq C V6.2-505 / Compaq C++ V6.3-006)
CC=ccc CFLAGS="-fast -arch generic" CXX=cxx CXXFLAGS="-fast -arch generic -noexceptions -nortti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-mysqld-ldflags=-non_shared --with-client-ldflags=-non_shared --disable-shared
egcs
1.1.2
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared
gcc
2.95.3
CFLAGS="-O2" CXX=gcc CXXFLAGS="-O2 -felide-constructors" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
gcc
3.2
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=no --with-named-curses-libs=-lcurses --disable-shared
gcc
2.95.3
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-curses-libs=-lcurses --disable-shared
cc-5.0
(Sun Forte 5.0)
CC=cc-5.0 CXX=CC ASFLAGS="-xarch=v9" CFLAGS="-Xa -xstrconst -mt -D_FORTEC_ -xarch=v9" CXXFLAGS="-noex -mt -D_FORTEC_ -xarch=v9" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=no --enable-thread-safe-client --disable-shared
gcc
3.2.1
CFLAGS="-O2 -mcpu=powerpc -Wa,-many " CXX=gcc CXXFLAGS="-O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared
gcc
3.2.1
CFLAGS="-O2 -mcpu=powerpc -Wa,-many" CXX=gcc CXXFLAGS="-O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --with-server-suffix="-pro" --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared --with-innodb
gcc
3.1
CFLAGS="-DHPUX -I/opt/dce/include -O3 -fPIC" CXX=gcc CXXFLAGS="-DHPUX -I/opt/dce /include -felide-constructors -fno-exceptions -fno-rtti -O3 -fPIC" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-pthread --with-named-thread-libs=-ldce --with-lib-ccflags=-fPIC --disable-shared
aCC
(HP ANSI C++ B3910B A.03.33)
CC=cc CXX=aCC CFLAGS=+DD64 CXXFLAGS=+DD64 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
gcc
3.1
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
gcc
2.95.4
CFLAGS=-DHAVE_BROKEN_REALPATH ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=not-used --disable-shared
��������� �������� �������� ������� �� ��������, ��������������� MySQL AB ��������������. ��������, ��� ��� �������� �������� ��������������� ������������� ��� ��������. ��������� � MySQL AB ��� ������� �������� ��� ����� ���������, �� ������ ����� ���� ������������ ��������� ���� �������� ��������.
gcc
2.95.3
CFLAGS="-O3 -mpentium" LDFLAGS=-static CXX=gcc CXXFLAGS="-O3 -mpentium -felide-constructors" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --enable-thread-safe-client --disable-shared
CC
3.2
CC=cc CFLAGS="-O" CXX=CC ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --enable-thread-safe-client --disable-shared
cc/cxx
(Compaq C V6.3-029i / DIGITAL C++ V6.1-027)
CC="cc -pthread" CFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed -speculate all" CXX="cxx -pthread" CXXFLAGS="-O4 -ansi_alias -fast -inline speed -speculate all -noexceptions -nortti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-prefix=/usr/local/mysql --with-named-thread-libs="-lpthread -lmach -lexc -lc" --disable-shared --with-mysqld-ldflags=-all-static
gcc
3.0.1
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
����� ����� ���������� �������������� ��� �������� �������� MySQL AB � �������. ����� �������� �������� ����� �� �����������, �� ����� ���������� �� ��������� ����� ��� ������������ ����������.
gcc
2.95.2
CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=complex
gcc
2.7.2.1
CC=gcc CXX=gcc CXXFLAGS="-O3 -felide-constructors" ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-assembler
egcs
1.0.3a or 2.90.27 or gcc 2.95.2 and newer
CC=gcc CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-low-memory --with-extra-charsets=complex --enable-assembler
gcc
2.8.1
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-low-memory --with-extra-charsets=complex
gcc
2.7.2.1
CC=gcc CXX=gcc CXXFLAGS=-O ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex
gcc
2.7.2
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex
gcc
2.7.2.2
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex
������, ��� �������� ����� ������������ ������� ��� ����� �� ����������������� ������������, � ����� ����� ����� ������� �� � ������ �������� ������������� �� ������ internals@lists.mysql.com.
������������ RPM ��� ������ MySQL �� 3.22 ����������� ������ �������������. ������ ������� � ������ 3.22, ������ RPM ���������� � ��� � MySQL AB.
���� �� ������ �������������� ���������� ������ MySQL, �� ������� ��������
--with-debug
��� --with-debug=full
� ���������� ������� ������������ �
������� ����� ����� -fomit-frame-pointer
.
�� ��������, ����������� � ������������ ��� Windows, ������� ���������� � ������� See section 2.1.2 ��������� MySQL �� Windows.
��. ����� ������ See section 2.1.2.1 ��������� ��������� ����, ������ section 2.1.1 ��������� MySQL �� Linux � ������ See section 8.4.7 ������ ���������� ��������.
��� ��������� ��������� ������������ MySQL ���������� ��������� ���������������� ��������:
gunzip
��� ���������������� ������������.
tar
��� ���������� ������������. GNU tar
�������� ���
����������, � tar
���������� Sun - ��� ������� ��������.
��� Linux ���������� �������������� ����� ��������� � �������������� ������������ RPM (RedHat Package Manager, �������� ������� RedHat). ��. ������ See section 2.1.1 ��������� MySQL �� Linux.
���� ��� �������� ����������� � ����������, ��, ����������, ��� ��������
�������� �� mysql@lists.mysql.com ������ ����������� mysqlbug
. ���� ����
���� �������� �� ��������� � ����� ������, mysqlbug
������� ���������
����������, ������� ������� ������ ����� �������� � ������. ��� mysqlbug
�� ���������� ����������� �������� ������� ����� ��������! mysqlbug
�����
����� � �������� `scripts' ����� ���������� ������������. See section 1.8.1.3 ��� ���������� ������ �� ������� ��� ���������.
��� ��������� ��������� ������������ MySQL ���������� ��������� ��������� �������� �������:
shell> groupadd mysql shell> useradd -g mysql mysql shell> cd /usr/local shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf - shell> ln -s full-path-to-mysql-VERSION-OS mysql shell> cd mysql shell> scripts/mysql_install_db shell> chown -R root . shell> chown -R mysql data shell> chgrp -R mysql . shell> bin/safe_mysqld --user=mysql &
���
shell> bin/mysqld_safe --user=mysql &
���� �� ��������� � MySQL 4.x
����� ������������� ����� ��������, ��������� ������
bin/mysql_setpermission
, ���� ���������� ������ Perl DBI
�
Msql-Mysql-modules
.
����� ������� ����� ��������� ��������.
��� ��������� ��������� ������������ ��������� ����������� ���� ��������, � ����� ��������� � ������� section 2.4 ����������������� ��������� � ������������ ��� ����������������� ��������� � ��������:
root
.)
VERSION
������������ ����� ����� (�������� 4.1.1-alpha), � OS
��������� ���
������������ �������, ��� ������� ������������ ������ �����������
(�������� pc-linux-gnu-i586
).
-max
, �� ��� ��������,
��� ������ �������� ��� ������������ �������������� ������� � ������
��������. See section 4.7.5 mysqld-max
, ����������� ������ mysqld
. �������,
��� ��� �������� ������������ ������� �� ������ � ���� �� ������������
��������� ���� MySQL.
mysqld
���:
shell> groupadd mysql shell> useradd -g mysql mysql����������� ������� ��������� ������
mysql
� ������������ mysql
. ������
��������� ��� useradd
� groupadd
��� ��������� ������� Unix ����� �����
��������� ��������. ��� ������� ����� ����� ���������� adduser
� addgroup
.
��� ������� ����� ���� ������������ � ������ ������ mysql
������ �����.
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf - shell> ln -s full-path-to-mysql-VERSION-OS mysql������ ������� ������� ������� � ������
mysql-VERSION-OS
, � ������ -
������������� ������������� ������ �� ������ �������. ��� ��������� �����
������ ��������� �� ������� ��������� - ��� �� `/usr/local/mysql'.
shell> cd mysql� ��������
mysql
�� ������� ��������� ������ � ������������. ��������
������� ��� ����� ��������� �������� ����������� `bin' � `scripts'.
PATH
, ����� ��������
������������ ������� ��������� �������� ��������� MySQL.
See section F ���������� ���������.
mysql_install_db
, ������������ ���
������������� ���� ������ mysql
, ���������� ������� ����������, � �������
�������� ����� ������� � �������.
mysqlaccess
� ����������
����������� MySQL � �����-���� ������������� �����, �� ����������
�������� �����, ��� mysqlaccess
������� ����� ������� mysql
.
�������������� ������ `bin/mysqlaccess' �������� �� 18-� ������.
������� ������, ���������� �������� ���:
$MYSQL = '/usr/local/bin/mysql'; # ���� � ������������ ������� mysql�������� ���� ��� �������� ���� ����� � �������, ��� ������������� ���������
mysql
. ���� ����� �� �������, �� ��������� ������ Broken pipe
��� ������� mysqlaccess
.
shell> scripts/mysql_install_db�������, ��� � ������� MySQL ������, ��� 3.22.10, ������ MySQL ���������� ��� �������
mysql_install_db
. ������ ��� �� ���!
root
�
�������������� �������� ������ ������������, ��� ������� �����
����������� mysqld
, ��������� �������:
shell> chown -R root /usr/local/mysql/. shell> chown -R mysql /usr/local/mysql/data shell> chgrp -R mysql /usr/local/mysql/.������ ������� �������� ��������� ������� ����� �� ������������
root
,
������ - ��������� �������� ������ �� ������������ mysql
, � ������ -
������ �� ������ mysql
.
DBI
/DBD
,
See section 2.7 ��������� �� ��������� Perl.
����� ����, ��� ��� ��� ����� �����������, ���������� ���������������� � �������������� ������ �����������.
��������� ������ MySQL ����� � ������� ��������� �������:
shell> bin/safe_mysqld --user=mysql &
� ������ ������� ������� � ������� section 4.7.2 safe_mysqld
, �������� mysqld
� ����������� ������ See section 2.4 ����������������� ��������� � ������������.
����� ��� ��� ���������� � ��������� ��������� ����, ������� ���������, ��� ��� �������� ����������� �������� ��� ����� ��������� � ��� �� ����� �������� �� ����� �������. �� ��������� ����� ������ ��� ����, ����� �������� ���� �������� ������������ ���������� ���������� �� ���������.
��� ������ � ��������� MySQL �� ��������� ���� ���������� ��������� �����������:
gunzip
��� ���������������� ������������.
tar
��� ���������� ������������. ��������, ��� GNU tar
�������� ���������������, � tar
���������� Sun ����� ��������.
gcc
>= 2.95.2, egcs
>=
1.0.2 ��� egcs 2.91.66, SGI C++ � SunPro C++. ��� ������������� gcc
��� ������������� � libg++
. ������ gcc 2.7.x ����� ������, ��-��
������� ���������� ���������� ��������� ��������� ���������� ������
C++, ����� ��� `sql/sql_base.cc'. ���� � ��� ���� ������ gcc
2.7.x, ��
��� ����, ����� ����� ���� �������� ���������� MySQL, ����������
��������������� gcc
. ���������� gcc
2.8.1, ��� ��������, ����� �����
�������� �� ��������� ����������, ��� ��� ��� ����� �� ������������,
���� ��� ������ ��������� ���������� ����� ����������. ��� ����������
������ MySQL 3.23.x ������������� gcc
>= 2.95.2.
make
. ������ ������������� (� ������ � ����������)
������������ GNU make. � ������ ������������� ������� �� �����������
����������� �������� � ������� GNU make 3.75 ��� ����� �����.
����� �����, ����� �� ������������ ��������� ������ gcc
, ���������� �����,
����� ``��������'' ����� -fno-exceptions
. � ��������� ������ �� ���������
���������� ��������� ����, ������� ����� ���������� �������� � ������. ��
����� ����������� ������������ -felide-constructors
� -fno-rtti
������ �
-fno-exceptions
. ���� �� ������������, �� ��������� ��������� ��������:
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions \ -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler \ --with-mysqld-ldflags=-all-static
�� ����������� ������������ ������ ��� ���� ������� � ���������� �������� ���.
���� ��� �������� ����������� � ����������, �� ��� �������� �������� ��
mysql@lists.mysql.com, ����������, ������ ����������� mysqlbug
. ���� ����
���� �������� �� ������� �����-���� �������, mysqlbug
������� ���������
����������, ������� � ������� ������� ���� �������� ������ �������������.
��� mysqlbug
����������� ����������� ����, ��� �� �������� ������� �����
��������! mysqlbug
����� ����� � �������� `scripts' ����� ����������
������������. See section 1.8.1.3 ��� ���������� ������ �� ������� ��� ���������.
��� ��������� MySQL �� ��������� ���� ���������� ��������� ��������� �������� �������:
shell> groupadd mysql shell> useradd -g mysql mysql shell> gunzip < mysql-VERSION.tar.gz | tar -xvf - shell> cd mysql-VERSION shell> ./configure --prefix=/usr/local/mysql shell> make shell> make install shell> scripts/mysql_install_db shell> chown -R root /usr/local/mysql shell> chown -R mysql /usr/local/mysql/var shell> chgrp -R mysql /usr/local/mysql shell> cp support-files/my-medium.cnf /etc/my.cnf shell> /usr/local/mysql/bin/safe_mysqld --user=mysql & ��� shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &
���� ����������� ������ MySQL 4.x.
����� ���������� ��������� ������ InnoDB, ������� ��������������� ����
`/etc/my.cnf', ������ ������ #
����� ���� �����������, ������� ���������� �
innodb_....
See section 4.1.2 ����� ���������� `my.cnf'. See section 7.5.2 ��������� ������� InnoDB.
���� �� ����������� �������� ��� RPM, ��������� ��������� �������:
shell> rpm --rebuild --clean MySQL-VERSION.src.rpm
��� ������� ������� �������� ��� RPM, ������� �� ������ ����������.
����� ������������� ����� ��������, ��������� ������
bin/mysql_setpermission
, ���� ���������� ������ Perl DBI
�
Msql-Mysql-modules
.
���� ������� ����� ��������� �������� ���������.
��� ��������� ��������� ���� ����� ��������� ����������� ���� ��������, � ����� ������� � ������� section 2.4 ����������������� ��������� � ������������ ��� ������������� � ����������������� ��������:
BDB
��� BerkeleyDB). ������������
��������� ���� MySQL ������������ � ���� ������ ������� tar � �������
��������� `mysql-VERSION.tar.gz', ��� VERSION
������������ ����� �����.
mysqld
��������� �������:
shell> groupadd mysql shell> useradd -g mysql mysql��� ������� ��������� ������
mysql
� ������������ mysql
. ������ ���������
��� useradd
� groupadd
� ��������� ������� Unix ����� ����� ���������
�������. ����������� ���� ������� ����� ����� ����� ������ �������� -
adduser
� addgroup
��������������. ������������ � ������ ����� ���������
�����-������ ����, �������� �� mysql
�����.
shell> gunzip < /path/to/mysql-VERSION.tar.gz | tar xvf -��� ������� ������� ������� � ������ `mysql-VERSION'.
shell> cd mysql-VERSION������, ��� ������ ���������� ��������������� � ����������� MySQL �� ����� �������� ������� ������. ��������� MySQL � ������ �������� ������.
shell> ./configure --prefix=/usr/local/mysql shell> make��� ������� configure ���, ��������, ����������� ������� ��������� �����. ����� �������� ������ �����, ���������
./configure --help
. ���������
�������� �������� ����� ����������� � ������� See section 2.3.3 �������� ����� configure
.
���� configure
�� �������� � �� ����������� �������� ������ � �������� �
������ �� mysql@lists.mysql.com, �� ������� �������� � ���� �� ������ ��
`config.log', �������, �� ������ ������, ����� ������ ������ ������
��������. ����� ����, ���� ���������� configure
��������������
������������, � ������ ������� �������� ��������� ��������� ����� ������
�� configure
. ��� ������� ������ �� ������ ����������� ������ mysqlbug
(see section 1.8.1.3 ��� ���������� ������ �� ������� ��� ���������). ���� ���������� ��
�����������, �� ����������� � ������� See section 2.3.5 �������� � �����������?, � �������
���������� ������������ �� ������� ���� ����� ������������� �������.
shell> make install��������, ���������� ��������� ��� ������� ���
root
.
shell> scripts/mysql_install_db������, ��� � ������� MySQL �� 3.22.10 ������ ������� MySQL ���������� ��� �������
mysql_install_db
. ������ ��� �� ���!
root
� �������������� ��������
������, �������� �� ������������, ��� ������ �������� �����
����������� mysqld
. ��� �������� ��������� �������:
shell> chown -R root /usr/local/mysql shell> chown -R mysql /usr/local/mysql/var shell> chgrp -R mysql /usr/local/mysql������ ������� �������� ������� owner ������� ����� �� ������������
root
,
������ - ������� owner �������� ������ �� ������������ mysql
, � ������ -
������� group �� ������ mysql
.
DBI
/DBD
,
����������� � ������� See section 2.7 ��������� �� ��������� Perl.
����� ���������� ��������� ������ ����������� ���������� ������������������� � ��������������:
shell> /usr/local/mysql/bin/safe_mysqld --user=mysql &
���� ��� ������� ���������� ������ ���������� ����� �������� ������
mysqld
, �� ��������� ���������� ����� ����� � �����
`mysql-data-directory/'hostname'.err'. �������, ��������, ����������� � ���,
��� ��� ������� ������ ������ mysqld
(see section 4.1.4 ������ ���������� �������� MySQL �� ����� ����������).
������ ����������� � ������� See section 2.4 ����������������� ��������� � ������������.
����� ������ ������������ � ������ �������� ��� ���������� � ����� ������ �� ���-����� MySQL (http://www.mysql.com/downloads/patches.html).
��� ���������� ����� �� ������ �������� ��������� ���������, ���������� ����, � �����, ��������� ��� � ������� ������� ������, � ������� ��������� ������ �������� ����� MySQL, � ��������� ��������� �������:
shell> patch -p1 < patch-file-name shell> rm config.cache shell> make clean
����� � FTP-����� ���������������� ��� ����� � ������� ������� ��� ���
�����, ������ � ������� gzip
. ���� � ���� �������� ������ �������
���������, ��� �������� ���� ��� ������ �� ������ ��������. �����
��������� ������ ����, ��������� ��� � ������� ������� ������, � �������
��������� ������ �������� ����� MySQL, � ��������� ��������� �������:
shell> gunzip < patch-file-name.gz | patch -p1 shell> rm config.cache shell> make clean
����� ���������� ����� �������� ����������� ��� ������� ���������
��������� ����, ������� � ����� ./configure
. ����� ������� ����� make
install
������������� ���� ������ MySQL.
��������, ����� �������� make install
����������� ���������� �����
���������� � ��� ����� ������� (����������� ��� ����� mysqladmin
shutdown
). � ��������� ������� �� ����������� ������������� ����� ������
�����-���� ���������, ���� ��� �������� ���������� � ������ ����� ������.
configure
������ configure
������������ ������� ����������� ���������� �������������
������������ MySQL. ������ ����� ���������� �������������� �����
������������� ����� � ��������� ������ configure
. �� ������ configure
����� ����� �������������� ��� ������ ��������������� ���������� ���������
(see section F ���������� ���������). ����� �������� ������ ��������������
configure �����, ��������� ��������� �������:
shell> ./configure --help
���� ������� ��������� �� �������� ����� ������������ ����� configure
:
--without-server
:
shell> ./configure --without-server��� ���������� ����������� C++ �� ����� ���������������
mysql
(������ ���
������ ���������� ��������� ��������� C++). � ���� ������ ����� ������� ��
configure ���, ������� ��������� ������� ����������� C++, � �����
��������� ./configure
� ������ --without-server
. �� ����� ���������� �
����� ����� ����� ����������� ������� �������������� mysql
, �� �����
�������������� ������ `mysql.cc' ����� ������������ (���� make
�����������,
���������� ��������� make -k
- ����� ���������� ���������� ����
������������ ���� � ������ ������������� ������).
--with-embedded-server
.
configure
��������� ����� �� ����������� ����:
shell> ./configure --prefix=/usr/local/mysql shell> ./configure --prefix=/usr/local \ --localstatedir=/usr/local/mysql/data������ ������� �������� ������������ �������, � ���������� ���� ���� ��� ����� ���������� � �������� `/usr/local/mysql' ������ ��������� �� ��������� `/usr/local'. ������ ������� ��������� �������� �� ��������� ������������ �������, �� �������������� �������� �� ��������� �������������� ��������� ���� ������ (������ `/usr/local/var') � �������� ��� �� `/usr/local/mysql/data'. ����� ���������� ���������� MySQL ��� ����� ����� �������� � ������� ������ ����� (see section 4.1.2 ����� ���������� `my.cnf')
shell> ./configure --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock������� ���������, ��� ������ ���� ������ ������������ ����� ������ ���� � ��������! ����� �������������� mysql.sock ����� ����� ��������, ��������� ����� ����� MySQL (see section A.4.5 ��� �������� ��� �������� �����-���� MySQL `/tmp/mysql.sock').
configure
���, ��� �������� ����:
shell> ./configure --with-client-ldflags=-all-static \ --with-mysqld-ldflags=-all-static
gcc
��� ������������� ���������� libg++
���
libstdc++
����� ���������� configure
� �������� ����������� C++
������������ gcc
:
shell> CC=gcc CXX=gcc ./configure����
gcc
������������ ��� ���������� C++, �� �� �� ����� ���������
����������� � libg++
��� libstdc++
. ��� ����� ��������� �������� ���� ����
����� ���������� �����������, ��������� ��� ������������� ��������� ������
������������� ��������� � ������� � ������������� MySQL ���������
���������� ��������.
���� ���������� ��������� ��������� �����
���������� ��������� � ����������� �� ������������� �����������:
���������� | ������������� ����� |
gcc 2.7.2.1 | CC=gcc CXX=gcc CXXFLAGS="-O3 -felide-constructors" |
egcs 1.0.3a | CC=gcc CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" |
gcc 2.95.2 | CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro \ -felide-constructors -fno-exceptions -fno-rtti" |
pgcc 2.90.29 or newer | CFLAGS="-O3 -mpentiumpro -mstack-align-double" CXX=gcc \ CXXFLAGS="-O3 -mpentiumpro -mstack-align-double -felide-constructors \ -fno-exceptions -fno-rtti" |
--prefix=/usr/local/mysql --enable-assembler \ --with-mysqld-ldflags=-all-static������� �������, ������ ������ ������������ ��� ���� ��������� ������ gcc ������ ���� ������� ����������� ����:
CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro \ -felide-constructors -fno-exceptions -fno-rtti" ./configure \ --prefix=/usr/local/mysql --enable-assembler \ --with-mysqld-ldflags=-all-static��� �������� ����, ������� �� ���������� � ���-����� MySQL �� http://www.mysql.com/, ������������� � ������������ ������������ � ������ ���� ���������� ��� ����������� ������������� (see section 2.2.9 �������� ���� MySQL, ���������������� � MySQL AB). ���������� ��������� ���������, ����������� ������� �������� ��� ���� ��� �������, �� �� ����� ��������� ������ ������� ������������ (see section 5.5.3 ��� ���������� � ���������� ������ �� �������� MySQL). ���� ������� ��� �� ������� � ��� ���� �������� ������ � ��������� �� ���������� ��� ���� ����������� �� � ��������� ������� ���������� ���������� `libmysqlclient.so.#' (`#' ������������ ����� ����� ������), �� ��� �������� ����� ������ ����� ���������� �
configure
�����
--disable-shared
. � ���� ������ configure
�� ����� ��������� ����������
���������� `libmysqlclient.so.#'.
DEFAULT
�� �������� ��-NULL
(�.�. �� ��������, ������� ��
����� ��������� �������� NULL
). ��� �������� ���� ����� ������� INSERT
����� ������������ ������ � ������, ���� ���� �� ������� �������� ���
���� ��������, ������� �� ����� ��������� �������� NULL
. �����
��������� ������������� ������� �� ���������, ��������� configure
, ���
�������� ����:
shell> CXXFLAGS=-DDONT_USE_DEFAULT_FIELDS ./configure
--with-charset
:
shell> ./configure --with-charset=CHARSET
CHARSET
����� ��������� ���� �� ��������� ��������: big5
, cp1251
,
cp1257
, czech
, danish
, dec8
, dos
, euc_kr
, gb2312
, gbk
, german1
, hebrew
,
hp8
, hungarian
, koi8_ru
, koi8_ukr
, latin1
, latin2
, sjis
, swe7
, tis620
,
ujis
, usa7
��� win1251ukr
(see section 4.6.1 ����� ��������, ������������� ��� ������ ������ � ����������). ���� ��������� ��������������� ������� ����� �������� �
��������, ������� ����������� ������� SET CHARACTER SET
(see section 5.5.6 ��������� ������� SET
).
��������������: ���� ����� �������� ���������� ����� ��������
������, ���������� ��������� myisamchk -r -q --set-characted-set=charset
�� ������ �������. �
��������� ������ ������� ����� ������������� ����������� (����� �����
���������, ���� �� ���������� MySQL, ��������� ��� ������, �����
������������������ MySQL � ����� ������������� ������� ������ �������� �
������ ���������� MySQL).
� ������� ����� --with-extra-charsets=LIST
�����
����������, ����� �������������� ��������� ���������� �������������� �
������ �������.
����� LIST
���� ������������ ����� ����������� ���������
������ ���������, ���� ����� �������� complex
��� ��������� ���� ��������,
������� �� ����� ���� ��������� �����������, ���� ����� �������� all
���
��������� ���� ��������� � ���������.
--with-debug
:
shell> ./configure --with-debug������� ���� ����� �������� ����������� ��������� �������������� ������, ������� ����� ����� ��������� ������ � ���������� ����� ���������� � ���, ��� ���������� (see section E.1 ������� ������� MySQL).
--enable-thread-safe-client
. ��� ��������
���� ����� ����� ������� ���������� libmysqlclient_r
, � �������
������� ��������� ��������� ���������� (see section 8.4.8 ��� ������� ���������� ��������� � ��������).
��������������: ���� ������ ���������� ������ ������ � ��� ������, ���� �� ������ ������ ��� � ������������ ������ ����. ������������, ������� ������ ����� ���������� MySQL � ��������� ��� �� ����� �������, ������ ������������ ����������� ������ ������������ (���� �������� ���, ���� �������� �����������).
����� �������� ����� ��������� �� ������������� ������� �������� �����, ����������� ��������� ����������:
BitKeeper
�
http://www.bitmover.com/cgi-bin/download.cgi. ��� ������� � ������
��������� ��� ����������� ������ Bitkeeper
3.0 ��� ����� �����.
BitKeeper
������� ��������� � �������, �� ��������
����������� ��������, ����� ����������� ���� �� ����������� ���� ������,
��� ��������� �������� ����� ����� MySQL.
����� ����������� ����� 3.23:
shell> bk clone bk://mysql.bkbits.net/mysql-3.23 mysql-3.23����� ����������� ����� 4.0:
shell> bk clone bk://mysql.bkbits.net/mysql-4.0 mysql-4.0����� ����������� ����� 4.1:
shell> bk clone bk://mysql.bkbits.net/mysql-4.1 mysql-4.1� ���������� �������� ����� �������� ����� ����� ���������� � ������������ `mysql-3-23/', `mysql-4.0/' ��� `mysql-4.1/' ������ �������� ��������. ���� �� ���������� �� ������������, � ������ ������ ������ HTTP-�������, �� ������ ����� ������������ BitKeeper �� HTTP. ���� �� ����������� ������-������, ������ ���������� ���������� ���������
http_proxy
:
shell> export http_proxy="http://your.proxy.server:8080/"� ������ ������ ��������
bk://
�� http://
����� ������ ������ ������������. ��������:
shell> bk clone http://mysql.bkbits.net/mysql-4.1 mysql-4.1�������������� �������� ������ �������� ����� ����� ����������� ������� � ����������� �� �������� ������ ����������; ������ ���������.
make
, autoconf 2.53
(��� �����), automake 1.5
,
libtool 1.4
� m4
. ��������� automake 1.7
(��� �����) ���
�� ��������.
���� �� ������ ��������� MySQL 4.1, ��� ����� ����������� bison 1.75
.
����� ������ ������ bison
����� ������ ����� ������:
sql_yacc.yy:#####: fatal error: maximum table size (32767) exceeded
. ��
����� ���� ������������ ������ ������ �� �����������, ��� ���������� ���
���������, �� ������-�������� ����� ��������� ���� ��������� ������ � �����
������ ������� bison
.
�������� ������� � ���������� � ��������:
cd mysql-4.0 bk -r get -Sq aclocal; autoheader; autoconf; automake (cd innobase ; aclocal; autoheader; autoconf; automake) # ��� InnoDB (cd bdb/dist ; sh s_all ) # ��� Berkeley DB ./configure # ���� ������� ����� ����� make���� �� ��������� ����� �������� ��������� �� ���� ����� - ��������������, ��� � ��� ������������� �����
libtool
!
�������� ����� ����������� ���������������� �������� ��������� �
����������� `BUILD/'. ���� �� ������������� �������� ������ ����, �����
������������ ������ `BUILD/compile-pentium-debug'. ��� �������������� �
�������������� ������ ����������� ������������� ���� ������ ����� ��������
������, ����������� � Pentium.
make install
. ������� ���������
������������ ��� ������ �� ������, ����������� � ������������; ������
������� ����� ��������� ��������� ������ ����� ������������
������������� ������. ���� � ��� ��� ����������� ���� ������ MySQL, ��
����������� ��������� ./configure
�� ���������� ��� ����� prefix
,
with-tcp-port
� unix-socket-path
, ��������� �� ���, ��� ����
������������ ��� �������, ������������ � ������������.
make test
(see section 9.1.2 ����� ������������ MySQL).
make
� ����������� �� �����
���������������, ������� �������� ��� �� ���� �� ������
bugs@lists.mysql.com. ������� ������������� ��� � � ��� ������, ����
�� ���������� ��������� ������ ��������� ���������������� ������� GNU
� ��� ������ ���� ��� ������� ���������� ��� ���������������� ����.
������ ���� ��� ���������� aclocal
�� �������� ������ command not
found
��� ��������� ����������� ��������, �� ���� �������� �� ����. �
����� ������ ������� ���������, ��� � ��� ����������� ��� �����������
���������������� ��������� � ��� ���� ���������� PATH
�������
���������, ����� �������� ����� ����� ��.
bk clone
, ���������� ������������ ��������� bk pull
��� ���������
����������.
bk
sccstool
. ��� ����������� �����-���� �������, ������� ��������� ���
���������, ��� ����, �� �������� ��������� �������, �� ������������ -
��������� ������ �� internals@lists.mysql.com. ����� ����, ���� ��
��������, ��� � ��� ���� ������ ���� �� ����������, ��������� �� ����
�� ������ ��������� �� ����� ������. bk diffs
������� ���� �����
�������� ��������� � �������� ���. ���� � ��� ��� ������� ��������
���, ����������� ���� ����, ������ �������� �� ��������.
bk helptool
.
bk ci
��� bk citool
) ���������� �������
��������� � ����������� � ��� ���������� ������ �������� (internals).
� ����� ������, ��� �� ����� ������������ commit (��������� ��������-���������
������ �� �������� bk push
), �� ������, ����� bk diffs
, ��������� �����.
�� ����� ������ ������������� ���������, ����������� � �������� ��� � ������, ��������, �� ������ http://mysql.bkbits.net:8080/mysql-4.1 ��� MySQL 4.1.
����������� ��������� � ��������� ������, ������� ����� ����������� ���:
shell> bk clone bk://mysql.bkbits.net/mysqldoc mysqldoc
�� Solaris ��� Linux � �������������� ����������� gcc
��� ��������� MySQL � ���
������������� ����� � ��� �����-���� ��������������. � ������ ��������
����� ��������� �������������� ��-�� �������� ���������� ��������� ������
(�� ������ ��������������, ������� ����� ��������� ��� �������������
������� MIT-pthreads
, ����������� � ������� see section 2.3.6 ��������� �� ������� MIT-pthreads).
������������ ������ ������� ��������� � ����������� ���� �������.
������� ������ ������� ������������ ���������� ��������������������. � �������, ����� �������������������� ������������� ����������, ������� ��������� ���������:
configure
����������� ����� ����, ��� ��� ������� ���
�����������, �� ����� ������������ ����������, ������� ���� ������� ��
����� ����������� ������ ������� (����� ���������� �������� �
`config.cache'). ��� ������� configure
���� ������ ���� �, ���� ��
����������, ������ ��� ����������, ������ �� �������������, ��� ������
���������� ��� ��� ���������. ��� ���������� ���������������� ���
������������� �������� ������������.
configure
���������� ����� ��������� make
���
������������������. ������, ��������, ������� ��� ����������� �������
������ ��������� ����� �� ���������� ����������, ��������� ��� ����
�������������� � �������������� ������ ����� ������������.
����� �� ��������� ������������� ������ ���������������� ���������� ���
��������� ������, ����� ������������ configure
��������� ���������
�������:
shell> rm config.cache shell> make clean� �������� ��������������� �������� ����� ������������ �������
make
distclean
.
� ��������� ������ ������������ ��������� �������� �������������� MySQL,
�������, ��� ���������, ��������� �������� �����:
Internal compiler error: program cc1plus got fatal signal 11 ��� Out of virtual memory ��� Virtual memory exhausted�������� ����������� � ���, ��� ��� ���������� `sql_yacc.cc' �� ������������� ��������� �����������
gcc
��������� ������������ ����������
������. ���������� ���������� ������ configure
� ������ --with-low-memory
:
shell> ./configure --with-low-memory������ ����� �������� ����������
-fno-inline
� ������������� ������ ���
gcc
� -O0
- ��� ������������� ������-���� ������� �����������. ���� ���� �
��� ������� ������ � ������������ ��� ��������, ���, �� ������ ������,
���������� ����� �� �� �������, ��� �� ����� ���������� ������������ �����
with-low-memory
. ��� ��������, �� ����� �����������, ��������� ���� ��
�������� � ����������� ������������, ����������� �������� �������������;
������ ��� ����������� � ������� ����� --with-low-memory
.
configure
�������� c++ ��� ��� ����������� � GNU c++
��������� � -lg++
. ��� ������������� gcc
���� ����� ������ �����
�������� ����� �������� � �������� ������������, ���:
configure: error: installation or configuration problem: C++ compiler cannot create executables.�� ����� ���������� ����� ����� ��������� ��������, ����������� �
g++
,
libg++
��� libstdc++
. ���� �� ������ �� ������������� ����������� � ���,
���, ��������, � ��� ��� g++
��� ���� g++
, �� ��� ���������� libg++
���
libstdc++
. ������� ������� ���� `config.log' - �� ���� �� ������ �����
���������� �������, �� ������� �� ������� ���������� c++ ! ����� ������
��� ��������, ����� � �������� ����������� C++ ������������ gcc.
���������� ���������� ���������� ��������� CXX
� gcc -O3
. ��������:
shell> CXX="gcc -O3" ./configure��� ������� ��������, ��������� gcc ����������� �������� ���� C++ ��� �� ������, ��� �
g++
, �� �� ��������� �� ������� libg++
��� libstdc++
.
����, �������, � ������ ����������� ���������� ���� �������, �������
����������� � ��������� g++
, libg++
� libstdc++
. ������ �� ��
������������� �� ������������ libg++
��� libstdc++
� MySQL, ��������� ���
������ �������� ������ ��������� ���� mysqld
��� �������������� �����-����
�����������. ��������� ������ ���� ��������� � ������� ����� ��������
���������� �������� � ������������� MySQL.
make
�� GNU make
:
making all in mit-pthreads make: Fatal error in reader: Makefile, line 18: Badly formed macro assignment ��� make: file `Makefile' line 18: Must be a separator (: ��� pthread.h: No such file or directory������������ ������� Solaris � FreeBSD, ��� ��������, ����� ���������� ���������
make
.
�������� �����, ��� ������ GNU make
3.75 ��������.
CFLAGS
�
CXXFLAGS
. ����� ��� �� ����� ����� ������� ����� ������������,
��������� CC
� CXX
. ��������:
shell> CC=gcc shell> CFLAGS=-O3 shell> CXX=gcc shell> CXXFLAGS=-O3 shell> export CC CFLAGS CXX CXXFLAGS� ������� section 2.2.9 �������� ���� MySQL, ���������������� � MySQL AB �������� ������ �������� ��� ��������� ������ ����������� ������.
gcc
:
client/libmysql.c:273: parse error before `__attribute__'����������
gcc
2.8.1 �������� ��� ����������, �� �� ����������� ������
���� ������������ gcc
2.95.2 ��� egcs
1.0.3a.
mysqld
�� ��������� ������, �������� �����������
����, �� ��� ��������, ��� ������� configure
����������� ����������
��� ���������� ��������� � �������� accept()
, getsockname()
���
getpeername()
:
cxx: Error: mysqld.cc, line 645: In this statement, the referenced type of the pointer value "&length" is "unsigned long", which is not compatible with "int". new_sock = accept(sock, (struct sockaddr *)&cAddr, &length);����� ��������� ��� ������, �������������� ���� `config.h' (������� ������������
configure
). ������� � ��� ��������� ������:
/* Define as the base type of the last arg to accept */ #define SOCKET_SIZE_TYPE XXX� ��������
XXX
�� size_t
��� int
- � ����������� �� ����� ������������
������� (������, ��� ��� �������� ���������� ����� ��������� ������ ���
��� ������� configure
, ��������� configure ��������������� ����
`config.h').
"sql_yacc.yy", line xxx fatal: default action causes potential...��� ������� ����, ��� ���� ������
yacc
�������� ��������. ��������,
������� ���������� bison
(GNU-������ yacc) � ������������ ������ yacc
.
mysqld
��� ������� MySQL ��������� configure
� ������ --with-debug
, ����� ���������������� � ��������� ���
��������� � ����� ���������� ����������� (see section E.2 ������� ������� MySQL).
� ���� ������� ����������� ��������� ������� ������������� ������� MIT-pthreads.
������� ����� � ����, ��� ��� Linux ������������ ������ MIT-pthreads ������, ��� ����� ���������� ���������� LinuxThreads! See section 2.6.1 ���������� � Linux (��� ������ Linux).
���� ���� ������� ���� �� ���� �� ������������ ��������� �������, �� ���������� ������������ MySQL, ��������� ����� ��������� MIT-pthreads. � ����� �������� ��������� ������ ������� FreeBSD, SunOS 4.x, Solaris 2.4 � ����� ������, � ����� ��������� ������ (see section 2.2.5 ������������ �������, �������������� MySQL).
��������, � ������ MySQL 4.0.2 ������ MIT ����� �� ������������ � �������� �������� �������. ���� ��� ������������� ����� ���� �����, �� ������ ��� ������� � http://www.mysql.com/Downloads/Contrib/pthreads-1_60_beta6-mysql.tar.gz
����� ��������, ���������� ���� ����� � ������� �������� ������� MySQL.
��������� ����� ������� mit-pthreads
.
configure
� ������ --with-mit-threads
:
shell> ./configure --with-mit-threads��� ������������� ������� MIT-pthreads �� �������������� ����������� ������ MySQL � ��������, �� ���������� �������� ���, ��������� �� ����� �������������� ���� ��������� � ������ ����.
--without-server
��� ������ ������ ����������� ����,
�� ������� �� ����� �����, ����������� �� ������ MIT-pthreads, � �����
������������ ����������� ����� ������ Unix �� ���������. ��������� ������ Unix
�� �������� � �������� MIT-pthreads �� ��������� ����������, �� ��� �������
���������� �������� ������� ������������ -h
��� --host
.
--use-external-locking
. ��� ������
���������� ���� �� ����������� ������������ ��� MySQL-������� �� �����
� ��� �� ������ ������ (�� �������������!).
bind()
�� ������� ������������ ����� ���
������-���� ��������� �� ������ (�� ������� ����, ��� Solaris). �
���������� ��� ����������� � ������� ����������. ��������:
shell> mysqladmin version mysqladmin: connect to server at '' failed; error: 'Can't connect to mysql server on localhost (146)'��� ������� ���� �������� ������� ��������� ���������� �������
mysqld
�
������������� ���. � ��� ��� ����������� ������ � ��� �������, ����� ��
��������� ������ ������� � ����� �� ����� ��� ���������.
sleep()
�� ����������� � ������� SIGINT
(break
). ��� ������� ������ � ���
������, ���� ��������� mysqladmin --sleep
. ������� ����� ���������
������ sleep()
, ������ ��� ���������� ����� ��������� � �������
�������� ������.
ld: warning: symbol `_iob' has differing sizes: (file /my/local/pthreads/lib/libpthread.a(findfp.o) value=0x4; file /usr/lib/libc.so value=0x140); /my/local/pthreads/lib/libpthread.a(findfp.o) definition taken ld: warning: symbol `__iob' has differing sizes: (file /my/local/pthreads/lib/libpthread.a(findfp.o) value=0x4; file /usr/lib/libc.so value=0x140); /my/local/pthreads/lib/libpthread.a(findfp.o) definition taken
implicit declaration of function `int strtoll(...)' implicit declaration of function `int strtoul(...)'
readline
� ��������
MIT-pthreads (��� �� �������� �����������, �� ��� ����-�� �����
������������ �������).
��� ����������� ��������� ��������:
������ MySQL
workdir
).
File
�������� Open Workspace
.
mysql.dsw
, ����������� � ������� ��������.
Build
�������� ������� Set Active Configuration
.
mysqld
- Win32 Debug
� ������� OK
.
F7
, ����� ������ ������� ���������� ���������� ������
�������, ��������� � ��������� ���������� ����������.
workdir
���������� � ������� `c:\mysql' ���������
�����������:
����� ��������� MySQL (�� ��������� ������������ ��� ��������� ����) ���������� ������������������� ������� ����������, ��������� ������ � ���������, ��� ������ �������� ���������. ����� ����� ������������ �������������� ������ � ��������� �������, ����� ������������ ������� �������������� �������� � ���������� ������.
������ ��� ��������� �� ��������� ���� ��� ��������� ������ ���������� � ������� ������� ����� ��������� ��������� �������:
shell> ./scripts/mysql_install_db shell> cd mysql_installation_directory shell> ./bin/safe_mysqld --user=mysql &
��� ��������� ������������ (�� �� ��� ������� RPM ��� pkg) �������� ���:
shell> cd mysql_installation_directory shell> ./scripts/mysql_install_db shell> ./bin/safe_mysqld --user=mysql &
���
shell> ./bin/mysqld_safe --user=mysql &
���� �� ����������� MySQL 4.x.
��� �������� ������� ���� ������ mysql
, ������� ����� ������������ ���
���������� ������� � ���� ������, ���� ������ test
, ������� �����
������������ ��� ������������ MySQL, � ����� ������ ���������� ���
������������, ������� ��������� mysql_install_db
� ��� ������������ root
(��� �����-���� �������). ��� ���� ����� ����������� ������ mysqld
.
mysql_install_db
�� �������������� ������ ������� ����������, ��� ��� ��
������ ����� ���������� � ����� ������. ���� ��� �� ����� ���� ������
test
, �� ����� ������� � ������� mysqladmin -u root drop test
.
������������ ����� ����� ��������� �� �������� ���������� ������ ������������ MySQL. ��� ��������� ������������ ������� �������� ��� ������� ����������� (������ ���-������ ����� `/usr/local/mysql'). ��� ������������ � ���� ��������� ���� ��� - ������� ������� ������ ������ �������� ����� MySQL.
� ��������, �������������� � ��������� ������� � ����������� �����������,
BINDIR
������������ ����� ���� � ���� ��������������, ��� ���������������
��������� ����� mysqladmin
� safe_mysqld
. ��� ��������� ������������ ���
������� `bin' ������ ������������. ��� ������������ � ���� ��������� ����
BINDIR
����� ������������ ����� `/usr/local/bin', ���� ��� �������
configure
�� ������ ����, ��� `/usr/local' ��������������� �������.
EXECDIR
- �����, ��� ��������������� ������ mysqld
. ��� ���������
������������ ��� �� �� �����, ��� � BINDIR
. ��� ������������ � ����
��������� ���� EXECDIR
����� ������������ ����� `/usr/local/libexec'.
��������� �������� ������������:
mysqld
� ���������� ��������
������� ���������� MySQL, ���������� �� ����������, �������
����������, ����� �������� ������������� ��������� ������������ �
�������. ������ ��� �������� � ������� ������� mysql_install_db
:
shell> scripts/mysql_install_db��� �������,
mysql_install_db
������� ������� ������ ������ ��� ���
��������� MySQL. ����� �������, ���� ������������ ������������
������������ ���������, �� ������ ���� ����� ���������� (������ ������
mysql_install_db
���������� ��������� ��� ������������� � �� ���������
������� ��� ������������ �������; ������� ���� � ��� ��� ����������� �
���, ��� ���������, �� ������ ����� ��������� mysql_install_db
). ������
mysql_install_db
������� ����� ������ (user
, db
, host
, tables_priv
,
columns_priv
, and func
) � ���� ������ mysql
. �������� �������� ����������
������ � ������� See section 4.3.4 ������� ����������� ���������� MySQL. ���� � ����
������, �� ��� ���������� ��������� ������������ root MySQL ������ ���,
��� ������, � ������ ������������ ��������� ��������� ��� ������������
���� ������ � ������ test
��� ������������ � test_
. ���� �������
���������� �� �����������, �� � ��������� ������� ��� ������� �������
�������� ��������� ������:
mysqld: Can't find file: 'host.frm'����� ������ ����� ��������� � � ������ ��������� ������������ MySQL, ���� �� �� ������ ������ MySQL � ������� ���������� ������� `./bin/safe_mysqld'! See section 4.7.2
safe_mysqld
, �������� mysqld
.
��������, ��� ����������� ��������� mysql_install_db
��� root
. ������ ���
������� �� ������ ��������� ������ MySQL ��� ������������������� (��-root
)
������������, ��� �������, ��� ���� ������������ ����� ������ ������ �����
�� �������� ���� ������ � ���������� � ���� �����. ���������� �� �������
MySQL � �������� �������������������� ������������ ������ � ������� See section A.3.2 ������ MySQL �� �������� ������������. ���� ��������� �������� �
mysql_install_db
, ����������� � ������� See section 2.4.1 �������� ��� ������� mysql_install_db
. ����������� MySQL ������������ ��������� ���������
������� ������� mysql_install_db
:
mysql_install_db
����� ��������. ��� �������, ���� ����� ����������
MySQL �� ���������� ������� � ������ � ���� �� ������������. �
����� ������ ���, ��������, ����������� ������ �������� ���������
�������������� ������ INSERT
� �������� mysql.user
� mysql.db
!
mysql_install_db
, ����� ������������
mysql -u root mysql
��� ������� � �������� ���������� ���
������������ MySQL � ������������ root
� ��������� ������� SQL ���
����������� ������ ���������� ��������.
mysql_install_db
.
shell> cd mysql_installation_directory shell> bin/safe_mysqld &���� ��������� �������� � �������� �������, See section 2.4.2 �������� ��� ������� ������� MySQL.
mysqladmin
��� ��������, ��� ������ ��������. �������
�������� ����, ��� ������ ������������� � �������� �� �����������,
������������ ��������� �������:
shell> BINDIR/mysqladmin version shell> BINDIR/mysqladmin variables����� ��
mysqladmin version
����� ����� ��������� �������� � �����������
�� ������������ ��������� � ������ MySQL, �� ������ ���� ����� ��
����������� ����:
shell> BINDIR/mysqladmin version mysqladmin Ver 8.14 Distrib 3.23.32, for linux on i586 Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license. Server version 3.23.32-debug Protocol version 10 Connection Localhost via Unix socket TCP port 3306 UNIX socket /tmp/mysql.sock Uptime: 16 sec Threads: 1 Questions: 9 Slow queries: 0 Opens: 7 Flush tables: 2 Open tables: 0 Queries per second avg: 0.000 Memory in use: 132K Max memory used: 16773K����� �������� ������������� � ���, ��� ��� ����� ������ � �������
BINDIR/mysqladmin
, ��������� ��� ������� � ������ --help
.
shell> BINDIR/mysqladmin -u root shutdown
safe_mysqld
��� ����� ������� ������ mysqld
. ��������:
shell> BINDIR/safe_mysqld --log &����
safe_mysqld
������ �������, ����������� ��������� ������� �� ��������
��������� MySQL (���� �� ��� �� ���). ���� ������� ��-�������� ��
��������, ��. ������ See section 2.4.2 �������� ��� ������� ������� MySQL.
shell> BINDIR/mysqlshow +-----------+ | Databases | +-----------+ | mysql | +-----------+ shell> BINDIR/mysqlshow mysql Database: mysql +--------------+ | Tables | +--------------+ | columns_priv | | db | | func | | host | | tables_priv | | user | +--------------+ shell> BINDIR/mysql -e "SELECT host,db,user FROM db" mysql +------+--------+------+ | host | db | user | +------+--------+------+ | % | test | | | % | test_% | | +------+--------+------+� ����������� `sql-bench' �������� ��������� MySQL ��������� ����� ������ ������������������, ������� ����� ������������ ��� ��������� ������ MySQL �� ��������� ����������. ������� `sql-bench/Results' �������� ���������� �������� ���������� �������� ��� ��������� ��� ������ � ��������. ����� ��������� ��� �����, ��������� ��������� �������:
shell> cd sql-bench shell> run-all-tests���� � ��� ����������� ������� `sql-bench', ��, ��������, �� ��������� � ������� RPM ��� ��������� ������������ (� ������ RPM � �������������� ��������� ���� ���������� ������� ������ ������������������). � ���� ������ ������ ��� ������������ ����� ������ ������������������, ���������� ��� ����������. ������� � ������ MySQL 3.22, ���������� RPM-����� ������ ������������������, `mysql-bench-VERSION-i386.rpm', ������� �������� ��� ������ ������������������ � ������. ���� ����������� ��������� ����, ����� ����� ��������� ��� ����� � ����������� `tests'. ��������, ����� ��������� `auto_increment.tst', �������� ���������:
shell> BINDIR/mysql -vvf test < ./tests/auto_increment.tst���������� ����� ���������� � ���� `./tests/auto_increment.res'.
mysql_install_db
������ mysql_install_db
������������ ������ ��� �������� ����� ������
���������� MySQL. �� �� ������ �� �� ����� ������ ������! � ���� �������
���������� MySQL ��� �����������, ���� ������ ������ �� ����� ������!
��� ���� ����� ������� ������� ���������� ������, ���������� ����������
������ mysqld
, ���� �� ��������, � ����� ��������� ���-������ �����:
mv mysql-data-directory/mysql mysql-data-directory/mysql-old mysql_install_db
� ���� ������� ����������� ��������, � �������� ����� ����������� ���
������� mysql_install_db
:
mysql_install_db
�� ������������� ������� ����������
mysql_install_db
�� � ��������� ���������� �������
���������� � ����������� ���� ������ ����� ������ ��������� ���������:
starting mysqld daemon with databases from XXXXXX mysql daemon ended� ����� ������ ���������� ����� ��������� ������� ��������� ������! ���� ������ ������ ���������� � �������� `XXXXXX', ��������� � ������ ��������� �� ������. � ��� ���������� ���������� � ���, ������ �� ����������
mysqld
.
���� ��� �� ������� ����������� � ���, ��� ���������, ��� ������� ������
�� ������ �������� � ���� ������ ������, ��������� mysqlbug
! ��.������
See section 1.8.1.3 ��� ���������� ������ �� ������� ��� ���������.
mysqld
mysql_install_db
. ������
mysql_install_db
������ ����������� ������ ������� ��� ��������� MySQL
������ ���.
mysqld
��������� ������� ������ �� ��������
Can't start
server: Bind on TCP/IP port: Address already in use
��� Can't start server:
Bind on unix socket...
. See section 4.1.3 ��������� ���������� �������� �� ���� ���������.
mysql_install_db
��� ���
������� ��� ������������� mysqld
. ���������� ������� ������ ������� ���
������ � ��������� ������ ��������� �������:
shell> TMPDIR=/some_tmp_dir/ shell> MYSQL_UNIX_PORT=/some_tmp_dir/mysqld.sock shell> export TMPDIR MYSQL_UNIX_PORTSee section A.4.5 ��� �������� ��� �������� �����-���� MySQL `/tmp/mysql.sock'. ���� `some_tmp_dir' ������ ��������� �� ��������� �������, ��� �������� � ��� ���� ������ ��� ������. See section F ���������� ���������. ����� ����� � ��� ������ ��������� ����������� ���������
mysql_install_db
� ������ ������ ������� � ������� ���������
������:
shell> scripts/mysql_install_db shell> BINDIR/safe_mysqld &
mysqld
glibc
����� ������, ���
2.0.7-5, ������� ������������ � ���, ����� ���������� ��� ����� ��� glibc
!
� ������� �������� MySQL ������� ������� ���������� ����� �� ����. ������
�� ������ ����� �������� � ���������� ������ �� http://lists.mysql.com/.
����������� ����� � ������� See section 2.6.1 ���������� � Linux (��� ������ Linux). �����
����� ��������� mysqld
�������, ��������� ����� --skip-grant-tables
, �
�������������� �������� ���������� � �����������, ��� ������ mysql
:
shell> BINDIR/safe_mysqld --skip-grant-tables & shell> BINDIR/mysql -u root mysql��
mysql
� ������ ������ ��������� ������� SQL � mysql_install_db
.
��������������, ��� ����� ����� �� ��������� mysqladmin flush-privileges
��� mysqladmin reload
, ����� ������ ���������� ������� ����������.
���� �� ����������� ������������ �������, �������������� ���������� (InnoDB, BDB), ������� ������ ����� ������� ���� `my.cnf' � ���������� ����� ������� ��� ��� ����� ������, � �������� ����������� ��������. See section 7 ���� ������ MySQL.
� ����� ������ ������ mysqld
����������� ����� �� ��������� ��������:
mysql.server
. ���� ������ ������������ ��������������� ���
������� � �������� �������. ����� �������� �� ������ � �������
See section 2.4.3 �������������� ������ � ��������� MySQL.
safe_mysqld
, ������� ���������� ��������������� �����
��� mysqld
� ����� ��������� mysqld
� ����� �������.
See section 4.7.2 safe_mysqld
, �������� mysqld
.
mysqld
��������.
��� ����� ������� ����� mysqld
�������� ���� ������� �� ������� ������
(datadir
). � ��� �� ������� ����� ���������� �����, ����� pid (ID
���������) � ���������� ���� ������.
�������������� �������� ������ ������ ��������������� ��� ����������
������������. ������ ���� mysqld
������� ����� ������� ������ ���-���� �
������ �����, � �� ���, ��� �� ������������� ���������� � ����� �������,
�� ����� mysqld
�� ����� �������� ���������. ���� ���� �������� �
������������� ������, ��, ������� mysqld
� ������ --help
, �� ������ �����
���������� � ���, ��� ��������� ����� mysqld
� ����� ��������� �����
������� �� ���������. ����� �������������� ��������� �� ���������
��������� ���������� ���� ����� ��� ���������� mysqld
� ��������� ������
(��� ����� ����� ����� ������������ � safe_mysqld
).
������ ��������� ��������� mysqld
������ �������, � �������
��������������� MySQL. ��� ����� ������� � ������� ����� --basedir
. �����
����� ������������ --help
��� �������� ������� �� ��������� ����� �����
(������, ��� --help
������ ���� ��������� ������ � ������� mysqld
).
��������:
shell> EXECDIR/mysqld --basedir=/usr/local --help
����� ����������� ��������� ��������� ����� ���������� ������ ��� �����
--help
.
����� �� ����� �� �� ������������ ��� ������� �������, ���� ��� ���������
������ ����������� ���������, �� ��������� ���������� ����, ����� ������,
������ ������ ���������� ��������. ���������� ����� ��������� � ��������
������ (������ `/usr/local/mysql/data' ��� ��������� ������������,
`/usr/local/var' ��� ������������ ��������� ���� � `\mysql\data\mysql.err'
��� Windows). � �������� ������ ������� ������ ����� � ������� � ����
`host_name.err' � `host_name.log', ��� host_name
- ��� ������ ����������
�����. ����� ��������� ��������� ��������� ����� ���� ������:
shell> tail host_name.err shell> tail host_name.log
� ���������� ����� ����� ������ ���-������ ������� �� ���������:
000729 14:50:10 bdb: Recovery function for LSN 1 27595 failed 000729 14:50:10 bdb: warning: ./test/t1.db: No such file or directory 000729 14:50:10 Can't init databases
��� ��������, ��� �� �� ��������� mysqld
� --bdb-no-recover
� ���� ������
Berkeley DB ����� ���-�� ��������� � ����� ���������� ������ ��� �������
������������ ���� ���� ������. ����� ����� ����������� ����������,
���������� ����������� ������ ���������� ���� Berkeley DB �� �������� ���
������ � ��������� ������ �����, ��� ����� ����� ����� ������� ���.
���������� ����� ����� ����� `log.0000000001' � �.�.; ����� ����������
��� ������ �������.
���� �� ���������� mysqld
�������� � ���������� ������ BDB � mysqld
���
������ ������� ���� ����������� ������ (coredump), �� �������� ����� ���
����� ���� �����-���� �������� � �������� �������������� BDB. � ����
������ ����� ����������� ������ mysqld � --bdb-no-recover
. ���� ���
��������, �� ������� ������� ��� ����� `log.*' �� �������� ������ �
����������� ��������� mysqld
�����.
���� �������� ����������� ���� ������, �� ��� ��������, ��� ���������
������ ��������� (��� ������ ������ mysqld
) ��� ���������� ������ TCP/IP
���� ��� �����, �� ������� mysqld
�������� �������:
Can't start server: Bind on TCP/IP port: Address already in use ��� Can't start server : Bind on unix socket...
����� ���������, ��� ������� ����������� ������� mysqld
���, �����������
ps
. ���� ������ ���������� ������ �� ������, �� ����� �����������
��������� ������� telnet your-host-name tcp-ip-port-number
� ������ ����
��� ������� ``Enter''. ���� �� �� ��������� ��������� �� ������ �����
���������� telnet: Unable to connect to remote host: Connection refused
,
������, ��� ���� TCP/IP ����, ������� mysqld
�������� ������������, ���
����� ������ ����������. section 2.4.1 �������� ��� ������� mysql_install_db
�
������ See section 4.1.4 ������ ���������� �������� MySQL �� ����� ����������.
���� mysqld
� ��������� ����� ��������, �� ����� ����� ������������ ��
��������� ����� ��� ������ ��������� �������:
shell> mysqladmin variables ��� shell> mysqladmin -h 'your-host-name' variables
���� ��� ������� mysqld
�� �������� ������ Errcode 13
, ��� ������
Permission denied
, ��� ��������, ��� � ��� �� ���� ���� ������/���������
����� � ���� ������ MySQL ��� � ���������� ��������. � ����� ������ ���
������� ���� ��������� mysqld
��� ������������ root
, ���� �������� �����
������� � ���������� ������ � ���������, ����� ����� ����� ������������
��.
���� safe_mysqld
��������� ������, �� �� �� ������ ������������ � ����, ��
������� ���������, ��� � `/etc/hosts' ���� ������, ������� ��������
�������� ���:
127.0.0.1 localhost
��� �������� ��������� ������ � ��������, �� ������� ������� ���������� �������, � ��� ������� MySQL ������� ��������������� ��� ������������� ������� MIT-pthreads.
���� �� �� ������ ��������� mysqld
, �� ����� ����������� �������
�������������� ����, ����� ���������� ������ ��������.
See section E.1.2 �������� �������������� ������.
��� ������������� ������ InnoDB ������� ��������� ����� �������, ������������� ��� InnoDB. See section 7.5.2 ��������� ������� InnoDB.
��� ������������� ������ BDB (Berkeley DB) ���������� ������ �����
��������� ������������� ��� BDB ����� �������. See section 7.6.3 ��������� ������� BDB
.
������� mysql.server
� safe_mysqld
����� ����������� ��� ���������������
������� ������� �� ����� �������� ������������ �������. ������
mysql.server
����� ����� ������������ ��� ��������� �������.
����� ��������� ������ mysql.server
��� ������� ��� ��������� �������, ���
������� �������� � ����������� start
��� stop
��������������:
shell> mysql.server start shell> mysql.server stop
mysql.server
����� ����� � ����������� `share/mysql'
���������������� �������� MySQL ��� � �������� `support-files' ������
�������� ����� MySQL.
����� ��� ��� ������ mysql.server
�������� ������, �� �������� ������
������� �� ��������������� ������� MySQL, ����� �������� safe_mysqld
.
��������, ����������� ��������������� ������ mysql.server
, ���� ��������
����������� ���������� ���� �� � ����������� �����. ������������� ���,
������ cd
� ��������������� ������� ����� ���, ��� �� ��������
safe_mysqld
. ���� �� ������ ��������� ������ �� �������������
������������, �� �������� ��������������� ������ user
� �����
`/etc/my.cnf' ��� �������� ����� � ���� �������.
mysql.server stop
������������� ������ ����� ������� ��� �������.
����� ���������� ������ ������� - ��� ������ ������� mysqladmin shutdown
.
��� ������� �������� ��� ������� ������� � ��������� � ��������������� ����� � ������ `/etc/rc*', ���� �� ������ ������������� ��������� MySQL �� ����� �������.
�� ����������� ��������� Linux, ���������� ����������� ���� mysql.server
� ������� `/etc/init.d' (��� `/etc/rc.d/init.d' �� ����� �������
�������� Red Hat). ����� �����, ��������� ����� �������, ����� ��������
�������������� ������ MySQL ��� �������� �������:
shell> chkconfig --add mysql.server
� �������� ������������, � ��������� �� ����� ������������ `/etc/rc.local' ��� `/etc/init.d/boot.local' ��� ������� �������������� �������� ��� ��������. ��� ����, ����� MySQL ��������� � �������������� ����� ������, �� ������ �������� ����� ����� ����� � ��������� ������:
/bin/sh -c 'cd /usr/local/mysql ; ./bin/safe_mysqld --user=mysql &'
����� ����� �������� ����� ��� ������� mysql.server
� ���������� ����
`/etc/my.cnf'. ������� ���� `/etc/my.cnf' ����� ��������� ���������
�������:
[mysqld] datadir=/usr/local/mysql/var socket=/var/tmp/mysql.sock port=3306 user=mysql [mysql_server] basedir=/usr/local/mysql
������ mysql.server
�������� ��������� �����: datadir
, basedir
�
pid-file
.
� ������� ������������ ������ �����, ������� ������ �� ������������� ����������� �������� ������ �� ������ �����:
������ | ������ ����� |
mysqld | mysqld � server
|
mysql.server | mysql.server , mysqld , � server
|
safe_mysqld | mysql.server , mysqld , � server
|
See section 4.1.2 ����� ���������� `my.cnf'.
����� MySQL, ���������� ��������� � ������, ������ ����� ���������� �����
���������� �������� ����� � ��� �� �����������, ���� ������������ ���� �
�� �� ������� ������ MySQL. � ��������� ����� ������� �������� ������ �
������� 3. ��� ��������� ��������� �� ����� ������ MySQL (��� ���� �����
����� ���������� ������� ����������) ���������� ��������� myisamchk -r -q --set-character-set=charset
�� ���� ��������. � ��������� ������ ������� ����� �������������
�����������.
� ������ ��������� � ����� ������� ������ ����� ������������� ������
������ mysqld
, ������� �� ��� �� ���-������ �����
mysqld-old-version-number
. ���� ����� ����� mysqld
����� ������ ������
����� ���� �� ���, ��� ���������, �� ����� ������ ���������� ������ �����
������ � ������������� ������!
�, ����������, ��� ������������ ������� ����� ������� ��������� ����� ������ ��� ������.
����� ������������ � ��� ����� ���������� �������� � ��������������������
����������� �����������, ������ ��� Commands out of sync
, ��� ���������
����������� ������ ���������� (coredump). ������� ����� ���� � ���, ���
��� ���������� �������� ���� ������������ ������ ������������ ���
������������ �����. � ���� ������ ������� ��������� ���� �������� ������
����� `mysql.h' � ���������� `libmysqlclient.a', ����� ���������, ��� ���
�� ������ ������������ MySQL. ���� ��� �� ���, �� ��������� �����
�����������������!
���� ��������� �������� � �������� ������ ������� mysqld
��� ��������� �
������������ ��� ������, �� ����� ���������, ��� �� �� ����������� ������
���� `my.cnf' �� ������ ���������! ��� ����� ��������� � �������
program-name --print-defaults
. ���� ��� ��������� ������ ����� ���������
������� ���-������ ����, �� ��� ���� `my.cnf' �������� �������� �
��������� ������� �� ��� �������!
������ ��� ��� ��������� ������ ������ MySQL ���� ����� ��������� ������ �
����������������� ����������� Msql-Mysql-modules
, �������� ���� ��
��������� �������� ����, ��� ���� ������� DBI
������� ����� ������������
MySQL.
� ����� ������, ����� ��������� ������� �� ������ 4.1 � ����� ������:
mysql_fix_privilege_tables
��� �������� ����� �������� � ��������. ��� ����� ��� ����� ���������� ������
� ��������.
����� ���� ����� ��������� ������ �����, �� ������� ������� �������� �������� ��� �������� �� 4.1:
mysql> SELECT cast("2001-1-1" as DATE) -> '2001-01-01'
SHOW CREATE TABLE
� mysqldump
.
(MySQL 4.0.6 � ���� ����� ������ ����� dump-�����, �� �� ������� ������ MySQL).
'YYYY-MM-DD HH:MM:DD'
.
���� �� ������ �������� �� ��� ����� - ��� ������� �������� +0
� ������� timestamp
.
��������� ����� ��������� ����� ������ �� ��������������.
--shared_memory_base_name
.
�������� �������� ��� ������ ����������� ������ (.frm) ��������� � 4.1. MySQL 4.0.11 �����
������ ����� ���� �������, �� ����� ������ ������ �� �����. ���� ��� ����� ���������� ������� � 4.1
�� ����� ������� ������ MySQL, ��� ������� ������������ mysqldump
. See section 4.8.5 mysqldump
, ��������� ������ ������ � ��������� �������.
� ����� ������, ��� ��� ��� ������� ������� ��� �������� � ������ 4.0 � ����� ������:
mysql_fix_privilege_tables
����� �������� �����
���������� � ����������� � ������� ���������� MySQL.
mysql_convert_table_format ���� ������
.
�������� ��������, ��� ����� ������ ������ ���� ��� ������� � ���� ������
�������� ��������� ���� ISAM ��� MyISAM. ���� ��� �� ��� ������, ��� �����
������� ��������� ALTER TABLE ���_������� TYPE=MyISAM
��� ����
ISAM-������.
MySQL 4.0 ����� ��������, ���� ���� �� �� ��������� ��� ����, �� � ��� �� ����� ����������� ������������ ����� ����������, ������� ������������� MySQL 4.0, � � ��� ����� ���� �������� ��� ���������� �������� � 4.1 ��� ����� ����� ��������. ������ ISAM � MySQL 4.0 ��� ��� ��������, �� �� ��� �������� ������� � ����� �������� �� ������ MySQL 5.0.
������ ������� ������ �������� � ������� 4.0 ��� �����-���� �������.
� ���� ���� �� ��������� ��� ����, �� ������� ���������� ��������� � MySQL 3.23.52 ��� ����� �����, ���� � ��� ��������� �������� � MySQL 4.0. � ���� ������ ��� ����������� ��������� mysqldump �� ���� ��������, ������������ �������������� ������� � ������������ dump �� ������ 3.23. ������� ����������� � ���, ��� MySQL 4.0 ���������� ����� ������ �������������� ��������.
��� ��������� ������ ����, �� ��� ������� �������� �������� ��� �������� � 4.0:
mysql.user
. See section 4.3.1 ��������� ������ GRANT
� REVOKE
.
����� ��������� ���
����� ���������� ��������, ������� ��������� ������
mysql_fix_privilege_tables
. �� ���������� ������� ������� � ����
������������� ����� ���������� SHOW DATABASES
, CREATE TEMPORARY TABLES
� LOCK TABLES
. �������� ��� ���������� SUPER
� EXECUTE
�������
�� PROCESS
, ��� REPLICATION SLAVE
� REPLICATION CLIENT
- �� FILE
.
����� �������, ��������� ����� �������������, ����� ������������ �����
����������, �� ����� ��������������. ���� � ���� �������� ��
������������ ������� GRANT
, �� ������ ����� ����� �������� ��.
� ������
4.0.2 ����� --safe-show-database
�������� � �� ������������� (� ���
������ ������ �� ������). See section 4.2.3 ����� ������� mysqld
, ����������� � ������������.
���� � ������ 4.0.2 ��� ����� �������������
��������� ������ ������ � �������, �� ������� ���������, �� ���������
�� ��� ��������� ����� ����������, ������� �� ���� ����� ������. �
���������, ��� ����� ���������� ����������� REPLICATION SLAVE
(������
FILE
).
myisam_max_extra_sort_file_size
�
myisam_max_extra_sort_file_size
������ ����������� � ������ (�� 4.0.3
����������� � ����������).
������� ���������� ������ MyISAM/ISAM ������ ��������� �� ���������. �����
�������� �� ������� ������ --external-locking
. ��� �����������
������������� ����� ������� �� ����������� ������.
�� | �. |
myisam_bulk_insert_tree_size | bulk_insert_buffer_size
|
query_cache_startup_type | query_cache_type
|
record_buffer | read_buffer_size
|
record_rnd_buffer | read_rnd_buffer_size
|
sort_buffer | sort_buffer_size
|
warnings | log-warnings
|
err-log | --log-error (��� mysqld_safe )
|
record_buffer
, sort_buffer
� warnings
���
��� �������� � MySQL 4.0, �� ��������� ��� �������� �����������.
�� | �. |
SQL_BIG_TABLES | BIG_TABLES
|
SQL_LOW_PRIORITY_UPDATES | LOW_PRIORITY_UPDATES
|
SQL_MAX_JOIN_SIZE | MAX_JOIN_SIZE
|
QUERY_CACHE_TYPE | QUERY_CACHE_TYPE
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=#
������
SET SQL_SLAVE_SKIP_COUNTER=#
.
mysqld
--skip-locking
�
--skip-external-locking
� --enable-locking
�
--external-locking
.
SHOW MASTER STATUS
������ ���������� ������ ��������� ���� �������� ������ ����������
�� �������.
SHOW SLAVE STATUS
���������� ������ ��������� ���� ����������� ������ �� ���������������.
--temp-pool
���������� �� ���������, �.�. ���
���� ������ ������������������ �� ��������� �� (� ��������, �� Linux).
DOUBLE
� FLOAT
������ ��������� ����
UNSIGNED
��� �������� (������ UNSIGNED
������������� ��� ���� ��������).
ORDER BY ������� DESC
������ ��������� �������� NULL
� ������ �������; � 3.23 ��� ���� �� ������ ���. ��������: � MySQL 4.0.11 �������������
������������ ���������.
SHOW INDEX
����� �� 2 ������� ������ (Null
� Index_type
), ��� � ������
3.23.
CHECK
, SIGNED
, LOCALTIME
� LOCALTIMESTAMP
������ �������� ������������������ �������.
|
, &
, <<
, >>
� ~
������
�������� �����������. ��� ����� ������� �������� ��� ������������� ��
� ���������, ��� ��������� ��������� �� ������. See section 6.3.5 ������� ���������� �����.
UNSIGNED
, ����� �����������! ������� �������,
����� ������������� �� MySQL 4.0 �� ������ ��������� ���� ����������
��� �������, ��� ������������ ��������� �������� �� ������������
������� � �������������� ����� � ������������� ������, ��� ���������
����������� �������� �� �������������� �������. ������ ����� �����
�������������, ��������� ����� --sql-mode=NO_UNSIGNED_SUBTRACTION
���
������� mysqld
. See section 6.3.5 ������� ���������� �����.
MATCH ... AGAINST (... IN BOOLEAN MODE)
��
��������, ������� ����������� �� ������ ��� ������ REPAIR TABLE table_name USE_FRM
.
LOCATE()
� INSTR()
������������� � ��������, ���� ���� �� ����������
�������� �������� �������. � ��������� ������ ��� �� ������� ��
��������.
STRCMP()
��� ���������� ��������� ������ ���������� ������� �����
��������; ��� ��������, ��� �������� ��������� �� ��������� ������� �
������ ������ �������� ����������� �� ��������.
HEX(string)
������ ���������� ������� ������, ��������������� �
�����������������. ���� ���������� ������������� ����� �
����������������� �������������, ���������, ��� HEX()
���������� �
�������� ����������.
INSERT INTO ... SELECT
�������� IGNORE
������
��� ��������. � ������ 4.0.1 MySQL ����������� (�, ��������,
���������� �����) � ������ ������, ���� IGNORE
�� ����� ����.
safe_mysqld
������������ � mysqld_safe
. ��������� �����
�� ����� �������� safe_mysqld
� ����������� ��� ������������� ������ �� mysqld_safe
.
mysql_drop_db
, mysql_create_db
� mysql_connect
������ �� ����� ��������������, ���� �� �� ������������� MySQL �
CFLAGS=-DUSE_OLD_FUNCTIONS
). ������ �������������� ����� �����������
������� ��� ������������� ������ 4.0 API.
MYSQL_FIELD
�������� length
� max_length
�������� �
unsigned int
�� unsigned long
. ��� �� ������ �������� �������, ��
����������� ����, ��� ��� ������������� ������� � ������ ������ �
�������� ���������� � �������� ������ printf()
����� ��������������
��������������� ���������.
TRUNCATE TABLE
���
(��������� TRUNCATE TABLE
����������� �������, ��� DELETE FROM
table_name
).
TRUNCATE TABLE
��� DROP DATABASE
��� �������
�������� ������� LOCK TABLES
��� ���������� �� �������� ������.
BIGINT
���������� ������������ �����
����� (������ �����, ��� ���� � MySQL 3.23). ����������� �������������
����� ��� ������� ������ ���� ��� ��������, �� ���������� ����� �����
����� ����������.
SHOW OPEN TABLE
.
mysql_thread_init()
�
mysql_thread_end()
. See section 8.4.8 ��� ������� ���������� ��������� � ��������.
DBD::mysql
����������
�������� ������ Msql-Mysql-modules
1.2218 ��� ����� �����, ��������� �
����� ������ ������� DBD
������������� �� �������������� ����� �������
drop_db()
.
RAND(seed)
���������� ���� ������������������ ���������
�����, ��� � 3.23; ��� ������� ��� ����, ����� ����� ���������
RAND(seed)
� RAND(seed+1)
.
IFNULL(A,B)
������ �� ���������
��������������� ����� "�����" �� ��������� � ����� A
� B
. �������
������ - STRING
, REAL
��� INTEGER
.
� ������ MySQL 3.23 �������������� ������� ������ ���� MyISAM
� �������
���� ISAM
. ������ ������� �� ��������� � �������������� ��� �������������
�� � ������ 3.23. �� ��������� ��� ����� ������� ����� ����������� � �����
MyISAM
(���� �� �� ���������� mysqld
� ������ --default-table-type=isam
).
����� ������������� ������� ISAM
� ������� MyISAM
��� ������ �������
ALTER TABLE table_name TYPE=MyISAM
��� ��� ������ Perl-�������
mysql_convert_table_format
.
������� ������ 3.22 � 3.21 ������ �������� � �������� ������ 3.23 ��� �����-���� �������.
���� ����������� �������, �� ������� ������� �������� �������� ��� ������������ �� ������ 3.23:
tis620
, ������ ����
���������� � ������� myisamchk -r
��� REPAIR TABLE
.
DROP DATABASE
��� ����� ������, ���������
������������� �������, ��������� ��� ������ ������, ��� � ��������
���� ������ (� 3.22 ��� ���� �� ���, ��������� ��������� configure
��
������������ ��������� ����� readlink
).
OPTIMIZE TABLE
������ �������� ������ � ��������� MyISAM
. ��� ������
����� ������ ����� ������������ ������� ALTER TABLE
��� �����������
�������. �� ����� ���������� ������� OPTIMIZE TABLE
��������������
������� ������ ������������� ��� ������ �������.
mysql
������� MySQL ������ �� ��������� �������� ���� ������ �
������ --no-named-commands
(-g
). ������ ����� ����� ��������� �
������� --enable-named-commands
(-G
). � ��������� ������� ��� �����
�������� �������� ���������������, ��������, � �������� SQL, � �������
��������� ������� ������������ ��� ����� � �������! ������� ��������
������� ���� ��� �������� � ������ ������.
MONTH()
), ������ ����� ���������� 0
��� ���� 0000-00-00
(� ������
MySQL 3.22 ������������ �������� NULL
).
isamchk -r
, ��� ��� � �������
���������� ����������� ��������� ���������!
IF
������ ������� �� �����
����������, � �� ������ �� �������.
AUTO_INCREMENT
������ �� ����� �������� � �������������� �������;
������� � ���, ��� ������������� ����� �������� �������� ��� ��������
�� -1
� 0
. ��� ������ MyISAM
AUTO_INCREMENT
�� �������������� �� �����
������ ������ � �������� ������� �������, ��� ������. ��� ������
MyISAM
������ ���������������� ������ ����� �� ������������ ��������,
���� ��� �������� �� ������� �����.
CASE
, DELAYED
, ELSE
, END
, FULLTEXT
, INNER
, RIGHT
, THEN
� WHEN
������ �������� ������������������ �������.
FLOAT(X)
������ �������� ��������� ����� ������ � ��������� ������, �
�� ��������� � ������������� ������ ���������� ������.
DECIMAL(length,dec)
�������� length
������ �� ��������
� ���� ����� ��� ����� ��� ���������� �����.
TIME
������ ������ ������������ ����� ���� �� ���������
��������: [[[DAYS] [H]H:]MM:]SS[.fraction]
���
[[[[[H]H]H]H]MM]SS[.fraction]
.
LIKE
������ ���������� ������, ��������� �� �� ������� ���������
��������, ��� � =
. ���� ��������� ������ ����� ������, �� �����
�������������� MySQL � ������ CXXFLAGS=-DLIKE_CMP_TOUPPER
.
REGEXP
������ �������� ����������� �� �������� �������� ���
���������� (�� ��������) �����.
CHECK TABLE
��� myisamchk
��� ������ MyISAM
(`.MYI') � isamchk
��� ������ ISAM
(`.ISM').
mysqldump
����� ������� MySQL
3.22 � ������� 3.23, �� ������� ������������ ����� --opt
��� --all
��� mysqldump
.
DATE_FORMAT()
, ����� ���������, ���
����� ������ �������� ������� ������� `%' (� ������ MySQL 3.22 � �����
������� ���� ��������� ��� �����������).
mysql_fetch_fields_direct
������ �������� �������� (��� ������) �
���������� ��������� �� MYSQL_FIELD
������ MYSQL_FIELD
.
mysql_num_fields()
������ ������ ������������ �� ��������
MYSQL*
(������ ��� �������, ����������� MYSQL_RES*
� ��������
���������, ��� ��� ������ ��� ������� ��������� mysql_field_count()
).
SELECT DISTINCT ...
����� ������ ���
���������������. ����� �������� ��������������� ����� � ������ 3.23,
���������� ������������ GROUP BY
��� ORDER BY
.
SUM()
������ ���������� NULL
������ 0
��� ����������
�������������� �����: ��� ������� ��� ������������ � ANSI SQL.
AND
��� OR
� ���������� NULL
������ ����� ���������� NULL
������ 0
. � ��������, ��� ������ �� �������, � ������� ������������
NOT
�� ���������� AND
/OR
, ��� ��� NOT NULL = NULL
. LPAD()
� RPAD()
����� ����������� �������������� ������, ���� ��� �������, ���
�������� �����.
� ������ 3.21 �� ��������� � 3.22 �� ���� ������� ������� ���������,
�������� �� �������������. ������������ ��������� ������ - ��� ��, ��� ���
����� ������, ����������� �� ��������� ���� DATE
, ����� ����������� �����
������ �������� ����. ��� ������������� ������ ������ mysqld
��������
������ � ���� ����� ����� ����� ������.
����� ��������� ������ MySQL 3.22 ���������� ��������� ����� ������, �
����� ��������� ������ mysql_fix_privilege_tables
. � ���������� �����
��������� ����� ����������, ����������� ��� ������������� ������� GRANT
.
���� �� �������� ��������� ��� ��������, �� �������� Access denied
���
������� ������������ ALTER TABLE
, CREATE INDEX
��� DROP INDEX
. ���� ���
������ ������������������ (root
) ������������ MySQL ��������� ������, ��
������� ������� ��� ��� �������� � mysql_fix_privilege_tables
.
������� ��������� C API � ������� mysql_real_connect()
.���� ��
������������ ������ ���������� ����������, ���������� ������ �������, ��
���������� ������ �������� 0
��� ������ ��������� db
(��� ��������������
������ ������, ����� �������� �������� �������� db
��� ����� �������
�����������). ���������� ����� �������� mysql_init()
����� ������� �������
mysql_real_connect()
! ��� ��������� ���� ��������� ��� ����, ����� ����
����������� ����� ������� mysql_options()
��������� ����� � ���������
����������� MYSQL
.
��� ����������� � mysqld
���������� key_buffer
�������� ��
key_buffer_size
, ������ ������ ��� ����� ������������ ��-��������.
���� �� ��������� � ������� ����, ��� 3.20.28, � ������ ������� � 3.21, �� ���������� ������� ���������:
����� ��������� ������ mysqld
������ 3.21 � ������ safe_mysqld
--old-protocol
, ����� ������������ ��� � ��������� �� ������������ ������
3.20. � ���� ������ ������� mysql_errno()
������ ������� �� ����������
������� ��������� ������, ����� CR_UNKNOWN_ERROR
(��� ������������� ���
���������� ������), ��� ���� ������ ���������� �� �����, � ������ �������
�������� password()
.
���� �� �� ����������� ������������ ����� --old-protocol
� mysqld
, ��
���������� ����� ��������� ��������� ���������:
MyODBC
2.x.
Password
� ������� mysql.user
� CHAR(16)
.
mysql.user
������ ���� ������������� (�����
�������� 62- ��������� ������ ������ 31- ���������).
������ MySQL 3.20.28 � ���� ����� ������������ ����� ������ ������ user
���, ��� ��� �� ���������� �� ��������. � ����� ������, ��� 3.20.28,
������� MySQL ������ ������ �� ����� �������� � ���������, ���� �������
user
�������������. ��� ����������� ������� ������ �������� ������� ��
������� ���� �� ������ 3.20.28 � ����� ��������������� �� ������ 3.21.
����� ��� ������� �������� � �������� mysqld
������ 3.20.x, ��� ��� �
������ �����-���� ������� � ������� 3.21.x ����� ������������ ������
������ 3.20.x ��� ������������� ��������� �������������� ��������.
���� �� ��������� ����� --old-protocol
��� mysqld
, �� ������ �������
������� ��������� ��������� �� ������:
ERROR: Protocol mismatch. Server Version = 10 Client Version = 9
����� ��������� Perl DBI
/DBD
����� ������������ ������ ���������
mysqlperl
. ������������ ���������, ������� ������� ���������� ���
������������� mysqlperl
, �������������� ��������� � ������� connect()
.
������ ����������� ��������: host
, database
, user
, � password
(���������
user
� password
���������� �������). See section 8.2.2 ��������� DBI
.
���� ����������� ���������, ������� ����� �������� �� ������� � ������ �����������:
HAVING
������ ���������� ��������� ����� ����� ���������� ORDER BY
.
LOCATE()
.
DATE
, TIME
� TIMESTAMP
.
��� ������������� MySQL 3.23 ����� ���������� ����� `.frm', `.MYI' � `.MYD' ����� ���������� �������������, ��������������� ���������� ������ ����� � ��������� ������ (��� ��������, ��������� � ������������� ������, ����� �� ���� MySQL).
��������� � MySQL ����� ������ � ��������� ����� ���� ISAM
(`.ISD' �
`*.ISM' ��������������) �������� ������������-������������, � � ����
������� - ���������� �� ������������ �������. ��� �������� ���������� ��
��������� � ������������ ��� ������������ ��������, ������� ���������� ��
������������ �� �������� ����������, �� ������� �������� ��������� ����
������ ����� �������� ����������� ������ �� ������ ���������. �����������
������ ����� mysqldump
.
�� ��������� mysqldump
������� ���� �� ����� ��������� SQL. ����� �����
������ ���� ����� ��������� �� ������ ��������� � ������ ��� �� ����
������� mysql
.
��������� mysqldump --help
, ����������� ��� ��������� �����. ���
����������� ������ �� ����� ����� ������ MySQL ������� ��������� mysqldump
--opt
����� ����� ������, ����� �������� ������� � ���������� �����.
����� ������� (���� � �� ����� �������) ������ ����������� ���� ������ � ���������� �� ��������� - ��������� �� ����������, ��� ����������� �������� ���� ������, ��������� �������:
shell> mysqladmin -h 'other hostname' create db_name shell> mysqldump --opt db_name \ | mysql -h 'other hostname' db_name
���� �� ������ ����������� ���� ������ � ���������� ���������� ����� ��������� ����, �� ����� ������������:
shell> mysqladmin create db_name shell> mysqldump -h 'other hostname' --opt --compress db_name \ | mysql db_name
����� ����� ��������� ��������� � �����, ����� ���������� ���� ���� �� ��������� ��������� � ��������� ���� ���� � ������������� ��� ���� ������. ��������, ����� ����������� ���� ������ � ���� �� �������� ���������� ��� �������� ����:
shell> mysqldump --quick db_name | gzip > db_name.contents.gz
(��������� � ������ ������� ���� ���������). ��������� ���� ���� � ���������� ���� ������ �� ��������� ��������� � ��������� ��� ��� �������:
shell> mysqladmin create db_name shell> gunzip < db_name.contents.gz | mysql db_name
��� ���������� �������� ���� ������ ����� ����� ������������ mysqldump
�
mysqlimport
. � ������ ������� ������ ��� ������� ����� ������� ������, ���
������� ���������� mysqldump
. � ��������� �������� DUMPDIR
������������
����� ������ ���� � ��������, ������������� ��� �������� ������ ��
mysqldump
.
��-������, �������� ������� ��� ������ ������ � ����� ���� ������:
shell> mkdir DUMPDIR shell> mysqldump --tab=DUMPDIR db_name
����� ��������� ��� ����� � ������� DUMPDIR
���������� ����������������
�������� �� ��������� ���������� � ��������� ��� ������ ����� � MySQL:
shell> mysqladmin create db_name # �������� ���� ������ shell> cat DUMPDIR/*.sql | mysql db_name # �������� ������ � ���� ������ shell> mysqlimport db_name DUMPDIR/*.txt # �������� ������ � �������
������ �����, �� �������� ����������� ���� ������ mysql
, ��������� � ���
�������� ������� ���������� (user
, db
, host
). ��������, �� �����
���������� ����� ����� ��������� ������� � �������� ������������ root
MySQL, ���� ���� ������ mysql
�� ������ ���� �����.
����� ������� ���� ������ mysql
�� ����� ��������� ��������� mysqladmin
flush-privileges
, ����� ������ ������������ ���������� � ��������
����������.
����������� ���� ��������� � glibc
����� ������� ������ ��� ������, �����
�� ��������� MySQL ��������������. �� ������, ���� Linux �������� ��
������ � ������������ x86, ������� ����� ������������ ���� �������� �����.
��� ��������� � glibc
, � ������� ��������� �������� ������� �����, � �
�������� �������� ������� ����������� - ��� ��� ������� ��� ����, �����
��������� ���� ��������� ��� ������ �� ������ ����������� �������. �������
���� ����� ��������� ������� ������� � ��� ��������� �������� ������������
���������� ��������, ���������� ������� ������������ �������� ����� -
��������, ��� ������������ ����� �����������. ���� �� ��������, ���
�������� ����� ��� �� ����������, �� ����� ����������� ��������
���������������� �������. �� ����� ����� ������������ �� ��������� � ���,
������ ��� �������� ���������� �� ������ � ������ �����������, - ���
������� ��� � ��������� ��� ������� ����� ������� ������ ���������. ��� ��
�������� ������� �������������, �� ��� ��� ���� ��� ���������,
������������ �� ������� ���������� ������������ ���������� �/��� ������,
������������� �� ������ ����������� � 2 ��, ���� �������� ����� �����
��������� ��������� ������.
� ������������ ������� Linux MySQL ���������� LinuxThreads. ���� � ���
������ ������� Linux, � ������� ����������� glibc2
, �� ������ ���
������������� ������� ���������� MySQL, ���������� ����������
LinuxThreads. �������� LinuxThreads ����� �� ������
http://www.mysql.com/downloads/os-linux.html.
����������: �� Linux 2.2.14 � MySQL, ������������� �� ����������������� (SMP) ��������, ����� ��������� ��������� ���������� ��������. � ����� ������ �� ����������� ��� ����� ������� ������� ������� ������ ���� �� 2.4: ��� ������ ������� ����� ������� � ����������.
���������� ��������, ��� ������ glibc
�� 2.1.1 ������������ ��������
��������� ������ � ��������� pthread_mutex_timedwait
, ������� �����������
��� ������������� INSERT DELAYED
. ������� �� ����������� �� ������������
INSERT DELAYED
, ���� �� ����� ������ ������� glibc
.
���� ����������� ������������ ����� 1000 ������������� ����������,
���������� ������� ��������� ��������� � LinuxThreads, ����������� �� �
������������� MySQL � ����� `libpthread.a'. ������� ���������
PTHREAD_THREADS_MAX
� ����� `sysdeps/unix/sysv/linux/bits/local_lim.h' ��
4096 � ��������� STACK_SIZE
� `linuxthreads/internals.h' �� 256 K�.
���� ������� ������������ ��������� �������� glibc
. �������, ��� MySQL ��
����� ��������� �������� ��� 600-1000 �����������, ���� ������ STACK_SIZE
��������� �� ��������� 2 M�.
���� MySQL �� ����� ������� ����������� ���������� ������ ��� ������� ����������� ���������� ����������, �� ��� ������, ��� � Linux �� ���������������� ����������� �������� ������������ ���������� ������.
� Linux 2.2 � ����� ������ ������� ����� �������� �������� ������������� ���������� ������, ������� ����� ������� ������������. ��� ����� ���������� ���������:
cat /proc/sys/fs/file-max cat /proc/sys/fs/dquot-max cat /proc/sys/fs/super-max
� ������, ���� �� ������ ����������� ����� 16 M� ������, � ������������ ������� (`/etc/init.d/boot.local' �� SuSE) ���������� �������� ������ ��������� ���������:
echo 65536 > /proc/sys/fs/file-max echo 8192 > /proc/sys/fs/dquot-max echo 1024 > /proc/sys/fs/super-max
��� ������� ����� ����� ��������� �� ��������� ������ �� ����� ������������
root
, �� � ����� ������ ��� ������������ ���������� ����� ��������������
������ �����������.
�������������, �� ������ ���������� ��� ��������� ��� ��������, ���������
������� sysctl
, ������� ������������ �� ��������� �������� Linux (SuSE ����� ��������
��, ������� � SuSE 8.0). ������ �������� ����� �������� � ���� `/etc/sysctl.conf':
# ��������� ��������� �������� ��� MySQL fs.file-max = 65536 fs.dquot-max = 8192 fs.super-max = 1024
����� ����, ���������� �������� � `/etc/my.cnf':
[safe_mysqld] open-files-limit=8192
���������� ����� ������ �������� MySQL ��������� �� 8192 ���������� � ������.
�������� ������ ������� � �������� ������������ ��������� ���������
STACK_SIZE
� LinuxThreads. �� �������� ������ ���� ���������� �������,
����� ������� ����� ����� ������� ������, �� ���������� �����, �����
������������� ��������� ������ ��������� ������� � ������� ����� ������
mysqld
. � ���������, ������� ����� ��� ������� ����������, ��� ����������
mmap()
�� Linux � ������ ����������� ������� �� ��������� ������, �������
��� ������������, ������ ����������� ��������� �� ������ �������
����������� ��� ����� ���������� ������� � �������� ������ �� ����
��������. ������� ������������ ������������� mysqld
��� ������ �������
���������� ���������� ������� �� "���������������" ��������� ����,
���������� ������. ������������ ������ ������� ���� ��� �����������
���������� ������ ���������� ����������� ������� � ����� ������ �������,
����� ����� ������� �� ������������ � ����������� ���������� �������. �
������ mysqld
���������� �������� ��� "��������������" ���������
���������� ���������� max_connection
� �������� ��������.
���� �� ��������� MySQL �������������� � �� ������ ���������� �������
LinuxThreads, �� ���������� ���������� �������� max_connections
���, �����
��� �� ��������� 500. ��� �������� ������ ���� ��� ������, ���� � ���
���������� ����� ����� ������, ������� ������� ����������� ����������
������ ��� ������� ������ �������, �� ������� mysqld
�������� �������
������ ������, � ����� � ������, ���� �� ����������� ���� 2.2 � �������
��� 2 ��. ���� ������������ ���� �������� ����� ��� RPM ������ �� ������
3.23.25, �� ����� ��������� ������������� max_connections
������ 1500 -
��� �������, ��� ����� ������ ��� ������� ����������� ���������� ������
����� ��������� �������. ��� ������ STACK_SIZE
� LinuxThreads, ��� ������
������� ����� ��������� �������. ������������� ���� �������� ���������� ��
128K �� 256K.
��� ������������� ��������� ������������� ���������� �� ������ ����������
�� ����� "�����������" ���� 2.2. ������ ����������� ����������� � ���, ���
������� ���������� �� ��������� ��� ���������� �������� ��������� - �����
������������� ����� ����������. ��� �������� � ���������� ���������������
MySQL ��� ���������� ���������� ������������� ����������. �� ����� ������,
�� ���������������� ������� ��-�� ������ ����������� �������� �������
���������� ����� ��������, ��� ����� �������� � ������� �������� �������
�� ���������� � MySQL (�� 1 ������), � ������� �� ����� ������ ����������
����������. ��� �� �������� ����������������� ������, �� �� ���
����������� ����������� �������� �������� �� ���� ����� ����� ��������.
���� �� �������� ����� ������� ��������, ���� �� ������������� �������
���� � ����, ���������, ��� ���� ������� ������� ������ ��� �����. ����
�������� �� ������
http://www.mysql.com/Downloads/Patches/linux-fork.patch. �� �������
���������� �������� ������������ ����� ����� ��� �� �������������, ��� �
�� ������������ ������� �������. ���������� ����� ������� ��������
������������������ MySQL
, �� ������ ��� ���� ������� �������, �������
������ �� ����������� ��� �������������, ������� �� ��� ��� ����������
���� 2.2 �� ������ ����������� ��������. ����� ����, ��� �������� ����
������ � ���� 2.4, ������� ���� ��� �� ���������� ������������������
�������, ��, ��-��������, ����� ������� �� ������� �� 2.4, ���
������������ ����� � ���� 2.2. ��� ���������� �������, ������ �����������
���� ������, �� ����� �������� ����������� ��������������� ��������������
SMP.
��� ������������ MySQL �� ���������������� ������ � ����� 2.4 ��
����������, ��� MySQL �������������� ������� ����� - ����������
������������� ���������� ��������� �������� ������ �� 1000 ����������, �
������ ���������������� MySQL (������� ����������� ��� ���������
������������ ������������������ � ������������������ ��� ������ � �����
��������) �������� 180%. �������� ���������� �� ��������� ��
������������������� ������� - ����������� ���������� ���������� ��� �����
���������� ���������� �� 1000 ��� ������� ���������������� � 300%. �������
��� ���������� ����������� �������� �� ������������ ����������� ���� 2.4.
��������� �����, ��� ��� ���������� ��������� ������������������ �� ����
2.4 ������ ����� ��������� mysqld
� ���������� ��������� �����������. ���
����� ������� �������� � ������ safe_mysqld
������� renice -20 $$
. � �����
������ �� ������������������� ������ ���������� ���������� ������� �
��������� ������������������ �� 60% ��� ������ 400 ��������.
� ���������� � ����� �� ������ ���������� ������ ���������� � ������������������ MySQL � ����� 2.4 �� �������- � ������������������ ��������. ���� � ��� ���� ������ � ����� �������� � �� ����������� �� ������������������, ����������, ��������� ��������� � ������������ �� ������ docs@mysql.com - �� ������� ��� ���������� � ������������.
���������� ��� ���� �����, ������� �������� �� ������������������
MySQL, �������� �� ����������������� ��������. � LinuxThreads � glibc-2.1
����� ����� ����������� mutex'� ��� �������� �� ���������� �������, �
������� mutex �������� ����������������� �����. �������������, �� ����: �
������, ���� �� ����������������� �������� ������� MySQL �
������������������� LinuxThreads, �� ��� �������� ���������� �� ����� ���
������������� ������������������. ��� ������� ���� �������� �� ����������
���� � glibc 2.1.
3
http://www.mysql.com/Downloads/Linux/linuxthreads-2.1-patch.
� glibc-2.2.2
MySQL ������ 3.23.36 ���������� ���������� mutex, �������
������� ����� ���� ``����������'' � glibc-2.3.1
. ������ �������������, ���
��� ��������� �������� ��� mutex'� � glibc-2.2.2
"�������������"
(overspin), � ��� �������� ������������������ MySQL. ����� �������������
������ ������� ����� ��������, ���� �������� ��������� ���������� mysqld
.
����� ����� ��������� "������������" � ������� �����, ���������� �� ������
http://www.mysql.com/Downloads/Linux/linuxthreads-2.2.2.patch. �� ��������
� ���� ��������� "������������", ������������ ���������� ������� � �������
����� - ��� ������. ���������� ��������� ��� � �������� linuxthreads
�������� patch -p0 </tmp/linuxthreads-2.2.2.patch
. �� ��������, ��� ������
���� ����� � ��������� ���� ������� � ��������� ������� glibc-2.2
. � �����
������ - ���� �� �������� � �������������� ���������� glibc-2.2.2
, �� ����
��� ���������� ���������� STACK_SIZE
� PTHREAD_THREADS_MAX
. �� �� ������
�������, ��� � ������� �������� �� ��������� ����� ��������� � �����
���������� ��� ������ ���������� ������������ MySQL ���������, ��� ���
��������������� ������ �������� � ���������� ./configure; make; make
install
.
�������������� ����� �� ����������� ������������ ������ ��� �������� ����������� ����������� ������ `libpthread.a', � ��������� - ��������� ������ ��� ������������ ���������� MySQL. �� �������, ��� ��� MySQL ��� ����� ��������� � ������� �������� ��� ������������������, �� ������������ ������ ���������� ������ ���. ������ ������ ���������� � ``���������'' ������� ���������� ��� ������� �� ������������ ������ � ������������ �� �� ���� �������, �� ��������� ����� �� ���� �� ��������� � ������ �����������, ������������ LinuxThreads.
� ������, ���� ��� �������� ����������� � ����������� ���������� ��� ����������� MySQL ��� ��� ������ ������, �� �������, ��������� �����, ������� � ������������ ��� ������������. � ����� ������ �������� ������ ������ ������������� ����� �������� ������.
���������� ���� ��������� �������� � �������� �������������, ����������
������ ������ Linux, � ������� ������������ libc
(����� ��� RedHat 4.x ���
Slackware). ��� ����������� � ���� ��������� ����������� ������� �
����������� ���� (see section 2.6.1.1 ���������� � �������� ������������� Linux).
��� ������������� LinuxThreads ������������ �������� ��� ������� ��� ��������. �� ���� ��� ������. ���� ����� ��������� LinuxThreads, ���� - ������������ ���������� � ��� ���� - ������������ ��������� �������.
�������, ��� ���� Linux � ���������� LinuxThreads �� ��������� ����� ������������ ������ 1024 ������. ��� ������, ��� ����� ������������ �� ����� 1021 ���������� � MySQL �� �������, � ������� �� ����������� �����. ���������� � ���, ��� ������ ��� �����������, ����� ����� �� �������� http://www.volano.com/linuxnotes.html.
���� �� ���������� ������ ������� ps �� ������, ��� mysqld
���������
������,
�� ������ �������� ����� �������� ���� ����������� ������ � MySQL, ���� ����������� ������� (see section A.4.1 ��� ������, ���� ������ MySQL �������������� ����������� ������).
���� ��� ��������� ������� SIGSEGV
mysqld
������ �������, �� ��� ���������
������ ������ (core dump) �� Linux ����� ��������� mysqld
� ������
--core-file
. �������, ��� ��� ���� ���, ��������, �������� ���������
������ ����������� ������ ����� ������ ������ ����� ���������� ������
ulimit -c 1000000
� safe_mysqld
��� �������� safe_mysqld
� ������
--core-file-size=1000000
(see section 4.7.2 safe_mysqld
, �������� mysqld
).
���� ��� ���������� ������������ MySQL-������� �������� ������:
ld.so.1: ./my: fatal: libmysqlclient.so.4: open failed: No such file or directory
�� �������� ����� ������ ����� �� ��������� ��������:
-Wl,r/path-libmysqlclient.so
. (������ -Lpath
);
LD_RUN_PATH
����� �������� �������.
���� �� ����������� ���������� Fujitsu (fcc / FCC
), �� �������� ���������
�������� ���������� MySQL ��������� ��������� � Linux � ������������
������� ������������� �� gcc
.
������ ������������ ������ �������� � fcc/FCC
:
CC=fcc CFLAGS="-O -K fast -K lib -K omitfp -Kpreex -D_GNU_SOURCE \ -DCONST=const -DNO_STRTOLL_PROTO" CXX=FCC CXXFLAGS="-O -K fast -K lib \ -K omitfp -K preex --no_exceptions --no_rtti -D_GNU_SOURCE -DCONST=const \ -Dalloca=__builtin_alloca -DNO_STRTOLL_PROTO \ '-D_EXTERN_INLINE=static __inline'" ./configure --prefix=/usr/local/mysql\ --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared \ --with-low-memory
��� ������ MySQL ��������� Linux ������ �� ���� 2.0.
��������������: �� ������, ���������� ���� �� ��������� ������������� MySQL, �� Linux � ����� 2.2.14 ������� ��������� �������� � ������������� ������ MySQL. ���� �� ����������� ��� ����, ���������� �������� ��� �� ������ 2.2.19 ��� ����, ���� �� ���� ������ 2.4. ��������� � ������ 2.4 ���������� ��� ����� �������� ��� ������������� ����������������� �������, ��������� ������� �� ��� ������ ���� �������� � ��������� ���������� ��������.
��� �������, �������� ����������� ��������� � ������ -static
, � ���
������, ��� ������ ��� ������������� ������������ � ���, ����� ������
��������� ��������� � ��� �����������. �� ��������� ����� �������������
LinuxThreads. ������ ���������, ������������ � ������ -static
, ������
������ � ��������� � �������, ��������� �����������, ������ ��������
������ � ��� ���� (3-5%). ����������, ������, ���� ��������. ���
����������� � ���, ��� �� ���������� ������������� ����������� ����������
������������ ������������ ������������� ������� (user-definable function,
UDF). ���� �� ����������� ������ ��� ������������ UDF'� (��� ����������,
���������� ������ ������������� �� C ��� C++), ��� ������� ���������������
������� MySQL � �������������� ������������� ����������.
��� ������������� ������, ������������ �� libc
(� ������� ��
glibc2
-������), ����� ��������� ��������� �������� � ����������� ����
��������� ����������� � �������������� getpwnam()
� �������� ������� (���
���������� ��-�� ����, ���, � ���������, glibc
������� �� ���������
������� ��������� ��� ���������� ���� � ������������� getpwent()
, ���� ���
������ � ������ -static
). � ����� ������ ��� ������� mysql_install_db
�������� ��������� ���������� ��������� �� ������:
Sorry, the host 'xxxx' could not be looked up
��� �� - ��� ������� mysqld
� ������ --user
- ��������� �� ������ �����
���� �����:
getpwnam: No such file or directory
��� �������� ����� ������ ����� �� ��������� ��������:
tar.gz
).
mysql_install_db --force
, ����� �������� ��������
resolveip
� mysql_install_db
. ��������� �������� ������ �������
�������� ������������� �������� � ������� ����� � �������� ����
������� - ������ ��� ������� ������ ������������ IP-������ (��
����������� localhost
). ���� � ��� ������ �������� MySQL,
������� �� ������������ ���� --force
, �� ����� ������ ������� � ���������
�������� resolveip
�� mysql_install
.
mysqld
� ������� ������� su ������ ������������� ����� --user
.
RPM � �������� ����� MySQL ��� Linux �� ����������� Intel �������������� ��� ���������� ���������� ��������� �������� ������. �� ������ ��������� ������������ �����������, ������� ���� �������� ������� � ���������� ���.
��������� Perl � MySQL ������� Perl ������ �� ���� 5.004_03.
�� ��������� Linux ������ 2.2 ��� ������� ������� ������� ���������� �����
���������� � �������� mysqld ����� TCP/IP �� ������ �������� ��������� ��
������ Resource temporarily unavailable
(������ �������� ����������).
�������� ����������� � �������� ����� ��������� ������ TCP/IP � �������� ��� ������������� �������� � Linux. ��������� ���������� ������������ ���������� �������� ��� ��������� TCP/IP, �� �������� ������������� ������, ���� ����������� ������� ������� ����� ����� ���������� TCP/IP �� ���������� ��������� ������� ������� (����� �������� ���������� ��� ������� ����� �� ������������������ MySQL `test-connect' ������ TCP/IP).
�� ���� �������� �� ��������� ��� �������� � ��������� ������ �������� �� Linux, ������ �������� ������� �������� �� �������.
������������ ��������� '�������' ������ �������� ����������� � ���, ��� ���� ������� ������ �������� � ����������� ������������ ��� ������������ ������ (� ������, ���� ���������� � ��������� ����� ��������� �� ����� ������). �������� ���������, ��� ��� �������� ����� ������ � ���� Linux 2.4.
��� MySQL ���������� ������� libc
������ 5.4.12 ��� ����. ��������, ���
MySQL �������� � libc
5.4.46, � ����� � glibc
������ 2.0.6 � ����� ������.
���������� ��������� �������� � glibc
�� ������� � RedHat, ������� �
������ ������������� ������� ������� ���������, ��� �� ���������� ������
������! ��������, ��� glibc
�� RPM ������ 2.0.7-19 � 2.0.7-29
��������������.
���� �� ����������� Red Hat 8.0 ��� ����� glibc 2.2.x ��� ������� ���������
mysqld � ������ --thread-stack=192K
. ���� �� ����� �� ��������, ��
mysqld ����� ������� � gethostbyaddr()
������ ��� ����� glibc ������� >
128����� ������ ����� ��� ����� ������. ����� ������ ����� ���������� ��
��������� � MySQL 4.0.10 � ����� �����.
��� ������������� ��� ������ MySQL gcc 3.0 � ���� ���������� libstdc++v3
���������� ���������� �� ������; ���� �� �� �������� �����, �� ��������
��������� �� ���������� ������� __cxa_pure_virtual
�� ����� ����������!
�� ��������� ������ ������� Linux configure
����� ��������� � �������
������ ����:
Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual.
�������� ������ ��, � ��� ��������� � ��������� �� ������ - �������� �������������� ������ ������������� � ����� ������� _P
, ������� �����
������ ���� ������ ������������� � ������, � ���������� ��������� �� ��
�������� ��� ���.
��� ���������� ����� ���������� ��������� ��������������. ���� ��������� �� �� ���, ������� ����� ���������������:
mysqld.cc -o objs-thread/mysqld.o mysqld.cc: In function `void init_signals()': mysqld.cc:315: warning: assignment of negative value `-1' to `long unsigned int' mysqld.cc: In function `void * signal_hand(void *)': mysqld.cc:346: warning: assignment of negative value `-1' to `long unsigned int'
mysql.server
��������� ���� � �������� `share/mysql' �������� ����������� MySQL, ���� � �������� `support-files' �������� ������ �������� �������
MySQL.
������������� ��������� ������ ��� ���������� mysqld
������� �
������������ ��������� libg++.a
:
/usr/lib/libc.a(putc.o): In function `_IO_putc': putc.o(.text+0x0): multiple definition of `_IO_putc'
������������� libg++.a
����� �������� ����� ������� configure
���������
�������:
shell> CXX=gcc ./configure
� ��������� ������� Linux SPARC ��������� ������� readdir_r()
. ���
����������� � ���, ��� SHOW DATABASES
������ ���������� ������ �����.
�������� ����� ���� ������ ��������� HAVE_READDIR_R
�� `config.h' - ���
����� ������ ����� ����������������, �� �� ����������.
MySQL ������ 3.23.12 - ������ ������ MySQL, ���������������� �� Linux-Alpha. ������� ���� �� ����������� ������������ MySQL �� Linux-Alpha, ������� ������ ����� ���������, ��� �� ����������� ���� ��� ������, ���� ����� ������.
�� ����������� MySQL �� Alpha ��� ������ ����� ������ �� ������������������ � ��� �������� �����������.
��� ���������� ����������� �������� ������ MySQL �� ������������ SuSE 7.0 ��� AXP � ����� 2.4.4-SMP, ���������� Compaq C (6.2-505) � ���������� Compaq C++ (6.3-006) �� ���������� Compaq DS20 � ����������� Alpha EV6.
�������������� ���������� ����� ����� �� http://www.support.compaq.com/alpha-tools/. ������������� ����� ����������� ������ gcc ������� � ��������� ������������������ MySQL �� 9-14%.
�������, ��� �� ������ MySQL 3.23.52 � 4.0.2 �� �������������� ����������� �����
������ ��� ������������ ������ ���������� (��������� ����� ���������� -fast
); ��� ��������
��� �� ������ ������������ ���� �������� ����� ������ ���� � ��� ��������� Alpha EV6.
��� ���� ��������� ������ �� �������� ���� -arch generic
� ����� ������
����������, ��� ��������� �������� ��������� ����� �� ���� ����������� Alpha.
�� ����� �������� MySQL ���������� - �� ��������� �������.
CC=ccc CFLAGS="-fast -arch generic" CXX=cxx \ CXXFLAGS="-fast -arch generic -noexceptions -nortti" \ ./configure --prefix=/usr/local/mysql --disable-shared \ --with-extra-charsets=complex --enable-thread-safe-client \ --with-mysqld-ldflags=-non_shared --with-client-ldflags=-non_shared
���� �� ������ ������������ egcs
, �� � ��� ����������� ��������� ���������
������ ����������������:
CFLAGS="-O3 -fomit-frame-pointer" CXX=gcc \ CXXFLAGS="-O3 -fomit-frame-pointer -felide-constructors \ -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql \ --disable-shared
��������� ��������� �������� ��� ������� MySQL �� Linux-Alpha:
gdb 4.18
.
������ ���� ���������� ���������� � ������������ gdb 5.1!
mysqld
� �������������� gcc
�������������� ���� ��� ������� ������� ���������� ����� ������ ��
���� (core dump) � �������. ����� �������, �� ������� ������������ �
gcc
����� --with-mysqld-ldflags=-all-static
.
MySQL ������ �������� �� MkLinux ��� ������� ������ ������� ������ glibc
(��������� � glibc
2.0.7).
��� ���� ����� MySQL ������� �� Qube2 (Linux Mips), ���������� �����
������ ������ ���������� glibc
(��������, ��� MySQL �������� �
glibc-2.0.7-29C2
). ������ �����, ������� ������������ ���������� egcs
C++
(egcs-1.0.2-9
, gcc 2.95.2
��� ����).
��� ���������� MySQL �� Linux IA64 �� ��������� ��������� �������
����������������: ������������ gcc-2.96
:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc \ CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors \ -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql \ "--with-comment=Official MySQL binary" --with-extra-charsets=complex
�� IA64 �������� ����� MySQL-������� ���������� ������������ ����������.
��� ������, ��� ��� ��������� ������ ��������� ������������ ����-����,
����� `/usr/local/mysql', ���������� ���� �������������� `/etc/ld.so.conf',
���� �������� ���� � ��������, � ������� ��������� `libmysqlclient.so', �
���������� ��������� LD_LIBRARY_PATH
.
See section A.3.1 �������� ��� ���������� � ���������� ����������� MySQL.
� ������ ������� ����������� ������������� MySQL � ����� Windows. ��� ���������� ����� ��������� � ����� `README', ������������ � ������������� MySQL Windows. See section 2.1.2 ��������� MySQL �� Windows.
� MySQL ��� ���������� ������� � �������� ������������ TCP/IP (��� ������������ ��� ������ ���������� � ���� ����������� ����������� � ����� MySQL-��������). ������� TCP/IP ���������� ���������� �� ������ �� ������� MySQL. TCP/IP, � ���������, ������� �� CD-����� � ������������� Windows.
�������� ��������: ���� �� ����������� ���� �� ������ �������� Windows 95 (�������� OSR2), �� ������ ��������, ��� � ��� ���������� ������ ����� Winsock; � ��� ������ MySQL ��������� Winsock 2! ����� ������ ������ Winsock ����� �������� �� ������ http://www.microsoft.com/. Windows 98 �������� ����� ���������� Winsock 2, ������� ������ ��������� � ��� �� ���������.
��� ������� mysqld
���������� ������� ���� MS-DOS � ���������:
C:\> C:\mysql\bin\mysqld
��� �������� ��������� mysqld
� ������� ������ ��� ����.
������ MySQL-������� ����� ���������� ��������:
C:\> C:\mysql\bin\mysqladmin -u root shutdown
��� ����� ��������� ����������������� MySQL �� ����� ������������ root
,
������� �� ��������� ������������� ������������ Administrator
� �������
���������� MySQL. �������� ��������: ������� ���������� MySQL ���������
���������� �� �����-���� ��������� ������������� � ����� Windows.
�������, ��� � Windows 95/98/Me �� �������������� �������� �����������
�������. ����� �������, ����������� ������ �� ������ ������������ ���
���������� � MySQL-��������, ���������� � ������� Windows NT/2000/XP.
(����������, MySQL-������ ����� ������ ������������ ����������� ������.
��������, ��� ������ mysqld-opt
� ������� NT/2000/XP ������ ���������
���������� � �������������� ����������� �������; ������� ��������� ����
mysqld-nt
, ���� mysqld-max-nt
.)
���� mysqld
�� �����������, ������� ��������� ���� `\mysql\data\mysql.err',
�� ������� �������, ��������� ��������, - ��� �������� ���������� ������,
��������� ��������. ����� ����� ����������� ��������� ������ ��������
mysqld --standalone
; � ���� ������ �� ����� ����� ���������� ���������
�������� ����������, ������� ����� ������ ������ ��������.
� �������� ��������� ������� ����� ����������� ��������� mysqld
� �������
--standalone --debug
. � ���� ������ mysqld
����� �������� ������ � ����
������� `C:\mysqld.trace'. ��������, �� ����������� ����� ����� �� �������
���������� �������, �� ������� �� ����������� mysqld
.
See section E.1.2 �������� �������������� ������.
��� ������ ���� ������, ������� ``��������'' mysqld
, ����������� �������
mysqld --help
.
��� ���� ����� MySQL ������� � TCP/IP �� Windows NT 4, ���������� ���������� Service Pack 3 (��� ����)!
������ MySQL ��������������� �� Windows NT/2000/XP ��� ������. � ������, ���� ������ ��� ��������, ���������� ������� ��������� ��� ������ ��� ������ ��������� �������:
C:\mysql\bin> mysqladmin -u root shutdown
��� ����� ��������� ����������������� MySQL �� ����� ������������ root
,
������� �� ��������� ������������� ������������ Administrator
� �������
���������� MySQL. �������� ��������: ������� ���������� MySQL ���������
���������� �� �����-���� ��������� ������������� � ������� Windows.
������ ��������� ������ �������:
C:\mysql\bin> mysqld-max-nt --install
���� ��������� �����-���� �����, ��� ������ ���� ����������, ��� ``Start
parameters
'' � ���������������� ��������� Services
������� Windows �����
�������� ������� MySQL.
������ � ���������������� ��������� Services
(Windows Service Control
Manager
) ����� �������� � Control Panel
(� Administrative Tools
� Windows
2000). ������������� ��������� Services
��� ���������� �������� --instal
��� --remove
- ��� ������������ ������������� ��������� ������ �����������
�������.
�� ����������� � ���, ����� �������� ����� ������� ������������ ��� ������� �������, ����������� � ������� See section 2.1.2.2 ���������� ������������ MySQL ��� Windows.
�������, ��� ������� � ������ 3.23.44 MySQL ������� �����������
�������������� ��������� ������� - � ������ Manual
(���� ��� �� ���������
�������������� ������ ������� ��� �������� ������������ �������):
C:\mysql\bin> mysqld-max-nt --install-manual
������ ��������������� ��� ������ MySQL. ����� �� ����� ��������� �� �����
���� ������� ��� ������ ���������������� ��������� Services
��� ��������
NET START MySQL
.
����� ������� ������ mysqld-max-nt
����� ���� ��������� ��� ������
mysqladmin �� ���������������� ��������� Services
��� �������� NET STOP
MySQL
.
���� MySQL ������������� � �������� �������, �� ������������ �������
������������� ��������� ������ MySQL
-������� ��� ����������� ����������
������ ����������. � ������� MySQL < 3.23.47 Windows ������� ����� ����
��������� ������ ���������� ���������, ����� ���� ���������� �������
������� ���� ������, ���� ��������� ����� �������� (��� ����� ����
������������� �������� ������������� �������). ��������, ��� ���������
������� ���������� ������� InnoDB
������ ��������� �������������� �����
���������� ����������. ������� � MySQL ������ 3.23.48, Windows �������
���������� �������� MySQL-������� ������. ���� �� ��������, ��� �����
������� ��� ����� ������ ������������, ���������� ��������� MySQL-������
�� ��� ������, � �� ��������� ������ � ��������� ��� ������ ��������
mysqladmin shutdown
.
� Windows NT (�� �� � Windows 2000/XP) ���������� ��������, �������
����������� � ���, ��� ������� �� ��������� ������� ��������� ������
������� ������ 20 ������, ����� ���� ���������� ������� �������. ���
�������� �� ��������� �������� ����� ��������� � ������� ���������
Registry (�������), �������� `\winnt\system32\regedt32.exe' � ��������������
�������� WaitToKillServiceTimeout
� ������
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
. ������� ������
������, ������� �������� � �������������, �������� 120000, ����� Windows
NT ������� 120 ������.
���������� ��������, ��� ��� ������ � �������� ������� mysqld-max-nt
��
����� ������� � �������, � �������������, ���������� ������� ���
���������. ���������� �� ������� ��������� � �����
`c:\mysql\data\mysql.err'.
���� �� ����������� � ���������� ��������� mysqld-max-nt
� ��������
�������, ���������� ��������� ��� � ��������� ������� ����:
C:\> C:\mysql\bin\mysqld-max-nt --install
���� ��� �� �������, ����� ��������� mysqld-max-nt
����������
��������������� �������, �������� ���� � Registry!
���� �� �� ������ ��������� mysqld-max-nt
� �������� �������, ��� �����
��������� ��������� �������:
C:\> C:\mysql\bin\mysqld-max-nt --standalone ��� C:\> C:\mysql\bin\mysqld --standalone --debug
� ������ ���������� �������� �� �������� ���������� ���������� � `C:\mysqld.trace'. See section E.1.2 �������� �������������� ������.
MySQL ������������ TCP/IP �� ���� Windows-�������� � ����������� ������ � ����� NT/2000/XP. �� ��������� MySQL ���������� ����������� ������ ��� ���������� � ��������� ������� � ����� NT/2000/XP � TCP/IP - �� ���� ��������� �������, ���� �� ���������� ������ ���������� TCP/IP. ��� ������ ���������� ������������ ��������:
��� ������ | �������� |
NULL(�����������) | �� NT/2000/XP �������� ���������� ���������� ����� ����������� ������; ���� ��� �� ��������, ������������ TCP/IP. �� 9x/Me ������������ TCP/IP. |
. | ����������� ������. |
localhost | ���������� TCP/IP � ��������� ������� |
��� ��������� ������ | TCP/IP |
����� ��������� MySQL-������� ������������ ����������� ������, �������
�������� ����� --pipe
��� ������ .
� �������� ����� ������ ���
����������. ��� ����������� ����� ������ ����������� ����� --socket
.
� MySQL 4.1 ��� ������� ������������ ����� --protocol=PIPE
.
�������, ��� ������� � ������ 3.23.50 ����������� ������ �����������
������ � ������, ���� mysqld
������� � ������ --enable-named-pipe
. ���
������� ���, ��� � ��������� ������������� ���������� ����������� �������
��������� � ����������� ������ ������� MySQL.
��� �������� ����������������� MySQL ����� ��������� ��������� �������:
C:\> C:\mysql\bin\mysqlshow C:\> C:\mysql\bin\mysqlshow -u root mysql C:\> C:\mysql\bin\mysqladmin version status proc C:\> C:\mysql\bin\mysql test
���� ��� ������ mysqld
�� �������� ���������� ��� Windows 9x/Me ���������
��������, �� ���, ������ �����, ������� ���������� � ����� DNS. � �����
������ ������� ��������� mysqld � ������ --skip-name-resolve
� � ��������
���������� MySQL ������������ ������ localhost
� IP-������. ��������
������ � DNS ��� ���������� � MySQL-�������� mysqld-nt
, ���������� ���
NT/2000/XP, ����� ����� ���������� ����� --pipe
, ������� ������
������������� ����������� �������. ��������� ���� ����������� ���
����������� �������� MySQL.
���������� ��� ������ ��������� ������ � MySQL �� ��������� ������:
�������� ���� | �������� |
mysql | ������ ``�������'' ���������� Windows, ������������ ������ ������������ ����������� �������������� ������. |
mysqlc | ������ � �������������� ����������� � ��������� Cygnus GNU, ������� ������������ �������� readline .
|
���� �� ������ ������������ `mysqlc.exe', ������� ���������� ����������� `C:\mysql\lib\cygwinb19.dll' � ��������� ������� Windows (`\windows\system' ��� � ������ ����������� �����).
�� ��������� ���� ������������� Windows ��������������� ������ �����
������� �� ���� ����� ������ ��� ����� ������. ����� ���������� �������
������������ MySQL, ���������� ������ ������ ��� ������� ������������ �
������� ������ � ������� mysql.user
, ���������� Host='localhost'
� User='
`
.
���������� ����� ���������� ������ ��� ������������ root
. ����������� ����
������ ���������� � �������� ����������� ���������� �������, ������� �����
���� ����������� ����� ������������� ��� ��������� ������ ��� ������������
root
:
C:\> C:\mysql\bin\mysql mysql mysql> DELETE FROM user WHERE Host='localhost' AND User=' '; mysql> QUIT C:\> C:\mysql\bin\mysqladmin reload C:\> C:\mysql\bin\mysqladmin -u root password your_password
���� �� ������ ���������� ������ mysqld
����� ����, ��� ���������� ������
��� ������������ root
, ����� ������������ �������:
C:\> mysqladmin --user=root --password=your_password shutdown
���� � ��� �������� ������ ������������� ������ MySQL 3.21 ��� Windows,
��������������� ������� �� ���������� � �������� � ��������� �� ������:
parse error near `SET password'
. ��� ������� ���� �������� �������
��������� �������� � ���������� �� ��������� ��������� ��������� ������
MySQL.
� ������� ������ MySQL �� ������ ����� ��������� ����� ������������� �
�������� �� ���������� ��� ������ ������ GRANT
� REVOKE
(see section 4.3.1 ��������� ������ GRANT
� REVOKE
).
� ���� ������� ��������� ��������� ������������ ��������� ����������� ���������� � ��������� MySQL-�������� � �������������� SSH. ������� ���� ��������� �������� ����� ������� (David Carlson) - dcarlson@mplcomm.com:
SecureCRT
�� ������ http://www.vandyke.com/. ������ ���������
������� - f-secure
�� http://www.f-secure.com/. ���� � ���������� ������ -
�� ����� �������� �� Google
�� ������
http://directory.google.com/Top/Computers/Security/Products_and_Tools/CryptographySSH/Clients/Windows/
Host_Name=�����_������_MySQL-�������
. ������� userid=����_userid
���
���������� �� ����� �������� (����� ��������� �� ������ �����
������������/������ ��� MySQL).
��������� ���� - 3306
, ��������� ����
- ������_������_mysql_�������
, ��������� ���� - 3306
) ���� ���������
���������� (���� - 3306
, ���� - localhost
, ��������� ���� - 3306
).
localhost
, � �� yourmysqlservername
.
� ���������� ���� �������� �� ������ �������� ODBC-���������� �� ����� MySQL-��������, ���������� ��� ������ SSH-�����������.
������� � MySQL ������ 3.23.16 ������� mysqld-max
� mysql-max-nt
�
������������ MySQL ������������� � ������ -DUSE_SYMDIR
. ��� ������������
����������� ������������� ���� ������ �� ������ ����� ����� ����������
������������� ������ �� ��� (������� ����, ��� �������� �������������
������ � Unix).
� Windows ��� �������� ������������� ������ �� ���� ������ ��������� ����, ���������� ���� � ��������, �� ������� ��������� ������. ���� ���� ����������� � �������� `mysql_data' ��� ������ `database.sym'. �������, ��� ����� ������������� ������ ����� �������� ������ � ������ ���������� �������� `mysql_data_dir\database'.
��������, ���� ������� ������ MySQL ��������� � `C:\mysql\data', � �� ������
���������� ���� ������ foo
� �������� `D:\data\foo', ���������� ������� ����
`C:\mysql\data\foo.sym', ���������� ����� `D:\data\foo\'. ����� ����� ���
�������, ����������� � ���� ������ foo
, ����� ����������� � `D:\data\foo'.
�������, ��� ��-�� ������ � �������� ��� �������� ������ ������� � MySQL �� ���������� ������������� ������������� ������ �� ���������, ���� ���� �� ������� MySQL � ���������� ������ �����������. ����� ���������� ����������� ���������� ������������� ������, �� ������ ��������� � ���� ���� `my.cnf' ��� `my.ini' ��������� ������:
[mysqld] use-symbolic-links
� MySQL 4.0 ������������� ������������� ������ �� ��������� �����
��������. ���� �� ������ ��������� ��� �����������, �� ��� ������ ������
MySQL ���������� ������������ ����� skip-symlink
.
� ������ �������� ������� ������� ����� `mysql.h' �������� `windows.h':
#if defined(_WIN32) || defined(_WIN64) #include <windows.h> #endif #include <mysql.h>
��������� ���� ��������� ����� ���� � �������������� ������������ ���������� `libmysql.lib', ������� �������� ������ ��������� ��� �������� `libmysql.dll' �� ����������, ���� �� ����������� ����������� `mysqlclient.lib'.
�������, ��� ��������� ���������� mysqlclient
������������� ��� ���������
����������, ������� �������������� ���� ��������� ���, ����� ����
��������� �������������!
�� ��������� ������ ������ MySQL ��� Windows ��������������� ���� ��� ������ ����������. ����������� ���� ������ � ������ ��� Unix ����������, �� ����������� ��������� ��������:
mysqld
�� ���������������
�����, ���� ��� ������ ������������ ����� ����������! ������ ������
Windows �� ���������� ���� ������.
SELECT
� INSERT
� MySQL ������������
������� pread()
� pwrite()
. � ��������� ����� ��� ��������
pread()
/pwrite()
�� ��������� mutex'�. ������ � ���� ����� �� �������
������ ������ ���������� ��������� ������ ����������� �����������, �����
����� ����������� ������������ ��������� readfile()
/writefile()
��
NT/2000/XP - � ����� ��������� ������. � ������� ���������� �����
������������ �������� � MySQL ������ �� ����� ���� ������ 1024; ���
��������, ��� �� �� ������� ������� ����� �� ���������� �������������
���������� � MySQL � NT/2000/XP, ��� � Unix.
mysqladmin kill
�� �������� ��� ``������'' ����������
mysqladmin shutdown
�� ����� ���������� �� ��� ���, ���� ����������
``������'' ����������.
shutdown
; ��� ����� ������� � �������
mysqladmin shutdown
.
LOAD DATA
INFILE
��� SELECT ... INTO OUTFILE
, ������ `\' ���������� ������� ������:
mysql> LOAD DATA INFILE "C:\\tmp\\skr.txt" INTO TABLE skr; mysql> SELECT * INTO OUTFILE 'C:\\tmp\\skr.txt' FROM skr;� �������� ������������ ����� ������������ ����� ������ Unix-�����:
mysql> LOAD DATA INFILE "C:/tmp/skr.txt" INTO TABLE skr; mysql> SELECT * INTO OUTFILE 'C:/tmp/skr.txt' FROM skr;
can't open named pipe
(���������� ������� ����������� �����)
mysql
����� �������� ��������� ��������� �� ������:
error 2017: can't open named pipe to host: . pipe...��� ���������� ��-�� ����, ��� � ������ ������ MySQL �� NT ����������� ������ ����������� �� ���������. ����� �������� ����� ������, ������� ������������ � ����� �������� MySQL ����
--host=localhost
��� ������� ����
������ `C:\my.cnf', ���������� ��������� ������:
[client] host = localhost������� � ������ 3.23.50 ����������� ������ ������������ ������ � ������, ����
mysqld
������� � ������ --enable-named-pipe
.
access denied for user
(������ ������������ ��������)
Access denied for user:
`some-user@unknown' to database `mysql'
��� ������� ������� �
MySQL-�������, ������������ �� ��� �� ������, � ������� ���������� ������,
��� ������, ��� MySQL �� ����� ��������� ���������� ����� ����� ������.
��� ������� ������ �������� ������� ������� ���� `\windows\hosts',
����������:
127.0.0.1 localhost
ALTER TABLE
ALTER TABLE
������ � ������� ��� ������ �������
�����������. ������ ������� Windows �� ����� ������� ����, �������
������������ ������ ������� (��������, � ������� �� ������ �����-������
������ ������ ��� ��������). ���������� DROP TABLE
��� ��������, ��������
� ������ ������� ������� MERGE
, �� ����� �������� � Windows, ��� ���
����������� �������, ������� ��������� ���������� MERGE
, ������ ��
�������� ������ MySQL. ��������� � Windows ������ ������� �������� �����,
������� ������� �������� ��� MERGE
-������� (��������� FLUSH TABLES
) ���
������� ��� MERGE
-������� ����� ��������� �������. �� �������� ��� ������
������������ � ��������� ��������� VIEW
. ��������� DATA DIRECTORY
� INDEX
DIRECTORY
� CREATE TABLE
� Windows ������������, ��������� Windows ��
������������ ������������� ������.
���� ��������� ��������� �������� ������� ��� ����, ��� ������� ������ ��� � ������ ��� ��������� ��� Windows:
mysqld
� �������� ������� � ������ --install
(�� NT)
���� �� ������� ����� ����������� ��������� ����� �� ��������� � ���������
������. ������ ��� �������� �������� ����� ������ ������ ���������� � ����
`C:\my.cnf'.
mysqld
�� ���������� �����. ������ ���
����� ����� ��������� mysqladmin shutdown
.
readline
� Windows ��� ������������� �
���������������� ����������, ����������� �� ��������� ������ mysql
.
mysql
, mysqlshow
, mysqladmin
�
mysqldump
) ����� ����� �������.
mysqladmin kill
� Windows.
mysqld
������ �������� � �������������� "C", � �� � ��������������,
������������� �� ���������. � �������������� ����� ������� �����������,
����������� ������������� ���������� mysqld
�������� ��������
�������������� ��� ������� ����������.
README
,
������� ��������� � �������� MySQL-Windows.
� ������� Solaris �������� ������������ ��� ��� �� ���������� ������������ MySQL! ��������� tar � Solaris ``�� �����'' �������� � �������� ������� ������, ������� ��� ������� ����������� MySQL �� ������ ������� ��������� �� ������, �������� ����������:
x mysql-3.22.12-beta/bench/Results/ATIS-mysql_odbc-NT_4.0-cmp-db2,\ informix,ms-sql,mysql,oracle,solid,sybase, 0 bytes, 0 tape blocks tar: directory checksum error
� ���� ������ ��� ���������� ������������ ���������� ������������
GNU-������ ��������� tar
(gtar
). ���������������� ������ ������ ���������
��� Solaris ����� ��������� � http://www.mysql.com/downloads/os-solaris.html.
����������� ������ Sun �������� ������ ������� � ������ Solaris 2.5. ��� ������ 2.4 � ����� ������ MySQL ������������� ���������� MIT-pthreads (see section 2.3.6 ��������� �� ������� MIT-pthreads).
��������� ��������� �� ������ ������������:
checking for restartable system calls... configure: error can not run test programs while cross compiling
��������, ��� ����� ����� �����-�� ������ � ��������� �����������! � ���� ������ ���������� �������� ��� ���������� �� ����� ������ ������. ��� �������� ����� ����� ������, ������� � ���� `config.cache' ��������� ������:
ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'}
��� ������������� Solaris �� SPARC �� ����������� ���������� gcc
2.95.2.
��� ����� �������� �� ������ http://gcc.gnu.org/. �������, ��� egcs
1.1.1
� gcc
2.8.1 �������� �� SPARC ���������!
������������� ������ ��� configure
��� ������������� gcc
2.95.2:
CC=gcc CFLAGS="-O3" \ CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \ ./configure --prefix=/usr/local/mysql --with-low-memory --enable-assembler
���� ������������ UltraSPARC, �� ��� ���������� ������ "-mcpu=v8 -Wa,-xarch=v8plusa" � ���������� CFLAGS � CXXFLAGS ����� �������� ��������� ������������������ �� 4%.
��� ������������� ����������� Sun Fortre ������ 5.0 (��� ����)
����� ��������� configure
��������� �������:
CC=cc CFLAGS="-Xa -fast -xO4 -native -xstrconst -mt" \ CXX=CC CXXFLAGS="-noex -xO4 -mt" \ ./configure --prefix=/usr/local/mysql --enable-assembler
����� ������� 64-��������� ����������� ��� � �������:
CC=cc CFLAGS="-Xa -fast -native -xstrconst -mt -xarch=v9" \ CXX=CC CXXFLAGS="-noex -mt -xarch=v9" ASFLAGS="-xarch=v9" \ ./configure --prefix=/usr/local/mysql --enable-assembler
� ������ �� ������������������ MySQL � Sun Fortre 5.0 �� �������� 4%-��� ��������� �� UltraSPARC �� ��������� � gcc 3.2 � ������ -mcpu.
���� �� �������� 64-��������� ���, �� �� 4% ��������� ��� 32-���������, �� mysqld ����� ����������� ������ ������� � ������������ ������ ������.
� ������ ������������� ������� � fdatasync
��� sched_yield
�� ����� ������
����� ���������� LIBS=-lrt
� ��������� ������ ������� ����������������.
����������� ����� ��������� ������ � ����� ������, ��� WorkShop 5.3, ������������:
��������������� ������ configure �����, ������� ������:
#if !defined(__STDC__) || __STDC__ != 1
�������:
#if !defined(__STDC__)
��� ��������� __STDC__
� ������� ����� -Xc
���������� Sun �� ������
��������������� ��������� � ������ `pthread.h' �� ������� Solaris. ���
������ Sun (����������� ���������� ��� ����������� ���������� ����).
���� ��� ������� mysqld
������ ����������� ���� ��������� �� ������:
libc internal error: _rmutex_unlock: rmutex not held
���������� ����������� ������� MySQL, ��������� ���������� Sun � ������
���������� ��������������� (-mt
). �������� ����� -mt
� CFLAGS
� CXXFLAGS
�
���������� ��������� mysqld
��� ���.
��� ������������� SFW ������ gcc (������������ � Solaris 8) ���������� �
���������� ��������� LD_LIBRARY_PATH
����� ����������������� ��������
`/opt/sfw/lib'.
��� ������ � gcc
�� sunfreeware
.com ����� ���������� ���������
�������������. �� ��������� ������� ���������� ����������������� gcc �
�������� ���������������� ��������� GNU � ��� �������, ��� �� �����������
�� ������������.
��������� ������������� ������ ��� ���������� MySQL ������������ gcc
��������, ��� gcc
�� ��������������� ��� ���� ������ Solaris:
shell> gcc -O3 -g -O2 -DDBUG_OFF -o thr_alarm ... ./thr_alarm.c: In function `signal_hand': ./thr_alarm.c:556: too many arguments to function `sigwait'
� ���� ������ ����� ����� ����� ������ ������ gcc
� �������������� ��
������������� gcc
-������������! ����� ��� �������� ������ gcc
(�� �������
���� ��� Solaris 2.5) �������� ������, ����������� � �������������
���������� �����, ������� ������ ��� ���������, ������������ ������ (�
��������, � ������ ���������)!
� Solaris �� �������������� ����������� ������ ���� ��������� ���������
(libpthreads
� libdl
), ������� ������������� MySQL � ������ -static
������. ��� ������� ����� ���������� �� �������� ���� �� ����������� ����
��������� �� ������:
ld: fatal: library -ldl: not found ��� undefined reference to `dlopen' ��� cannot find -lrt
���� ������� ����� ��������� ������������ �������� ���������� ���������� �
mysqld
, �� � ����� ��������� MySQL �������� ��������� ��������� �� ������:
Error in accept: Protocol error
��� ������� ���� �������� ����� ���������� ��������� ������ � ������
--set-variable back_log=50
. ��������: --set-variable
�� ������������ � MySQL 4.0. ������ ����������� --back_log=50
.
See section 4.1.1 ��������� ��������� ������ mysqld
.
���� �� �������� ����������� MySQL-������, �� ��� ������� ��� ��������� ����� ���������� ��������� ��������� �� ������:
ld.so.1: ./my: fatal: libmysqlclient.so.#: open failed: No such file or directory
�������� ����� ������ ����� �� ��������� ��������:
-Lpath
):
-Wl,r/������-����-�-libmysqlclient.so
.
LD_RUN_PATH
.
���� �� ����������� � ���������� ����������������, ������� ��������� �
������ -lz
� � ��� �� ����������� zlib
, ���������� ��� ��������:
--with-named-z-libs=no
.
���� ��� ������������� gcc
�� ����������� � ���������� ��������
UDF-������� � MySQL, ���������� �������� -lgcc
� ������, ���������� ��
���������� UDF-�������.
��� ���� ����� MySQL-������ ��������� �������������, ����� ����������� `support-files/mysql.server' � `/etc/init.d' � ������� �� ���� ������������� ������ `/etc/rc3.d/S99mysql.server'.
��������� Solaris �� ������������ ����� ������ ������ ��� ����������,
������������ setuid()
, ���������� �������� ���� ������ ������ ���������
mysqld
��� ������������� ����� --user
.
�� Solaris 2.7 � 2.8 ����� ��������� ������������ �������� ����� ��� Solaris 2.6. ����������� �������� �� ������ � Solaris 2.6 ��������� ����� � � Solaris 2.7 � 2.8.
���������� ��������, ��� MySQL ������ 3.23.4 � ����������� ����� ������������� ���������� ����� ������ Solaris � �������� ��������� ���� �������!
� Solaris 2.7/2.8 ������� ��������� ������ �� ���������� ������. ��� ������������� gcc �� ������ �������� ��������� ��������� �� �������:
/usr/include/widec.h:42: warning: `getwc' redefined /usr/include/wchar.h:326: warning: this is the location of the previous definition
� ���� ������ ��� ����������� ������ ����� ��������� ��������� ��������:
���������� /usr/include/widec.h
� .../lib/gcc-lib/os/gcc-version/include
�
�������� ������ � ������� 41, ����������:
#if !defined(lint) && !defined(__lint) �� #if !defined(lint) && !defined(__lint) && !defined(getwc)
���� � �������������� ������� - ��������������� `/usr/include/widec.h'
��������������� �� �����. � ����� ������ ����� ����������� ����������
������� `config.cache' � ��������� configure
��������!
���� ��� ������� make
�������� ��������� �� ������� ��������� ����������
����, ������� � ���, ��� ��������� configure
�� ���������� ���� `curses.h'
(��������, ��-�� ������ � `/usr/include/widec.h'):
In file included from mysql.cc:50: /usr/include/term.h:1060: syntax error before `,' /usr/include/term.h:1081: syntax error before `;'
������ ��� �������� ����� ����� �� ��������:
CFLAGS=-DHAVE_CURSES_H CXXFLAGS=-DHAVE_CURSES_H ./configure
(��� ������ ������ ���� ������� �������, ��� ��������).
configure
.
#define HAVE_TERM
�� `config.h' � ��������� make
��������.
���� �������� ������ �� ����� ���������� -lz
��� ���������� �����
���������� ���������, �� ��������, ��������, ����������� � ���, ��� ����
`libz.so' ���������� � `/usr/local/lib'. ������ �������� ����� ������ ����� ��
����������� ���� ��������:
LD_LIBRARY_PATH
.
--with-named-z-libs=no
.
�� Solaris 2.8 �� x86-� ����������� mysqld
�������� ���������� �
����������� ������ ������ �� �����, ���� �� ��������� ���������� strip
.
���� ��� ������������� gcc
��� egcs
�� Solaris x86 ��� ������� �������� ��
����������� � ��������� ���������� ���������� ��������� � �����������
������ ������ �� �����, ����������� ��� ������ ������� configure
��
���������� �����������:
CC=gcc CFLAGS="-O3 -fomit-frame-pointer -DHAVE_CURSES_H" \ CXX=gcc \ CXXFLAGS="-O3 -fomit-frame-pointer -felide-constructors -fno-exceptions \ -fno-rtti -DHAVE_CURSES_H" \ ./configure --prefix=/usr/local/mysql
��� �������� �������� ������� � ����������� libstdc++
� ���������������
���������� � C++.
���� ����������� ������������ �� ��������, �������� ������ � ����������
����������� � ��������� ��������� � ��������� ��������������� ����� ��� �
��������� gdb
(see section E.1.3 ������� mysqld ��� ������ gdb).
� ���� ������� ��������� ���������� ������������ ��������� BSD-������, � ����� ���������� ������ ���� ������.
��� ������ Mysql ������������� FreeBSD ������ 3.x, ��������� ������ � �������� �������� ������� ����� ���������������.
����������, � ������� � ����� ���������������� �������� ��������� ��������
������������� ������ mysql-server
� mysql-client
�� ��������� ������
FreeBSD, ������� �������� �� ������ http://www.freebsd.org/.
������������� ���� ������ ������������:
pkg_info -L
� �������� �� ��� ������ ������� pkg_delete
� ������, ���� �� ����� ��
���������� � MySQL �� ������ ������.
������������� ������������ MIT-pthreads �� FreeBSD ������ 2.x �
����������� ������ ��� 3.x � ����� ������� ������ FreeBSD. �� ���������
��������� ������� 2.2.x �������� ���������� ����������� �������, �� ���
���� �� ��������� �������� � ���������� mysqld
.
��� ������ MySQL � ������������ � Makefile
'�� ���������� ��������� GNU
make (gmake
). ������ ��� ��������� ������ MySQL, ������� ���������� GNU
make.
��������������, ��� ������������ ���� ������ ���� �������� ���������. �
��������� ������ �������� �������� ��� ������ ��� ���������� � mysqld
.
��������� � ������������ ������ localhost
� ����� `/etc/hosts' (���
���������� ��� ����������� ���� ������ ��������� �������� ���������� �
�����). ���� `/etc/hosts' ������ ���������� � ������:
127.0.0.1 localhost localhost.your.domain
������������ ������ ������ � ��������� MySQL �� FreeBSD � ��������������
gcc
(������ 2.95.2 ��� ����� �������):
CC=gcc CFLAGS="-O2 -fno-strength-reduce" \ CXX=gcc CXXFLAGS="-O2 -fno-rtti -fno-exceptions -felide-constructors \ -fno-strength-reduce" \ ./configure --prefix=/usr/local/mysql --enable-assembler gmake gmake install ./scripts/mysql_install_db cd /usr/local/mysql ./bin/mysqld_safe &
���� ��������� configure
������ ������������ MIT-pthreads, ����������
����������� � ������������ �� MIT-pthreads (see section 2.3.6 ��������� �� ������� MIT-pthreads).
���� ��� ���������� make install
�������� ������, ���������� �
������������� ���������� `/usr/include/pthreads' (can't find
`/usr/include/pthreads'), ��� ������, ��� configure
�� ���������
������������� ������������� MIT-pthreads. ��� ����������� ������ ������
���������� ��������� ��������� �������:
shell> rm config.cache shell> ./configure --with-mit-threads
��� ��������, � FreeBSD �� ��������� ����������� ����� ��������� ��������
��� ���������� ������������ �������� ������ (see section A.2.16 �� ������ ���� (File not found
)).
����� ��������� ���������, ������� ����������������� ������ ulimit -n
�
������� safe_mysqld
��� �������� ����������� ��� ������������ mysqld
�
`/etc/login.conf' (�� �������� ����������� ��� �������� cap_mkdb
`/etc/login.conf'). ������ �����, ����� ����� ��������� ���������
����������� ������ ��� ����� ������������ � ����� �������, ���� ��
������������ �������� �� ��������� (��� ������ chpass mysqld-user-name
).
See section 4.7.2 safe_mysqld
, �������� mysqld
.
��� ������� ������������� ������ ����������� ������ ����� �����������
������� ����������� ����, ����� ��������� MySQL ������������ ����� ���
512M� ����������� ������. ����� �������� ������ ����������, ���������� �
option MAXDSIZ
� ���������������� ����� LINT.
� ������ ������������� ������� � ������� ����� � MySQL �������� �����
��������� ���������� ��������� ���������� TZ
. See section F ���������� ���������.
��� ��������� ���������� � ���������� ������� ������� ������������
������ �� ���� ������� FreeBSD, ������� ���������� ��� -RELEASE
.
��� ���������� �� NetBSD ����������, ����� ���� ����������� ��������� GNU
make
. � ��������� ������ ���������� ���������� �������� ��� ������� make
��������� lint
�� ������ C++.
�� OpenBSD ������ 2.5 ����� ������������� MySQL � �������������� ����������� �������. ���������� ������� ��������� �����:
CFLAGS=-pthread CXXFLAGS=-pthread ./configure -with-mit-threads=no
�� ���������� ����� �������������, OpenBSD 2.8 �������� ������ � ���������� �������, ������� �������� �������� � MySQL. ������������ OpenBSD ��������� ��� ������, �� � 25 ������ 2001 ���� ������������ ������ �������� ������ � ����� ``-current''. �������� ���� ������ ���������� ������� ���������: ��������� �����, ������� ��������, ������� �������� ���������� � ��������� ��������� ���������.
��������� ��������� �� ������ ����� Error in accept:: Bad file
descriptor
��� ������ 9 ��� ������� ������� ������� ���� �������
��������, ��� �� �� �������� ���������� ������������ ������ ��� MySQL.
� ���� ������ ���������� ��������� safe_mysqld
�� ����� ������������ root
� �������:
--user=mysql --open-files-limit=2048
��������� ����������� ���� ������ ��� ���������� MySQL ��������, ���
������������� � ������� ulimit
�������� ������� ����������� ������ �������
����:
item_func.h: In method `Item_func_ge::Item_func_ge(const Item_func_ge &)': item_func.h:28: virtual memory exhausted make[2]: *** [item_func.o] Error 1
���������� ��������� ulimit -v 80000
� ��������� make
��� ���. ���� ��� ��
�������, � � �������� �������� ������������ bash
, ���������� ������� ��
csh
��� sh
: ��������� ������������ BSDI �������� ��� � ��������� � bash
�
ulimit
.
���� �� ����������� gcc
, ��, ��������, ���������� �������� ����
--with-low-memory
��� ������� configure
, ����� ���������� �����������
���������� `sql_yacc.cc'.
��� ������������� ������� � ������� ����� � MySQL ����� ������ ���������
���������� TZ
(see section F ���������� ���������).
��� ���������������� MySQL ������� ������������ ��������� �������:
shell> env CXX=shlicc++ CC=shlicc2 \ ./configure \ --prefix=/usr/local/mysql \ --localstatedir=/var/mysql \ --without-perl \ --with-unix-socket-path=/var/mysql/mysql.sock
��������� � ��������� ��������� ������:
shell> env CC=gcc CXX=gcc CXXFLAGS=-O3 \ ./configure \ --prefix=/usr/local/mysql \ --with-unix-socket-path=/var/mysql/mysql.sock
��� ������� �� ������ �������� �������������� ��������� ��� ������������ �������� �� ���������, �� ��������� ������� �����.
���� ��������� �������� � ������������������� ��� ������� ��������,
���������� ��� ������� mysqld
������������ ����� --skip-thread-priority
!
���������� ������ ����� �������� � ����, ��� ��� ������ ����� �������� �
���������� �����������; �� BSDI ������ 3.1 ��� ������������ ���������
������������������ (�� ������� ����, ���� �� ��� ��������� �����������
�������).
� ������ ��������� ��������� �� ������ virtual memory exhausted
�� �����
���������� ���������� ��������� ulimit -v 80000
� ��������� make
��������.
���� ��� �� �������, � � �������� �������� � ��� ������������ bash
,
���������� ������� �� csh
��� sh
: ��������� ������������ BSDI �������� �
��������� � bash
� ulimit
.
BSDI ������ 4.x �������� ������, ������� ��������� � �������. ���� �� ���������� ������������ MySQL �� ���� �������, ���������� �������������� ���������� ��� �����, ����������� � ���������� �������. �� ������� ����, ������ ���� ���������� M400-023.
�� ��������� �������� BSDI ������ 4.x �� ������ ����������� � ����������
��� ������������� ������������ ���������. ����������� ��� ���
������������� ��������� �����-���� ���������� ���������, ��������
mysqladmin
. � ������ ������ ���������� ������������������� MySQL �
�������� ������������ ������������ ����������, ������ ��� �������
configure ����� --disable-shared
.
��������� ������������ �������� ��� � ��������� �� BSDI 4.0.1, �������
����������� � ���, ��� ����� ��������� ����� ����� ������ ������ mysqld
��
����� ������� �������. ��� ���������� ������, ��� ��-�� �����-�� ���������
��� ������������ ������ mysqld
�������� ������� ������� ��� ������-����
�������!
��� ������� �������� ���������� ���� �������� MySQL �� ������ 3.23.34,
���� ����� ������� configure
������� ������ #define HAVE_REALPATH
�� �����
`config.h' ����� �������� make
.
�������, ��� ������������� �������� �������� � ������������� ������� ������������� ������ �� ����� ��������� ���� ������ �� ������ ������� ���� ������ ��� ������������� ������ �� ������� � ������ ���� ������ �� BSDI! (�������� ������������� ������ �� ������ ���� �����������.)
�� Mac OS X 10.x MySQL ������ �������� ��� �����-���� �������. ��� ���� ������������ ������� ��� ������������� � ������ � pthread!
��� ����� �������� Mac OS X 10.x Server. ���������� ��� ��������� ��������� ����� �� ���������� �� ���������� ��� ���������� ������. ������ ������, ��� Mac OS X Server ������������ � ����������������� MySQL.
See section 2.1.3 ��������� MySQL �� MacOS X.
������ ��� ���������� ����������������� MySQL �� ������� Mac OS X,
���������� ���������� ����� pthread
, ������� ��������� �� ������
http://www.prnet.de/RegEx/mysql.html.
���� �������� ����� ��� Mac OS X ������������� �� Rhapsody 6.3 �� ���������� ����������������� �����������:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc \ CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors \ -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql \ --with-extra-charsets=complex --enable-thread-safe-client \ --enable-local-infile --disable-shared
��������, ��� ����������� �������� ���������� � ���� �������� �������� -
��� ������� � mysql
� mysqladmin
�� ��������� ������:
alias mysql '/usr/local/mysql/bin/mysql' alias mysqladmin '/usr/local/mysql/bin/mysqladmin'
��� �� �� ������ ������ �������� ���� /usr/local/mysql/bin
� ���������� ���������
PATH
, ������, ����� ���������� � ����
`$HOME/.tcshrc':
setenv PATH $PATH:/usr/local/bin
��������� �������� �������� MySQL ��� HP-UX ���������������� ��� ����� HP depot � tar. ��� ������������� ����� depot � ��� ������ ���� ����������� ������ HP-UX �� ���� 10.x - ��� ����, ����� ���������� ����������� ������ � HP-��������������� ������ � depot-�������.
������ MySQL ��� HP ���� �������������� �� ������� HP 9000/8xx � ������� HP-UX 10.20 � �������������� MIT-pthreads. ��������, ��� ��� ������ �������� � ���� ������������. MySQL ������ 3.22.26 � ���� ����� ����� ������� � �������������� ����������� ������� HP.
������ ������������, �� ������� �������� ������ MySQL:
�� ��������� ������������� MySQL, ������ �����, �������� �� �����:
��� ��������� ������������ ����������� ���� �� �������������� ���� ������;
����� /path/to/depot
- ������ ���� � depot-�����:
shell> /usr/sbin/swinstall -s /path/to/depot mysql.full
shell> /usr/sbin/swinstall -s /path/to/depot mysql.server
shell> /usr/sbin/swinstall -s /path/to/depot mysql.client
shell> /usr/sbin/swinstall -s /path/to/depot mysql.developer
depot �������� �������� ����������� ����� � ���������� � `/opt/mysql', �
������ - � `/var/opt/mysql'. depot ����� ������� ��������������� ������ �
`/etc/init.d' � `/etc/rc2.d' ��� ��������������� ������� ������� ��� ��������
������. ��������, ��� ��� ��������� ���������� �������� �������
������������ root
.
��� ��������� �� HP-UX ������������ tar.gz �� ������ ������ ����
���������� GNU tar
.
��� ���������� MySQL �� HP-UX ���������� ���� ��������� �������. ��
����������� ��������� ������ ������������ ����������� HP-UX gcc
, ������
��� ���, ��������� gcc
, �����!
��� HP-UX ������������� ������������� gcc 2.95. �� ������� ��������� ������� ������ ����������� (��������� -O6), ��������� �� HP-UX ��� ����� ���� �����������.
������ �������� ��������� ������ ������������ ��� gcc 2.95:
CFLAGS="-DHPUX -I/opt/dce/include -fpic" \ CXXFLAGS="-DHPUX -I/opt/dce/include -felide-constructors -fno-exceptions \ -fno-rtti" CXX=gcc ./configure --with-pthread \ --with-named-thread-libs='-ldce' --prefix=/usr/local/mysql --disable-shared
��������� ������ ������������ ������ �������� ��� gcc 3.1:
CFLAGS="-DHPUX -I/opt/dce/include -O3 -fPIC" CXX=gcc \ CXXFLAGS="-DHPUX -I/opt/dce/include -felide-constructors -fno-exceptions \ -fno-rtti -O3 -fPIC" ./configure --prefix=/usr/local/mysql \ --with-extra-charsets=complex --enable-thread-safe-client \ --enable-local-infile --with-pthread \ --with-named-thread-libs=-ldce --with-lib-ccflags=-fPIC --disable-shared
��� HP-UX ������ 11.x �� ����������� ������������ MySQL �� ���� 3.23.15.
��-�� ��������� ����������� ������ � ����������� ����������� HP-UX �� ������� ������� MySQL �� HP-UX 11.0 ���������� ���������� ��������� �����:
PHKL_22840 Streams cumulative PHNE_22397 ARPA cumulative
���������� ������ ������ ����� �������� ��������� EWOULDBLOCK
�� recv()
�
EBADF
�� accept()
� ��������� �����������.
��� ������������� gcc
2.95.1 � �������, � ������� �� ���� ��������� �����,
��������� ������:
In file included from /usr/include/unistd.h:11, from ../include/global.h:125, from mysql_priv.h:15, from item.cc:19: /usr/include/sys/unistd.h:184: declaration of C function ... /usr/include/sys/pthread.h:440: previous declaration ... In file included from item.h:306, from mysql_priv.h:158, from item.cc:19:
�������� ����������� � ���, ��� HP-UX ���������� ������������� �����������
������� pthreads_atfork()
. ������������� ��������� ��������� �
`/usr/include/sys/unistd.h':184 � � `/usr/include/sys/pthread.h':440
(����������� ��������� ����).
���� �� ��������� ������� ����������� � ���, ����� �����������
`/usr/include/sys/unistd.h' � `mysql/include' � ��������������� `unistd.h' ���,
����� ����������� ��������� � ������������ �� `pthread.h'. ���� ��������
��������� ������ diff
:
183,184c183,184 < extern int pthread_atfork(void (*prepare)(), void (*parent)(), < void (*child)()); --- > extern int pthread_atfork(void (*prepare)(void), void (*parent)(void), > void (*child)(void));
����� ����� ������ �������� ���������������� ��������� �� ���������� �����������:
CFLAGS="-fomit-frame-pointer -O3 -fpic" CXX=gcc \ CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti -O3" \ ./configure --prefix=/usr/local/mysql --disable-shared
���� �� ����������� MySQL 4.0.5 � ������������ HP-UX, �� ��� �������� (��������� �� cc B.11.11.04):
CC=cc CXX=aCC CFLAGS=+DD64 CXXFLAGS=+DD64 ./configure --with-extra-character-set=complex
�� ������ ������������ ������, �������� ����:
aCC: warning 901: unknown option: `-3': use +help for online documentation
��� ��������� ���������� ��������� �� ������ ��� ������ configure
checking for cc option to accept ANSI C... no configure: error: MySQL requires a ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.
������� ��������������, ��� ���� � ����������� K&R �� ������ ������, ��� ���� � ������������ HP-UX C � C++.
��� ���� �������, �� ������� �� �� ������� �������������� MySQL, �����������
� ���, ��� �� ������ ������� ���� +DD64
, ��������� ����.
� Autoconf ��������� �������������� ����������� xlC
, ������� ���
���������� MySQL ������� �������� ������� configure
��������� ��������� (�
���� ������� ������������ ���������� IBM):
export CC="xlc_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192 " export CXX="xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192" export CFLAGS="-I /usr/local/include" export LDFLAGS="-L /usr/local/lib" export CPPFLAGS=$CFLAGS export CXXFLAGS=$CFLAGS ./configure --prefix=/usr/local \ --localstatedir=/var/mysql \ --sysconfdir=/etc/mysql \ --sbindir='/usr/local/bin' \ --libexecdir='/usr/local/bin' \ --enable-thread-safe-client \ --enable-large-files
����� ������� �����, ������������ ��� ���������� ������������ MySQL, ������� ��������� �� ������ http://www-frec.bull.com/.
���� � ����������� ���� ������� ������������ �� ��������� -O3
�� -O2
,
������� ����� ������� ����� -qstrict
(��� ����������� ����������� IBM C).
��� ������������� gcc
��� egcs
��� ���������� MySQL ������� ��������� ����
-fno-exceptions
, ������ ��� ���������� �������������� �������� � gcc
/egcs
�� ��������� � ���������� �������! (��� ��������� �� egcs
1.1.) ����������
����� ��������� ��������� �������� � ����������� IBM, ������� �����
�������� � ��������� ���������� ���� ��� ������������� ��� � gcc
.
��� ������������� egcs
��� gcc
2.95 �� AIX �� ����������� ��������� ������
����������������:
CC="gcc -pipe -mcpu=power -Wa,-many" \ CXX="gcc -pipe -mcpu=power -Wa,-many" \ CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \ ./configure --prefix=/usr/local/mysql --with-low-memory
��� ���� ����� ���������� ���� ��������, ����� ���������� ��������� �����
-Wa
,-many
. � IBM �������� � ������������� ������ ��������, �� ��
����������� �� ��������� ���������� ������, ��������� ���������� ������
������. ��� ����������, ���������� �� ������������� -fno-exceptions
� gcc
2.95, �� ��������� � MySQL ��� ����������� �������������� ��������, � ���
����� ������������ �������� ����� �������� ����, �� ����������� ������
������������ �� � egcs
/gcc
.
� ������ ������������� ������� � ���������� �� ���������� ���������� �������� -mcpu=xxx � ������������ �� ����� �����������. ������ ���������� ������������ power2, power ��� powerpc, ��, ��������, ���������� ����� ������� 604 ��� 604e. ���� ��� � �� ��������������, �� ������������� "power" ����� ���������� ����� ������, ���� �� power2-�������.
���� �� �� ������, ����� � ��� ���������, ������� ��������� uname -m. ������ ������� ���������� ������ ��������� "000514676700", ������ ������� xxyyyyyymmss, ��� xx � ss ������ 0, yyyyyy - ���������� ������������� ������� � mm - ������������� ���������� Planar. ����� ���� �������� ��������� �� ������ http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds5/uname.htm.
� ������������ � ������ ������ ����� ������ ��� � ������ ������, � ��� �� ��� -���������� ��� ����������.
������������� ������� � ��������� (MySQL ���������� ������� ��� ������� ��������) ����� ��������, ��� �� ����������� � ������� ������������ ������� � ������ � �������� � ���������. � ���� ������ ����� ��������� MySQL ������������ ������� ��� ������ ��������� ������ ������������:
shell> CFLAGS=-DDONT_USE_THR_ALARM CXX=gcc \ CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti \ -DDONT_USE_THR_ALARM" \ ./configure --prefix=/usr/local/mysql --with-debug --with-low-memory
��� �� �������� �� ������������������ MySQL, �� �������� � ���������
�������, ���������� � ������������� �������� ������ ������� �� ������
����������� ��� ������ ������ mysqladmin kill
��� mysqladmin shutdown
.
������ ����� ������ �������� ������ ��� ������� ������� ��������� �������.
�� ��������� ������� AIX ���������� � libbind.a
�������� � ����, ���
getservbyname �������� ��������� ��������� ��������� � ����������� ������
������ �� ���� (core dump). ��� ������ AIX � � ��� ������� �������� � IBM.
��� AIX 4.2.1 � gcc ���������� ������� ��������� ���������:
����� ������������ ������� ��������������� ����� `config.h' � `include/my_config.h', � ����� �������� ������, ����������
#define HAVE_SNPRINTF 1
��
#undef HAVE_SNPRINTF
� ���������� ���������� � ����� `mysqld.cc' �������� �������� �������
initgoups
.
#ifdef _AIX41 extern "C" int initgroups(const char *,int); #endif
���� ��� ����� �������� ����� ������ �������� mysqld, ������������
������� ulimit -d unlimited
. ��� ����� ����������� � mysqld_safe
���������� ���-�� �����:
export LDR_CNTRL='MAXDATA=0x80000000'
������ ���������� �� ������������� �������� ���������� ������ - �����: http://publib16.boulder.ibm.com/pseries/en_US/aixprggd/genprogc/lrg_prg_support.htm.
�� SunOS 4 ��� ���������� MySQL ���������� ������������ MIT-pthreads, ���,
� ���� �������, ������ �� ����� ������������� � GNU make
.
�� ��������� SunOS 4 ��������� �������� � ������������� ������������ �
libtool
. �� ��������� ���� ������� ����� ������������ ����������� ����
������ configure
:
shell> ./configure --disable-shared --with-mysqld-ldflags=-all-static
��� ���������� readline
����� ���������� �������������� � �������������
������������. �� ��� ����� �� �������� ��������.
��� ���������� mysqld
��������� �������������� �� implicit declaration of
function
. �� ��� ����� ����� �� �������� ��������.
��� ������������� egcs �� Digital Unix ���������� �������� ���� ������ �� gcc 2.95.2, ��������� �������� � ���������� ��������� ������� � egcs ��� DEC!
� ������������ ������������� ��� ���������� ��������� �������� ��� Digital
Unix ������������ ����� -pthread
��� cc
� cxx
, � ����� ���������� -lmach
-lexc
(� ���������� � -lpthread
). ��������� configure
����� � ���������
�����:
CC="cc -pthread" CXX="cxx -pthread -O" \ ./configure --with-named-thread-libs="-lpthread -lmach -lexc -lc"
��� ���������� mysqld
����� ���� ������ ��������� �������������� ���������
���������:
mysqld.cc: In function void handle_connections()': mysqld.cc:626: passing long unsigned int *' as argument 3 of accept(int,sockadddr *, int *)'
�� ��� ����� �� �������� ��������. ��� ��������� ��-�� ����, ��� configure
����� ������������ ������ ������, �� �� ��������������.
��� ������� ������� ��������������� �� ��������� ������ ����� ����������
�������� � ���, ��� �� ���������� ������ ��� ������ �� ������� (��� ������
�� ������� ��� ��������, ���������� ���� �� ����� ������, �������� ������
SIGHUP
). ���� ����� ����������, ������� ��������� ������ ��������:
shell> nohup mysqld [options] &
��� �������� nohup
��������� �� ��� ������� ����� ������������ ��� �������
SIGHUP
, ��������� ����������. � �������� ��������������� �������� �����
��������� ������ �������� safe_mysqld
, ������� ��� ������� mysqld
��������
����� nohup
������ ��� (see section 4.7.2 safe_mysqld
, �������� mysqld
).
���� �� ����������� � ���������� ���������� `mysys/get_opt.c', �������
������ ������� ������ #define _NO_PROTO
� ������ ����� �����!
��� ����������� CC �� Compaq ����������� ��������� ���:
CC="cc -pthread" CFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed all -arch host" CXX="cxx -pthread" CXXFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed all -arch host \ -noexceptions -nortti" export CC CFLAGS CXX CXXFLAGS ./configure \ --prefix=/usr/local/mysql \ --with-low-memory \ --enable-large-files \ --enable-shared=yes \ --with-named-thread-libs="-lpthread -lmach -lexc -lc" gnumake
� ������ ������������� ������� � libtool ��� ���������� � �������������
������������ (��� �������� ����), ��� ���������� mysql
�� ������ ��������
���� ������� � �������:
cd mysql /bin/sh ../libtool --mode=link cxx -pthread -O3 -DDBUG_OFF \ -O4 -ansi_alias -ansi_args -fast -inline speed \ -speculate all \ -arch host -DUNDEF_HAVE_GETHOSTBYNAME_R \ -o mysql mysql.o readline.o sql_string.o completion_hash.o \ ../readline/libreadline.a -lcurses \ ../libmysql/.libs/libmysqlclient.so -lm cd .. gnumake gnumake install scripts/mysql_install_db
� ������ ������� ���������� ��� ������������� DEC CC
� gcc
����������
��������� configure
��������� �������:
CC=cc CFLAGS=-O CXX=gcc CXXFLAGS=-O3 \ ./configure --prefix=/usr/local/mysql
���� ��������� �������� � ������ `c_asm.h', ����� ������� � ������������ ``���������'' `c_asm.h' ��� ������ ��������� ������:
touch include/c_asm.h CC=gcc CFLAGS=-I./include \ CXX=gcc CXXFLAGS=-O3 \ ./configure --prefix=/usr/local/mysql
�������, ��� ������������� ���� �������� � ���������� ld
����� ���� ������
����� �������� ���������� ������ ������ �� DEC (Compaq) �
http://ftp.support.compaq.com/public/unix/.
��� ������������� OSF/1 4.0D � ����������� DEC C V5.6-071 �� Digital Unix
V4.0 (Rev. 878) ���������� �������� ����� ���� ������� (��������������
asm-�������). ����� ����, /bin/ld
�����, ������, �������� ������ (��������
� �������� _exit undefined
������������ ��� ���������� mysqld
). �� ����
�������� ��� ������� ������������ ���������� MySQL � ������� ���������
������ configure
, ������� /bin/ld
����������� ������ �� ������ OSF 4.0C:
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql
� Digital-������������ "C++ V6.1-029" ������ ��������:
CC=cc -pthread CFLAGS=-O4 -ansi_alias -ansi_args -fast -inline speed -speculate all \ -arch host CXX=cxx -pthread CXXFLAGS=-O4 -ansi_alias -ansi_args -fast -inline speed -speculate all \ -arch host -noexceptions -nortti export CC CFLAGS CXX CXXFLAGS ./configure --prefix=/usr/mysql/mysql --with-mysqld-ldflags=-all-static \ --disable-shared --with-named-thread-libs="-lmach -lexc -lc"
� ��������� ������� OSF/1 ��������� ������� alloca()
. �������� �����
��������� ��������� �� ����� `config.h' ������, � ������� ������������
HAVE_ALLOCA
.
����� ����� ������������ ������������ �������� ��� ������� alloca()
�
`/usr/include/alloca.h'. ��������������, ��������� ����, ����� ������������.
configure
����� ������������� ������������ ��������� ��������� ����������:
--with-named-thread-libs="-lpthread -lmach -lexc -lc"
.
��� ������������� gcc ����� ����������� ��������� configure
���������
�������:
shell> CFLAGS=-D_PTHREAD_USE_D4 CXX=gcc CXXFLAGS=-O3 ./configure ...
������������� ������� � ��������� (MySQL ���������� �������� ��������� ������ ��� ������� ��������), ����� ��������, ��� �� ���������� ������ ��� ������ ������������ ������� � �������� � ���������. � ������ ������ ����� ��������� MySQL ������������ ������� ����� ������������ ��� ��������� �������:
shell> CFLAGS=-DDONT_USE_THR_ALARM \ CXXFLAGS=-DDONT_USE_THR_ALARM \ ./configure ...
��� �� �������� �� ������������������ MySQL, �� �������� � ���������
�������, ������� ����������� ��� ������������� �������� ������ ������� ��
������ ����������� ��������� mysqladmin kill
��� mysqladmin shutdown
.
������ ����� ������ �������� ������ ��� ������� ������� ��������� �������.
��� ������������� gcc
2.95.2 ����� ��������� ��������� ������ ����������:
sql_acl.cc:1456: Internal compiler error in `scan_region', at except.c:2566 Please submit a full bug report.
����� ����� �� ��������� � ���� ������, ������� ������� � ������� `sql' �
��������� ��������� ������ gcc
(������ �������� ��, ��������, ������ �
�������� � ��������), ������� � ��� -O3
�� -O0
(��� �������� -O0
��������������� ����� gcc
, ���� � ��� � ������ ���������� �����������
�����-���� ����� -O
). ����� ���������� ��������� �������� ��������� �
������� �������� ������ � ��������� make
��������.
��� ������������� Irix 6.5.3 ��� ���� mysqld
����� ��������� ������ ������
� ������, ���� �� ������� �� ����� ������������ � ������������
CAP_SCHED_MGT
(��������� ���, ��� � root
) ��� ���� ����� ���������� ������
������� mysqld
��������� ��������:
shell> chcap "CAP_SCHED_MGT+epi" /opt/mysql/libexec/mysqld
��������, ��� �������� ������ ��������� ����������� �� `config.h'. ���
�������� ����� ���������� configure
, �� �� ����������.
� ��������� ����������� Irix ����������� ����������� ������� alloca()
.
���� ������ mysqld
�������� ��������� ������ ��� ���������� ���������
��������� SELECT
, ������� �� `config.h' ������, � ������� ������������
HAVE_ALLOC
� HAVE_ALLOCA_H
. ���� �� �������� mysqladmin create
, ������� ��
`config.h' ������, ������������ HAVE_READDIR_R
. ����� ����� ������� ������,
���������� HAVE_TERM_H
.
SGI ����������� ���������� ��� �����, ��� ������� �� ��������
http://support.sgi.com/surfzone/patches/patchset/6.2_indigo.rps.html.
��� �������, ��� �������, ���������� ��������� ���������� (rollup) ����,
��������� ���������� rld
� ��������� ���������� libc
.
��� ��������� pthreads ����������� ������� ���������� ��� ����� POSIX �� ��������:
http://support.sgi.com/surfzone/patches/patchset/6.2_posix.rps.html
���� ��� ���������� `mysql.cc' �� �������� ��������� �� ������ ���������:
"/usr/include/curses.h", line 82: error(1084): invalid combination of type
�� ���������� ��������� ��������� ������� � �������� �������� ������ ������ ��������� �������� ������� MySQL:
shell> extra/replace bool curses_bool < /usr/include/curses.h \ > include/curses.h shell> make
�� �������� ����� ��������� � ��������� ����������. ���� ����������� ������ ���� �����, �� ������ ���� ����� ��������. ������ ���� ��������� ��� ���� ���������-������, �� ����� �������� ��������� � ��������� ��� (�� ����������� �� �������������� ��������������) � ��� ������ �������. ������� ��������� �������� � �������� � Irix ���� ������; ��������, ��� ������� ����� ��������� �������, ���� ��� �� ����� ������.
��� ���������� � ������� gcc
����� ������������ ��������� �������
configure
:
CC=gcc CXX=gcc CXXFLAGS=-O3 \ ./configure --prefix=/usr/local/mysql --enable-thread-safe-client \ --with-named-thread-libs=-lpthread
��������, ��� ��� Irix 6.5.11 � ������������ Irix C � C++ ������������� ������ 7.3.1.2, ������ ��������:
CC=cc CXX=CC CFLAGS='-O3 -n32 -TARG:platform=IP22 -I/usr/local/include \ -L/usr/local/lib' CXXFLAGS='-O3 -n32 -TARG:platform=IP22 \ -I/usr/local/include -L/usr/local/lib' ./configure \ --prefix=/usr/local/mysql --with-innodb --with-berkeley-db \ --with-libwrap=/usr/local \ --with-named-curses-libs=/usr/local/lib/libncurses.a
� ��������� ����� ����� ������������ ������ �� �������� ``sco3.2v5.0.4'' � ``sco3.2v5.0.5''. �������� �������� ���������� � ��������� ������ �� ``sco3.2v4.2''.
� ��������� ����� � �������� ����������� ��� OpenServer �� ����������� gcc 2.95.2. ��������� ���, ����� �������������� MySQL ��� ������ ��������� ������:
CC=gcc CXX=gcc ./configure ... (�����)
./configure
� �������� threads/src
� �������� ����� SCO
OpenServer. ��� ������� ��������� Makefile.SCO5
� Makefile
.
make
.
root
, ��������� � ������� thread/src
� ��������� make
install
.
make
��� ������ MySQL.
safe_mysqld
�� � ������� ������������ root
�� ��������
���������� ��������� ������������ ������ 110 ������ �� ������� (���
�������� ����������� �� ���������). mysqld
������� �� ���� � �����
���������.
configure
������ ����������� ���������:
shell> ./configure --prefix=/usr/local/mysql --disable-shared
configure
������ ����������� ���������:
shell> CFLAGS="-D_XOPEN_XPG4" CXX=gcc CXXFLAGS="-D_XOPEN_XPG4" \ ./configure \ --prefix=/usr/local/mysql \ --with-named-thread-libs="-lgthreads -lsocket -lgen -lgthreads" \ --with-named-curses-libs="-lcurses"� ��� ����� ���������� �������� � ���������� ����������� �������. � ����� ������ �����, ������������� ��� SCO ���������� ����� ����� ����� �� ������ http://www.mysql.com/Downloads/SCO/SCO-3.2v4.2-includes.tar.gz. ���� ����� ������� ����������� � ������� ������ �������� ������� MySQL � ������
include
��������� �� ���������� ��� Caldera (SCO):
mysqld
� �������������� -lgthreads -lsocket -lgthreads
.
malloc
. ��� ������������� ������� �
�������������� ������, ���������, ��� `gmalloc.o' ������� � `libgthreads.a' �
`libgthreads.so'.
read()
,
write()
, getmsg()
, connect()
, accept()
, select()
, and wait()
.
mysqld
. ���� �� �����������
��������� mysqld
�� ������ � ������������� OpenServer 5.0.6, ���� ����
��������� �� �������.
���� ���������� ���������� DBI �� Caldera (SCO), ������� ���������������
Makefile
� DBI-xxx � ������ �����������.
��� ������������ ���� ���� ��������������� ������������� gcc 2.95.2 ��� ����� ����� ������:
������: �����: CC = cc CC = gcc CCCDLFLAGS = -KPIC -W1,-Bexport CCCDLFLAGS = -fpic CCDLFLAGS = -wl,-Bexport CCDLFLAGS = LD = ld LD = gcc -G -fpic LDDLFLAGS = -G -L/usr/local/lib LDDLFLAGS = -L/usr/local/lib LDFLAGS = -belf -L/usr/local/lib LDFLAGS = -L/usr/local/lib LD = ld LD = gcc -G -fpic OPTIMISE = -Od OPTIMISE = -O1 OLD: CCCFLAGS = -belf -dy -w0 -U M_XENIX -DPERL_SCO5 -I/usr/local/include �����: CCFLAGS = -U M_XENIX -DPERL_SCO5 -I/usr/local/include
��� ������� ���, ��� dynaloader
�� Perl �� ��������� DBI-�������, ���� ���
�������������� ������������� icc
��� cc
.
Perl ����� �������� �����, ���� ��� �������������� ������������ cc
.
�� ������ ������������ MySQL ������ �� ���� 3.22.13, ��������� � ���� ������ ���������� ��������� ��������, ��������� � �������������� ��� Unixware.
��� ������� �������������� MySQL ��������� �������� configure
�� Unixware
������ 7.0.1:
CC=cc CXX=CC ./configure --prefix=/usr/local/mysql
���� �� ������ ������������ gcc
, ���������� ������������ gcc
������ 2.95.2
��� �����.
Caldera ���������� libsocket.so.2 � ftp://stage.caldera.com/pub/security/tools ��� ����������� ������������ � ����� ������, ��� OSR506, ��������. ����� ����, ����������� telnetd �� ftp://stage.caldera.com/pub/security/openserver/CSSA-2001-SCO.10/ ������������� � ��� libsocket.so.2, � ��� libresolv.so.1. ��� �� ��������� ���������� ��� ��������� �� ����� ������, ��� OSR506, �������.
������������� �������������� ����� ����� �� ������� ����������/������������� MySQL.
� MySQL ������������ ���������� ����� �������� ������. ������� � ���� ���� `CONFIG.SYS' ��� ����� �������� ��� ����� ������������ ����:
SET EMXOPT=-c -n -h1024
� ��������� ������ �� ������ ����������� �� ��������� �������:
File 'xxxx' not found (Errcode: 24)
��� ������������� MySQL � OS/2 Warp 3 ��������� FixPack 29 ��� ����, � � OS/2 Warp 4 -FixPack 4 ��� ����. ��� ��������� ��� ���������� Pthreads. MySQL ����� ���� ���������� �� �������� �������, �������������� ������� �����, ����� ��� HPFS, FAT32, � �.�.
������ `INSTALL.CMD' ������ ����������� �� ����������� �������� OS/2 - `CMD.EXE'; � ����� �� �������� � ���������� �� ���������, ����� ��� `4OS2.EXE'.
������ `scripts/mysql-install-db' ��� ������������. ������ �� ���������� `install'.cmd � �������� REXX-��������, ������� ������ ��������� ������������ MySQL �� ��������� � ������� ������ WorkPlace Shell ��� MySQL.
��������� ������������ ������� ��������������, �� ��������� �� ���������. ������������ ������ ������ ���� �������������� � �������������� ������������ ���������� Pthreads.
gcc -Zdll -Zmt -Zcrtdll=pthrdrtl -I../include -I../regex -I.. \ -o example udf_example.cc -L../lib -lmysqlclient udf_example.def mv example.dll example.udf
����������: � ������������ � ������������� OS/2 ������ �������� ����� ����
������� UDF �� ������ ��������� 8-�� ��������. ������ �������� � ��������
`/mysql2/udf'; ������ s`afe-mysqld.cmd' �������� ���� � ����� �������� �
���������� ��������� BEGINLIBPATH
. ��� ������������� UDF-�������
������������ ���������� ������������ - ��� ��� ����������� ��� `.udf'.
��������, � Unix ������������ ������ ����� ����� ��� `example.so' � �������
�� ���� ����� ����������� ��������� �������:
mysql> CREATE FUNCTION metaphon RETURNS STRING SONAME "example.so";
� OS/2 ������ ����� ����� ��� `example.udf', �� �� �� ������ ���������� ���������� ������:
mysql> CREATE FUNCTION metaphon RETURNS STRING SONAME "example";
�� �������������� � ���, ����� MySQL ������� � BeOS, ��, � ���������, ����� ��� ��� ������, ��� ���� �� BeOS ��� ������� �������� ��� �������� ������������� ������.
���� �������� �������� ������� ������������� ������, �� �� ������ ������� �� ������ � ������� ����� ����������� ��������, ������� ����� ���������� ��� �������� ������������� ������.
� ��� ���� ��������������� ������� � ���������� �������������� BeOS, ������������, ��� �� 80% ������� ������������� ������ MySQL ��� BeOS, ������ ��� �� ���������� ����������� ������� �� �� �������� �� ��� ������� ��������.
�� �������������� � ���, ����� MySQL ������� �� Novell NetWare, ��, � ���������, ����� ��� ��� ������, ��� ���������� ������ ���������� �� � NetWare ��� ������� �������� ��� �������� ������������� ������.
�� ������ �� ����� �������� ������� ������������� ������ � ������ ������ �� � ������� ����� ����������� ��������, ������� ����� ���������� ��� ������ ��� ���.
��������� Perl ��� MySQL �������������� ���������� ����������� ����������
DBI
/DBD
. See section 8.2 ��������� Perl API ��� MySQL. ��� ����������� ���� Perl DBD
/DBI
��������� ������ Perl 5.004 ��� ����. ��� ������������� ����� ������
������ Perl ������ ��������� �� ����� ��������.
��� ��������� Perl � MySQL ����� ���������, ����� ���� �����������
����������� ��������� �������� MySQL. ���� �� ���������� MySQL �� ������
RPM, �� ���������� ��������� ��������� � RPM-������ MySQL-client
, � ��
����������� ��������� - � RPM-������ MySQL-devel
. ���������, ��� � ���
����������� ��������� ������ RPM.
� ������ 3.22.8 ��������� Perl ������������ �������� �� ��������� ������������ MySQL. ���� �� ������ ���������� ��������� Perl, �� ����������� ����� ����� �������� � http://www.mysql.com/downloads/api-dbi.html.
������������ Perl ������������ ��� ������ tar-������ � �������
��������� `MODULE-VERSION.tar.gz', ��� MODULE
- ��� ������ � VERSION
- ����� ������. ���������� ����� ������������ Data-Dumper
, DBI
�
Msql-Mysql-modules
� ���������� �� � ��������� �������. ���������
��������� ��������� ����. ���������� ������ �������� ��� ������
Data-Dumper
, �� ���� ��������� ��������� ��� ���� ���� �������������:
shell> gunzip < Data-Dumper-VERSION.tar.gz | tar xvf -��� ������� ������� ������� � ������ `Data-Dumper-VERSION'. ��������� � �������, ���� ������������ �����������:
shell> cd Data-Dumper-VERSION�������� ����������� � �������������:
shell> perl Makefile.PL shell> make shell> make test shell> make install
������� make test
�������� ������, ��������� ��� ���������, �������� ��
������. ������� ���������, ��� ���� ��� ������� ����������� �� �����
��������� Msql-Mysql-modules
��� �������� ���� ����������, �� ������ MySQL
��� ���� ������ ��������, ��� �� ������ ���� �������� �������.
������ ��� ��� ��������� ������ ������� MySQL ������� ������� ������ �
�������������� ����������� Msql-Mysql-modules
, �������� ���� ����������
����� ��������, ��� ������ �������� DBI
����� ������������ MySQL (�������
� ���� coredump).
���� �� �� ��������� ������� ��������� ������� Perl � ��������� �������� ��� ��������� ������� Perl, �� ��� ��� �������� �������� ��������� ������:
http://www.iserver.com/support/contrib/perl5/modules.html
������� �������� � ������� Installing New Modules that Require Locally
Installed Modules
.
��� ��������� ������ DBD
��� MySQL ��� ActiveState Perl �� Windows
���������� ��������� ��������� ��������:
set HTTP_proxy=my.proxy.com:3128
C:\> c:\perl\bin\ppm.pl
DBI
, ���� ����� ��� �� �������:
ppm> install DBI
install \ ftp://ftp.de.uu.net/pub/CPAN/authors/id/JWIED/DBD-mysql-1.2212.x86.ppd
��� ������� ������ �������� �� ������� ���� � ������� ActiveState Perl 5.6.
���� ����������� ���� ������� � ��� �� ��������, �� ������ �����
���������� ���������� ������� MyODBC
� ���������� ������ MySQL ����� ODBC:
use DBI; $dbh= DBI->connect("DBI:ODBC:$dsn","$user","$password") || die "Got error $DBI::errstr when connecting to $dsn\n";
����������� Perl ��� MySQL �������� DBI
, DBD:MySQL
� DBD:ODBC
.
C:
, � ���������� ���� �� ��������
������� `C:\PERL'.
perl
, �������� ������� perl -v
� �������� DOS.
DBI
/DBD
���� Perl ��������, ��� �� ����� ����� ������ `../mysql/mysql.so', �� ��������, ��������, ����������� � ���, ��� Perl �� ����� ����� ������������ ���������� `libmysqlclient.so'.
��� �������� ����� ���������, ��������� ����� �� ��������� �������:
Msql-Mysql-modules
����������� perl
Makefile.PL -static -config
������ perl Makefile.PL
.
LD_RUN_PATH
.
���� �� ��������� �� DBD-mysql
�������������� ���� ������, ��, ������
�����, � ��� ������������ ���������� gcc
(��� ������ �������� ���,
���������������� � gcc
):
/usr/bin/perl: can't resolve symbol '__moddi3' /usr/bin/perl: can't resolve symbol '__divdi3'
�������� � ������� ���������� ��� ������ ���������� `mysql.so',
-L/usr/lib/gcc-lib/... -lgcc
(����� ��������� ����� �� make
���
`mysql.so' ��� ���������� ������� Perl). ����� -L
������ ��������� ����
� ��������, ��� ��������� `libgcc.a' � ����� �������.
��� ���� ������� ��������� ������ ����� ����������� � ���, ��� ��� ������
- Perl � MySQL �� �������������� ������ ������������ gcc
. � ���� ������
������ �������������� ����� ���������, ������������� ��� ������
������������ gcc
.
���� ��� ���������� ������ �� ��������� �� ������ Msql-Mysql-modules
��������� ������:
t/00base............install_driver(mysql) failed: Can't load '../blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ../blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/lib/perl5/5.00503/i586-linux/DynaLoader.pm line 169,
�� ��� ��������, ��� � ������ ���������� ���������� �������� ����������
������ -lz
. ��� ����� ���������� ������ ��������� ��������� � ����
`lib/DBD/mysql/Install.pm':
$sysliblist .= " -lm"; �� $sysliblist .= " -lm -lz";
����� ����� ���������� ��������� ������� make realclean
� �����
��������� ������� ����������� �������.
���� �� ������ ������������ ��� ������ � �������, ������� �� ������������
������������� ���������� (����� Caldera/SCO), �� ����� �������������
����������� ������ Perl, ���������� DBI
� DBD-mysql
. ��� ����� ��������
��������� �������: ����� ������� ������ Perl, ������������ � ����� DBI
, �
���������� �� ������ �������� Perl. ����� ��� ������ ������������ ���
������ ������ Perl, ������� ������������� �������� ������������ ��� DBD, �
��������������� ��� ���.
� ������������ ������� Caldera (SCO) ���������� ����� ��������� ����� ���������� ���������:
shell> LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/progressive/lib ��� shell> LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:\ /usr/progressive/lib:/usr/skunk/lib shell> LIBPATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:\ /usr/progressive/lib:/usr/skunk/lib shell> MANPATH=scohelp:/usr/man:/usr/local1/man:/usr/local/man:\ /usr/skunk/man:
������� ������� ������� ������ Perl, ���������� ���������� ������������
DBI
. ��� �������� ����� ���������� ��������� ������ � ��������, ���
������������� ����������� DBI
:
shell> perl Makefile.PL -static -config shell> make shell> make install shell> make perl
����� ���������� ���������� ����� ������ Perl. ����� ������� make perl
������ ������ ������� make
, ������� ���������� ����� ��������� ���
���������� ���������. ��� Caldera (SCO) ��� ����� ������� make -f
Makefile.aperl inst_perl MAP_TARGET=perl
.
����� ����� ������������ ������ ��� ��������� ������ Perl ��� �������� ���
������ ������ Perl, ������� ����� �������� � ���� ���������� ������������
������ DBD::mysql
. ��� �������� ����� ���������� ��������� ������ �
��������, ��� ������������� ����������� Msql-Mysql-modules
:
shell> perl Makefile.PL -static -config shell> make shell> make install shell> make perl
� � ���������� �������� ���������� ���� ����� ������ Perl. ����� �������
��� ����� ������������, �� ����� ������� �� ������ make perl
.
Go to the first, previous, next, last section, table of contents.