Install MySQL database

xiaoxiao2021-03-06  40

Install MySQL database

If you download the source code, install it as follows

# PW groupadd mysql # pw useradd mysql -g mysql -s / nonexitent # tar -zxvf mysql-4.0.20.tar.gz # mv mysql-4.0.20.tar.gz mysql # cd mysql # ./configure --Prefix = / usr / local / mysql # make # make install # scripts / mysql_install_db # chown -r root / usr / local / mysql # chown -r mysql / usr / local / mysql / var # chgrp -r mysql / usr / local / Mysql # cp support-files / my-medium.cnf /etc/my.cnf # / usr / local / mysql / bin / safe_mysqld --user = mysql & # echo "/ usr / local / mysql / bin / safe_mysqld - User = mysql & "> /etc/rc.local # ./mysqladmin -u root -p password" Your-password "

The compiled package installation method is as follows: Shell> PW GroupAdd MySQL Shell> PW useradd mysql -g mysql -s / nonexitent shell> CD / usr / local shell> gunzip ln -s mysql-version-os mysql shell> cd mysql shell> scripts / mysql_install_db shell> chown -r root / usr / local / mysql shell> chown -r mysql / usr / local / mysql / data shell > chgrp -r mysql / usr / local / mysql shell> chown -r root / usr / local / mysql / bin shell> bin / safe_mysqld --user = mysql & # echo "/ usr / local / mysql / bin / safe_mysqld - -user = mysql & ">> /etc/rc.local

Still pay attention to MySQL permissions

If mysqld can't execute # chmod 755 / usr / local / mysql / libexec / mysqld

Basedir: / usr / local / datadir: / var / db / mysql / tmpdir: / var / tmp / logage: / usr / local / share / mysql / English / pid file: /var/db/mysql/route.pidtcp port : 3306Unix Socket: / TMP/Mysql.Sock

转载请注明原文地址:https://www.9cbs.com/read-83030.html

New Post(0)