下载了mysql5.1.29的tar文件,但是解压需要gnu的tar同时解压了以后发觉没有没什么有用的文件,而且也不存在.configure文件所以没办法自编译,当然也不能make;make install了。只能搜文章了,
安装MySQL
# tar xzvf mysql-5.1.24-rc-linux-i686-glibc23.tar.gz
# mv mysql-5.1.24-rc-linux-i686-glibc23 /usr/local/
# ln -s /usr/local/ mysql-5.1.24-rc-linux-i686-glibc23 /usr/local/mysql
# useradd mysql
# chown -R mysql:root /usr/local/mysql/
# cd /usr/local/mysql
# ./scripts/mysql_install_db –-user=mysql
# cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
# chown root:root /etc/rc.d/init.d/mysqld
# chmod 755 /etc/rc.d/init.d/mysqld
# chkconfig –add mysqld
# chkconfig –level 35 mysqld on
# cp ./support-files/my-huge.cnf /etc/my.cnf
# mv /usr/local/mysql/data /var/lib/mysql
# chown -R mysql:mysql /var/lib/mysql/
# vi /etc/my.cnf 修改以下内容:
(1) 在 [mysql] 段增加一行:default-character-set = utf8
(2) 在 [mysqld] 段增加或修改:datadir = /var/lib/mysql–skip-innodbdefault-character-set = utf8–wait-timeout = 5max_connections = 512max_connect_errors = 10000000thread_concurrency = CPU个数×2将 log-bin 注释# bin/mysqladmin -u root password ‘password_for_root’
--------------
向上面所说的,当然在建立的时候一定要将mysql目录设置为mysql:mysql,同时很麻烦的就是,在把support-files/mysql.server考出来的时候一定要有所修改。
pkgadd 默认修改/var/sadm/install/admin/default 修改basedir
安装MySQL
# tar xzvf mysql-5.1.24-rc-linux-i686-glibc23.tar.gz
# mv mysql-5.1.24-rc-linux-i686-glibc23 /usr/local/
# ln -s /usr/local/ mysql-5.1.24-rc-linux-i686-glibc23 /usr/local/mysql
# useradd mysql
# chown -R mysql:root /usr/local/mysql/
# cd /usr/local/mysql
# ./scripts/mysql_install_db –-user=mysql
# cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
# chown root:root /etc/rc.d/init.d/mysqld
# chmod 755 /etc/rc.d/init.d/mysqld
# chkconfig –add mysqld
# chkconfig –level 35 mysqld on
# cp ./support-files/my-huge.cnf /etc/my.cnf
# mv /usr/local/mysql/data /var/lib/mysql
# chown -R mysql:mysql /var/lib/mysql/
# vi /etc/my.cnf 修改以下内容:
(1) 在 [mysql] 段增加一行:default-character-set = utf8
(2) 在 [mysqld] 段增加或修改:datadir = /var/lib/mysql–skip-innodbdefault-character-set = utf8–wait-timeout = 5max_connections = 512max_connect_errors = 10000000thread_concurrency = CPU个数×2将 log-bin 注释# bin/mysqladmin -u root password ‘password_for_root’
--------------
向上面所说的,当然在建立的时候一定要将mysql目录设置为mysql:mysql,同时很麻烦的就是,在把support-files/mysql.server考出来的时候一定要有所修改。
pkgadd 默认修改/var/sadm/install/admin/default 修改basedir
评论