values to be what you want. See *Note Option files:: and *Note
`InnoDB' configuration: InnoDB configuration.
8. Change location into the installation directory:
shell> cd /usr/local/mysql
9. If you haven't installed MySQL before, you must create the MySQL
grant tables:
shell> bin/mysql_install_db --user=mysql
If you run the command as `root', you should use the `--user'
option as shown. The value of the option should be the name of
the login account that you created in the first step to use for
running the server. If you run the command while logged in as
that user, you can omit the `--user' option.
Note that for MySQL versions older than 3.22.10,
`mysql_install_db' left the server running after creating the grant
tables. This is no longer true; you need to restart the server
after performing the remaining steps in this procedure.
10. Change the ownership of program binaries to `root' and ownership
of the data directory to the user that you run `mysqld' as.
Assuming that you are located in the installation directory
(`/usr/local/mysql'), the commands look like this:
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
The first command changes the owner attribute of the files to the
`root' user. The second changes the owner attribute of the data
directory to the `mysql' user. The third changes the group
attribute to the `mysql' group.
11. If you would like 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 and in
*Note Automatic start::.
12. You can set up new accounts using the `bin/mysql_setpermission'
script if you install the `DBI' and `DBD::mysql' Perl modules.
For instructions, see *Note Perl support::.
After everything has been installed, you should initialize and test your
distribution using this command:
shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &
For versions of MySQL older than 4.0, substitute `safe_mysqld' for
`mysqld_safe' in the command.
If that command fails immediately and prints `mysqld ended', you can
find some information in the `HOST_NAME.err' file in the data directory.
More information about `mysqld_safe' is given in *Note `mysqld_safe':
mysqld_safe.
mysqladmin -u root password '新口令' ##该口令
bin/mysql -u root -p ##登陆
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




