PDF (A4) - 41.3Mb
Man Pages (TGZ) - 262.8Kb
Man Pages (Zip) - 368.8Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb
On Windows, you can run the server as a Windows service using a normal user account.
On Linux, for installations performed using a MySQL repository or RPM packages, the MySQL servermysqld should be started by the localmysql operating system user. Starting by another operating system user is not supported by the init scripts that are included as part of the MySQL repositories.
On Unix (or Linux for installations performed usingtar.gz packages) , the MySQL servermysqld can be started and run by any user. However, you should avoid running the server as the Unixroot user for security reasons. To changemysqld to run as a normal unprivileged Unix useruser_name, you must do the following:
Stop the server if it is running (usemysqladmin shutdown).
Change the database directories and files so that
user_namehas privileges to read and write files in them (you might need to do this as the Unixrootuser):$> chown -Ruser_name/path/to/mysql/datadirIf you do not do this, the server cannot access databases or tables when it runs as
user_name.If directories or files within the MySQL data directory are symbolic links,
chown -Rmight not follow symbolic links for you. If it does not, you must also follow those links and change the directories and files they point to.Start the server as user
user_name. Another alternative is to startmysqld as the Unixrootuser and use the--user=option.mysqld starts, then switches to run as the Unix useruser_nameuser_namebefore accepting any connections.To start the server as the given user automatically at system startup time, specify the user name by adding a
useroption to the[mysqld]group of the/etc/my.cnfoption file or themy.cnfoption file in the server's data directory. For example:[mysqld]user=user_name
If your Unix machine itself is not secured, you should assign passwords to the MySQLroot account in the grant tables. Otherwise, any user with a login account on that machine can run themysql client with a--user=root option and perform any operation. (It is a good idea to assign passwords to MySQL accounts in any case, but especially so when other login accounts exist on the server host.) SeeSection 2.9.4, “Securing the Initial MySQL Account”.
PDF (A4) - 41.3Mb
Man Pages (TGZ) - 262.8Kb
Man Pages (Zip) - 368.8Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb