Django+MySQLDB配置

一、安装Mysql
(1)下载mysql-5.0.83
(2)运行如下命令
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure  --enable-thread-safe-client --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> bin/mysqld_safe --user=mysql &
(3)修改MySQL的root密码
(4)安装MySQL-python-1.2.2.tar.gz
可能要修改site.cfg文件
(5)加入库路径
echo "/usr/local/lib/mysql" > /etc/ld.so.conf.d/mysql.conf
ldconfig 

posted on 2010-11-10 18:33  sulpha  阅读(690)  评论(0编辑  收藏  举报

导航