Installing MySQL from a Standard Source Distribution
112
shell>
cp support-files/my-medium.cnf /etc/my.cnf
You might need to run this command as
root
.
If you want to configure support for
InnoDB
tables, you should edit the
/etc/my.cnf
file,
removing the
#
character before the option lines that start with
innodb_...
, and modify the option
values to be what you want. See
Section 4.2.3.3, “Using Option Files”
, and
Section 14.2.1, “
InnoDB
Configuration”
.
9. Change location into the installation directory:
shell>
cd /usr/local/mysql
10. If you ran the
make install
command as
root
, the installed files will be owned by
root
. Ensure
that the installation is accessible to
mysql
by executing the following commands as
root
in the
installation directory:
shell>
chown -R mysql .
shell>
chgrp -R mysql .
The first command changes the owner attribute of the files to the
mysql
user. The second changes
the group attribute to the
mysql
group.
11. If you have not installed MySQL before, you must create the MySQL data directory and initialize the
grant tables:
shell>
bin/mysql_install_db --user=mysql
If you run the command as
root
, include the
--user
option as shown. If you run the command
while logged in as
mysql
, you can omit the
--user
option.
The command should create the data directory and its contents with
mysql
as the owner.
After using
mysql_install_db
to create the grant tables for MySQL, you must restart the server
manually. The
mysqld_safe
command to do this is shown in a later step.
12. Most of the MySQL installation can be owned by
root
if you like. The exception is that the data
directory must be owned by
mysql
. To accomplish this, run the following commands as
root
in the
installation directory:
shell>
chown -R root .
shell>
chown -R mysql var
13. If the plugin directory is writable by the server, it may be possible for a user to write executable
code to a file in the directory using
SELECT ... INTO DUMPFILE
. This can be prevented by
making
plugin_dir
[481]
read only to the server or by setting
--secure-file-priv
[419]
to a directory where
SELECT
writes can be made safely.
14. If you want MySQL to start automatically when you boot your machine, you can copy
support-
files/mysql.server
to the location where your system has its startup files. More information
can be found in the
support-files/mysql.server
script itself; see also
Section 2.18.1.2,
“Starting and Stopping MySQL Automatically”
.
15. You can set up new accounts using the
bin/mysql_setpermission
script if you install
the
DBI
and
DBD::mysql
Perl modules. See
Section 4.6.15, “
mysql_setpermission
—
Interactively Set Permissions in Grant Tables”
. For Perl module installation instructions, see
Section 2.22, “Perl Installation Notes”
.
After everything has been installed, test the distribution. To start the MySQL server, use the following
command:
shell>
/usr/local/mysql/bin/mysqld_safe --user=mysql &
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...