How to Run MySQL as a Normal User
571
Name
Cmd-Line
Option file
System Var Status Var
Var Scope
Dynamic
local_infile [462]
Yes
Global
Yes
old_passwords [480]
Yes
Both
Yes
safe-show-
database [418]
Yes
Yes
Yes
Global
Yes
safe-user-
create [419]
Yes
Yes
secure-auth [419]
Yes
Yes
Global
Yes
- Variable:
secure_auth
Yes
Global
Yes
secure-file-
priv [419]
Yes
Yes
Global
No
- Variable:
secure_file_priv
Yes
Global
No
skip-grant-
tables [420]
Yes
Yes
skip-name-
resolve [420]
Yes
Yes
Global
No
- Variable:
skip_name_resolve
Yes
Global
No
skip-
networking [421]
Yes
Yes
Global
No
- Variable:
skip_networking
Yes
Global
No
skip-show-
database [421]
Yes
Yes
Global
No
- Variable:
skip_show_database
Yes
Global
No
6.1.5. How to Run MySQL as a Normal User
On Windows, you can run the server as a Windows service using a normal user account.
On Unix, the MySQL server
mysqld
can be started and run by any user. However, you should avoid
running the server as the Unix
root
user for security reasons. To change
mysqld
to run as a normal
unprivileged Unix user
user_name
, you must do the following:
1. Stop the server if it is running (use
mysqladmin shutdown
).
2. Change the database directories and files so that
user_name
has privileges to read and write files
in them (you might need to do this as the Unix
root
user):
shell>
chown -R user_name /path/to/mysql/datadir
If you do not do this, the server will not be able to access databases or tables when it runs as
user_name
.
If directories or files within the MySQL data directory are symbolic links,
chown -R
might not
follow symbolic links for you. If it does not, you will also need to follow those links and change the
directories and files they point to.
3. Start the server as user
user_name
. Another alternative is to start
mysqld
as the Unix
root
user
and use the
--user=user_name
[424]
option.
mysqld
starts up, then switches to run as the Unix
user
user_name
before accepting any connections.
Содержание 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 ...