mysql安装

1 download mysql5.0
2
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db –user=mysql

如下提示信息:

Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password ‘new-password’
./bin/mysqladmin -u root -h czhand password ‘new-password’
See the manual for more instructions.

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the ‘sql-bench’ directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at https://order.mysql.com

shell> chown -R root  .
shell> chown -R mysql data
shell> chgrp -R mysql .

/home/my.cnf

basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
socket=/usr/local/mysql/data/mysql.sock
#err-log=/var/log/mysqld.log
pid-file=/usr/local/mysql/data/mysqld.pid

shell> bin/mysqld_safe –user=mysql &

事实上,mysql.sock放到data目录是会出现问题的,因为data目录只有mysql用户可读,用php连接数据库的时候就会出现问题。所以,上面的最好修改一下。

Related posts:

  1. mysql 安装
  2. caphit qmail 配置
  3. Linux远程GUI访问的应用
  4. 一段自动设置文件编
  5. clamav

Post a Comment

Your email is never shared.